From baa4ecc2ea7b5622c6a0c111e41516b1048405ad Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 9 Dec 2013 14:10:49 +1100 Subject: [PATCH] APA_AHRS: update for compass API change --- libraries/AP_AHRS/AP_AHRS_DCM.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_AHRS/AP_AHRS_DCM.cpp b/libraries/AP_AHRS/AP_AHRS_DCM.cpp index edfd708098..4d28d492a3 100644 --- a/libraries/AP_AHRS/AP_AHRS_DCM.cpp +++ b/libraries/AP_AHRS/AP_AHRS_DCM.cpp @@ -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);