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
4d7e63a8
Commit
4d7e63a8
authored
Mar 02, 2017
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Landing heading is from loiter to land
Not the other way around
parent
63b29b1c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
FixedWingLandingComplexItem.cc
src/MissionManager/FixedWingLandingComplexItem.cc
+2
-2
No files found.
src/MissionManager/FixedWingLandingComplexItem.cc
View file @
4d7e63a8
...
@@ -230,7 +230,7 @@ void FixedWingLandingComplexItem::_recalcLoiterCoordFromFacts(void)
...
@@ -230,7 +230,7 @@ void FixedWingLandingComplexItem::_recalcLoiterCoordFromFacts(void)
QPointF
originPoint
(
east
,
north
);
QPointF
originPoint
(
east
,
north
);
north
+=
_loiterToLandDistanceFact
.
rawValue
().
toDouble
();
north
+=
_loiterToLandDistanceFact
.
rawValue
().
toDouble
();
QPointF
loiterPoint
(
east
,
north
);
QPointF
loiterPoint
(
east
,
north
);
QPointF
rotatedLoiterPoint
=
_rotatePoint
(
loiterPoint
,
originPoint
,
-
_landingHeadingFact
.
rawValue
().
toDouble
());
QPointF
rotatedLoiterPoint
=
_rotatePoint
(
loiterPoint
,
originPoint
,
_landingHeadingFact
.
rawValue
().
toDouble
());
convertNedToGeo
(
rotatedLoiterPoint
.
y
(),
rotatedLoiterPoint
.
x
(),
down
,
tangentOrigin
,
&
_loiterCoordinate
);
convertNedToGeo
(
rotatedLoiterPoint
.
y
(),
rotatedLoiterPoint
.
x
(),
down
,
tangentOrigin
,
&
_loiterCoordinate
);
...
@@ -273,7 +273,7 @@ void FixedWingLandingComplexItem::_recalcFactsFromCoords(void)
...
@@ -273,7 +273,7 @@ void FixedWingLandingComplexItem::_recalcFactsFromCoords(void)
// Calc new heading
// Calc new heading
QPointF
vector
(
eastL
oiter
-
eastLand
,
northLoiter
-
northLand
);
QPointF
vector
(
eastL
and
-
eastLoiter
,
northLand
-
northLoiter
);
double
radians
=
atan2
(
vector
.
y
(),
vector
.
x
());
double
radians
=
atan2
(
vector
.
y
(),
vector
.
x
());
double
degrees
=
qRadiansToDegrees
(
radians
);
double
degrees
=
qRadiansToDegrees
(
radians
);
// Change angle to north up = 0 degrees
// Change angle to north up = 0 degrees
...
...
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