SITL: fixed compass vector to be based on yaw not GPS heading

Many thanks to Randy for noticing this, and apologies for the wasted time!
This commit is contained in:
Andrew Tridgell 2013-05-04 14:27:06 +10:00
parent 2dc5078c83
commit 53ebcfeba5

View File

@ -256,7 +256,7 @@ void SITL_State::_timer_handler(int signum)
_sitl->state.xAccel, _sitl->state.yAccel, _sitl->state.zAccel,
_sitl->state.airspeed);
_update_barometer(_sitl->state.altitude);
_update_compass(_sitl->state.rollDeg, _sitl->state.pitchDeg, _sitl->state.heading);
_update_compass(_sitl->state.rollDeg, _sitl->state.pitchDeg, _sitl->state.yawDeg);
}
// trigger all APM timers. We do this last as it can re-enable