From 86cd484b8288e411bcd654e6b26ff8aa02875288 Mon Sep 17 00:00:00 2001 From: Andreas Antener Date: Mon, 4 May 2015 10:27:56 +0200 Subject: [PATCH] convert -PI to PI attitude range to -1 to 1 for gimbal output --- src/drivers/gimbal/gimbal.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/drivers/gimbal/gimbal.cpp b/src/drivers/gimbal/gimbal.cpp index 1e27309d83..ae75d3a14a 100644 --- a/src/drivers/gimbal/gimbal.cpp +++ b/src/drivers/gimbal/gimbal.cpp @@ -306,17 +306,17 @@ Gimbal::cycle() orb_copy(ORB_ID(vehicle_attitude), _att_sub, &att); if (_attitude_compensation_roll) { - roll = -att.roll; + roll = 1.0f / M_PI_F * -att.roll; updated = true; } if (_attitude_compensation_pitch) { - pitch = -att.pitch; + pitch = 1.0f / M_PI_F * -att.pitch; updated = true; } if (_attitude_compensation_yaw) { - yaw = att.yaw; + yaw = 1.0f / M_PI_F * att.yaw; updated = true; }