diff --git a/libraries/AP_NavEKF/AP_NavEKF.cpp b/libraries/AP_NavEKF/AP_NavEKF.cpp index cb35536436..9590abe02b 100644 --- a/libraries/AP_NavEKF/AP_NavEKF.cpp +++ b/libraries/AP_NavEKF/AP_NavEKF.cpp @@ -4262,7 +4262,7 @@ void NavEKF::readMagData() // check if compass offsets have ben changed and adjust EKF bias states to maintain consistent innovations if (_ahrs->get_compass()->healthy(0)) { Vector3f nowMagOffsets = _ahrs->get_compass()->get_offsets(0); - bool changeDetected = (!AP_Math::is_equal(nowMagOffsets.x,lastMagOffsets.x) || !AP_Math::is_equal(nowMagOffsets.y,lastMagOffsets.y) || !AP_Math::is_equal(nowMagOffsets.z,lastMagOffsets.z)); + bool changeDetected = (!is_equal(nowMagOffsets.x,lastMagOffsets.x) || !is_equal(nowMagOffsets.y,lastMagOffsets.y) || !is_equal(nowMagOffsets.z,lastMagOffsets.z)); // Ignore bias changes before final mag field and yaw initialisation, as there may have been a compass calibration if (changeDetected && secondMagYawInit) { state.body_magfield.x += (nowMagOffsets.x - lastMagOffsets.x) * 0.001f;