1
0
Fork 0

Bugfix: ensure GPS WP1 Mag-bearing is normalised to [0..360]

This commit is contained in:
jmt 2010-02-13 19:33:54 +00:00 committed by Tim Moore
parent edd83dd7e8
commit 5ed73d063c

View file

@ -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