Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
599421b9
Commit
599421b9
authored
Mar 04, 2017
by
DonLakeFlyer
Browse files
Fix incorrect loiter point rotate on landing heading fact change
parent
872b4faf
Changes
1
Show whitespace changes
Inline
Side-by-side
src/MissionManager/FixedWingLandingComplexItem.cc
View file @
599421b9
...
...
@@ -227,10 +227,15 @@ void FixedWingLandingComplexItem::_recalcLoiterCoordFromFacts(void)
convertGeoToNed
(
_landingCoordinate
,
tangentOrigin
,
&
north
,
&
east
,
&
down
);
// Heading is from loiter to land, so we need to rotate angle 180 degrees and go the opposite direction
double
heading
=
_landingHeadingFact
.
rawValue
().
toDouble
();
heading
+=
180.0
;
heading
*=
-
1.0
;
QPointF
originPoint
(
east
,
north
);
north
+=
_loiterToLandDistanceFact
.
rawValue
().
toDouble
();
QPointF
loiterPoint
(
east
,
north
);
QPointF
rotatedLoiterPoint
=
_rotatePoint
(
loiterPoint
,
originPoint
,
_landingHeadingFact
.
rawValue
().
toDouble
()
);
QPointF
rotatedLoiterPoint
=
_rotatePoint
(
loiterPoint
,
originPoint
,
heading
);
convertNedToGeo
(
rotatedLoiterPoint
.
y
(),
rotatedLoiterPoint
.
x
(),
down
,
tangentOrigin
,
&
_loiterCoordinate
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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