}
double altFt = _wp1_position.getElevationFt();
- if (altFt < -9990.0) {
- _apTargetAltitudeFt->setDoubleValue(0.0);
- } else {
+ if (altFt > -9990.0) {
_apTargetAltitudeFt->setDoubleValue(altFt);
}
}
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