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
6701b08d
Commit
6701b08d
authored
Jul 31, 2018
by
Don Gagne
Browse files
Fix negative wind direction
parent
7ea4afbf
Changes
1
Show whitespace changes
Inline
Side-by-side
src/Vehicle/Vehicle.cc
View file @
6701b08d
...
...
@@ -1259,6 +1259,10 @@ void Vehicle::_handleWindCov(mavlink_message_t& message)
float
direction
=
qRadiansToDegrees
(
qAtan2
(
wind
.
wind_y
,
wind
.
wind_x
));
float
speed
=
qSqrt
(
qPow
(
wind
.
wind_x
,
2
)
+
qPow
(
wind
.
wind_y
,
2
));
if
(
direction
<
0
)
{
direction
+=
360
;
}
_windFactGroup
.
direction
()
->
setRawValue
(
direction
);
_windFactGroup
.
speed
()
->
setRawValue
(
speed
);
_windFactGroup
.
verticalSpeed
()
->
setRawValue
(
0
);
...
...
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