Bugfix: ensure GPS WP1 Mag-bearing is normalised to [0..360]
This commit is contained in:
parent
edd83dd7e8
commit
5ed73d063c
1 changed files with 3 additions and 1 deletions
|
@ -1186,7 +1186,9 @@ double GPS::getWP1MagBearing() const
|
|||
return -9999.0;
|
||||
}
|
||||
|
||||
return _wp1TrueBearing - _magvar_node->getDoubleValue();
|
||||
double magBearing = _wp1TrueBearing - _magvar_node->getDoubleValue();
|
||||
SG_NORMALIZE_RANGE(magBearing, 0.0, 360.0);
|
||||
return magBearing;
|
||||
}
|
||||
|
||||
double GPS::getWP1CourseDeviation() const
|
||||
|
|
Loading…
Add table
Reference in a new issue