From 818c41f743898a99db1dbe3273f05e1ca2c5572b Mon Sep 17 00:00:00 2001 From: Michael Oborne Date: Fri, 28 Oct 2011 17:30:53 +0800 Subject: [PATCH] Fix HIL DCM to match actual --- libraries/AP_DCM/AP_DCM_HIL.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libraries/AP_DCM/AP_DCM_HIL.cpp b/libraries/AP_DCM/AP_DCM_HIL.cpp index 66adbbee7e..ae7aa3ff56 100644 --- a/libraries/AP_DCM/AP_DCM_HIL.cpp +++ b/libraries/AP_DCM/AP_DCM_HIL.cpp @@ -42,12 +42,12 @@ AP_DCM_HIL::setHil(float _roll, float _pitch, float _yaw, float sPitch = sin(pitch), cPitch = cos(pitch); float sYaw = sin(yaw), cYaw = cos(yaw); _dcm_matrix.a.x = cPitch*cYaw; - _dcm_matrix.a.y = cPitch*sYaw; - _dcm_matrix.a.z = -sPitch; - _dcm_matrix.b.x = -cRoll*sYaw+sRoll*sPitch*cYaw; + _dcm_matrix.a.y = -cRoll*sYaw+sRoll*sPitch*cYaw; + _dcm_matrix.a.z = sRoll*sYaw+cRoll*sPitch*cYaw; + _dcm_matrix.b.x = cPitch*sYaw; _dcm_matrix.b.y = cRoll*cYaw+sRoll*sPitch*sYaw; - _dcm_matrix.b.z = sRoll*cPitch; - _dcm_matrix.c.x = sRoll*sYaw+cRoll*sPitch*cYaw; - _dcm_matrix.c.y = -sRoll*cYaw+cRoll*sPitch*sYaw; + _dcm_matrix.b.z = -sRoll*cYaw+cRoll*sPitch*sYaw; + _dcm_matrix.c.x = -sPitch; + _dcm_matrix.c.y = sRoll*cPitch; _dcm_matrix.c.z = cRoll*cPitch; }