Browse Source

AP_NavEKF : Change mag fusion to use corrected compass values

This enables compass units to be switched in-flight
master
priseborough 10 years ago committed by Andrew Tridgell
parent
commit
9132fcfe43
  1. 3
      libraries/AP_NavEKF/AP_NavEKF.cpp

3
libraries/AP_NavEKF/AP_NavEKF.cpp

@ -3922,8 +3922,7 @@ void NavEKF::readMagData()
// store time of last measurement update // store time of last measurement update
lastMagUpdate = _ahrs->get_compass()->last_update; lastMagUpdate = _ahrs->get_compass()->last_update;
// Read compass data // read compass data and scale to improve numerical conditioning
// We scale compass data to improve numerical conditioning
magData = _ahrs->get_compass()->get_field() * 0.001f; magData = _ahrs->get_compass()->get_field() * 0.001f;
// get states stored at time closest to measurement time after allowance for measurement delay // get states stored at time closest to measurement time after allowance for measurement delay

Loading…
Cancel
Save