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
05cc261b
Commit
05cc261b
authored
Sep 05, 2015
by
Lorenz Meier
Browse files
Merge pull request #1838 from dogmaphobic/angleJitter
Decreasing the angle jitter threshold for row, pitch and yaw.
parents
850fc5bd
be04ff63
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Vehicle/Vehicle.cc
View file @
05cc261b
...
...
@@ -291,7 +291,7 @@ void Vehicle::_updateAttitude(UASInterface*, double roll, double pitch, double y
_roll
=
std
::
numeric_limits
<
double
>::
quiet_NaN
();
}
else
{
float
rolldeg
=
_oneDecimal
(
roll
*
(
180.0
/
M_PI
));
if
(
fabs
(
roll
-
rolldeg
)
>
1.0
)
{
if
(
fabs
(
roll
-
rolldeg
)
>
0.25
)
{
_roll
=
rolldeg
;
if
(
_refreshTimer
->
isActive
())
{
emit
rollChanged
();
...
...
@@ -306,7 +306,7 @@ void Vehicle::_updateAttitude(UASInterface*, double roll, double pitch, double y
_pitch
=
std
::
numeric_limits
<
double
>::
quiet_NaN
();
}
else
{
float
pitchdeg
=
_oneDecimal
(
pitch
*
(
180.0
/
M_PI
));
if
(
fabs
(
pitch
-
pitchdeg
)
>
1.0
)
{
if
(
fabs
(
pitch
-
pitchdeg
)
>
0.25
)
{
_pitch
=
pitchdeg
;
if
(
_refreshTimer
->
isActive
())
{
emit
pitchChanged
();
...
...
@@ -322,7 +322,7 @@ void Vehicle::_updateAttitude(UASInterface*, double roll, double pitch, double y
}
else
{
yaw
=
_oneDecimal
(
yaw
*
(
180.0
/
M_PI
));
if
(
yaw
<
0
)
yaw
+=
360
;
if
(
fabs
(
_heading
-
yaw
)
>
1.0
)
{
if
(
fabs
(
_heading
-
yaw
)
>
0.25
)
{
_heading
=
yaw
;
if
(
_refreshTimer
->
isActive
())
{
emit
headingChanged
();
...
...
@@ -350,7 +350,7 @@ void Vehicle::_updateSpeed(UASInterface*, double groundSpeed, double airSpeed, q
}
}
airSpeed
=
_oneDecimal
(
airSpeed
);
if
(
fabs
(
_airSpeed
-
airSpeed
)
>
1.0
)
{
if
(
fabs
(
_airSpeed
-
airSpeed
)
>
0.5
)
{
_airSpeed
=
airSpeed
;
if
(
_refreshTimer
->
isActive
())
{
emit
airSpeedChanged
();
...
...
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