APA_AHRS: update for compass API change

This commit is contained in:
Andrew Tridgell 2013-12-09 14:10:49 +11:00
parent 65c97a2f5f
commit baa4ecc2ea

View File

@ -244,7 +244,7 @@ AP_AHRS_DCM::normalize(void)
float
AP_AHRS_DCM::yaw_error_compass(void)
{
Vector3f mag = Vector3f(_compass->mag_x, _compass->mag_y, _compass->mag_z);
const Vector3f &mag = _compass->get_field();
// get the mag vector in the earth frame
Vector2f rb = _dcm_matrix.mulXY(mag);