Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
e98e7dde
Commit
e98e7dde
authored
May 05, 2017
by
Don Gagne
Committed by
GitHub
May 05, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5094 from DonLakeFlyer/FWLanding
Fixed Wing Landing pattern
parents
2e3a5199
4f0a1d34
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
11 deletions
+11
-11
FixedWingLandingComplexItem.cc
src/MissionManager/FixedWingLandingComplexItem.cc
+8
-0
FixedWingLandingComplexItem.h
src/MissionManager/FixedWingLandingComplexItem.h
+3
-3
FWLandingPatternEditor.qml
src/PlanView/FWLandingPatternEditor.qml
+0
-8
No files found.
src/MissionManager/FixedWingLandingComplexItem.cc
View file @
e98e7dde
...
...
@@ -90,6 +90,9 @@ FixedWingLandingComplexItem::FixedWingLandingComplexItem(Vehicle* vehicle, QObje
connect
(
this
,
&
FixedWingLandingComplexItem
::
loiterClockwiseChanged
,
this
,
&
FixedWingLandingComplexItem
::
_setDirty
);
connect
(
this
,
&
FixedWingLandingComplexItem
::
loiterAltitudeRelativeChanged
,
this
,
&
FixedWingLandingComplexItem
::
_setDirty
);
connect
(
this
,
&
FixedWingLandingComplexItem
::
landingAltitudeRelativeChanged
,
this
,
&
FixedWingLandingComplexItem
::
_setDirty
);
connect
(
this
,
&
FixedWingLandingComplexItem
::
loiterAltitudeRelativeChanged
,
this
,
&
FixedWingLandingComplexItem
::
coordinateHasRelativeAltitudeChanged
);
connect
(
this
,
&
FixedWingLandingComplexItem
::
landingAltitudeRelativeChanged
,
this
,
&
FixedWingLandingComplexItem
::
exitCoordinateHasRelativeAltitudeChanged
);
}
int
FixedWingLandingComplexItem
::
lastSequenceNumber
(
void
)
const
...
...
@@ -409,6 +412,7 @@ void FixedWingLandingComplexItem::_recalcFromRadiusChange(void)
double
angleLoiterToTangent
=
qRadiansToDegrees
(
qAsin
(
radius
/
landToLoiterDistance
))
*
(
_loiterClockwise
?
-
1
:
1
);
_loiterCoordinate
=
_landingCoordinate
.
atDistanceAndAzimuth
(
landToLoiterDistance
,
heading
+
180
+
angleLoiterToTangent
);
_loiterCoordinate
.
setAltitude
(
_loiterAltitudeFact
.
rawValue
().
toDouble
());
_ignoreRecalcSignals
=
true
;
emit
loiterCoordinateChanged
(
_loiterCoordinate
);
...
...
@@ -446,6 +450,7 @@ void FixedWingLandingComplexItem::_recalcFromHeadingAndDistanceChange(void)
// Use those values to get the new loiter point which takes heading into acount
_loiterCoordinate
=
_landingCoordinate
.
atDistanceAndAzimuth
(
loiterDistance
,
heading
+
180
+
loiterAzimuth
);
_loiterCoordinate
.
setAltitude
(
_loiterAltitudeFact
.
rawValue
().
toDouble
());
_ignoreRecalcSignals
=
true
;
emit
loiterTangentCoordinateChanged
(
_loiterTangentCoordinate
);
...
...
@@ -509,11 +514,14 @@ void FixedWingLandingComplexItem::_recalcFromCoordinateChange(void)
void
FixedWingLandingComplexItem
::
_updateLoiterCoodinateAltitudeFromFact
(
void
)
{
_loiterCoordinate
.
setAltitude
(
_loiterAltitudeFact
.
rawValue
().
toDouble
());
emit
loiterCoordinateChanged
(
_loiterCoordinate
);
emit
coordinateChanged
(
_loiterCoordinate
);
}
void
FixedWingLandingComplexItem
::
_updateLandingCoodinateAltitudeFromFact
(
void
)
{
_landingCoordinate
.
setAltitude
(
_landingAltitudeFact
.
rawValue
().
toDouble
());
emit
landingCoordinateChanged
(
_landingCoordinate
);
}
void
FixedWingLandingComplexItem
::
_setDirty
(
void
)
...
...
src/MissionManager/FixedWingLandingComplexItem.h
View file @
e98e7dde
...
...
@@ -78,9 +78,9 @@ public:
void
appendMissionItems
(
QList
<
MissionItem
*>&
items
,
QObject
*
missionItemParent
)
final
;
void
applyNewAltitude
(
double
newAltitude
)
final
;
bool
coordinateHasRelativeAltitude
(
void
)
const
final
{
return
tru
e
;
}
bool
exitCoordinateHasRelativeAltitude
(
void
)
const
final
{
return
tru
e
;
}
bool
exitCoordinateSameAsEntry
(
void
)
const
final
{
return
tru
e
;
}
bool
coordinateHasRelativeAltitude
(
void
)
const
final
{
return
_loiterAltitudeRelativ
e
;
}
bool
exitCoordinateHasRelativeAltitude
(
void
)
const
final
{
return
_landingAltitudeRelativ
e
;
}
bool
exitCoordinateSameAsEntry
(
void
)
const
final
{
return
fals
e
;
}
void
setDirty
(
bool
dirty
)
final
;
void
setCoordinate
(
const
QGeoCoordinate
&
coordinate
)
final
{
setLoiterCoordinate
(
coordinate
);
}
...
...
src/PlanView/FWLandingPatternEditor.qml
View file @
e98e7dde
...
...
@@ -41,14 +41,6 @@ Rectangle {
anchors.right
:
parent
.
right
visible
:
missionItem
.
landingCoordSet
QGCLabel
{
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
wrapMode
:
Text
.
WordWrap
font.pointSize
:
ScreenTools
.
smallFontPointSize
text
:
qsTr
(
"
WIP (NOT FOR REAL FLIGHT!)
"
)
}
SectionHeader
{
text
:
qsTr
(
"
Loiter point
"
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment