From 18318d002756204e9fb44b7f1d198093b52c6563 Mon Sep 17 00:00:00 2001 From: Sam Gillam Date: Tue, 17 Dec 2024 15:52:17 -0700 Subject: [PATCH] Expect values to be in radians for the DO_GIMBAL_MANAGER_PITCHYAW msg (units are specified as radians in the MAVLINK message definition) --- src/modules/gimbal/input_mavlink.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/modules/gimbal/input_mavlink.cpp b/src/modules/gimbal/input_mavlink.cpp index d78e069ba749..83cda2a5a75a 100644 --- a/src/modules/gimbal/input_mavlink.cpp +++ b/src/modules/gimbal/input_mavlink.cpp @@ -879,11 +879,9 @@ InputMavlinkGimbalV2::_process_command(ControlData &control_data, const vehicle_ if (vehicle_command.source_system == control_data.sysid_primary_control && vehicle_command.source_component == control_data.compid_primary_control) { - const matrix::Eulerf euler(0.0f, math::radians(vehicle_command.param1), - math::radians(vehicle_command.param2)); + const matrix::Eulerf euler(0.0f, vehicle_command.param1, vehicle_command.param2); const matrix::Quatf q(euler); - const matrix::Vector3f angular_velocity(NAN, math::radians(vehicle_command.param3), - math::radians(vehicle_command.param4)); + const matrix::Vector3f angular_velocity(NAN, vehicle_command.param3, vehicle_command.param4); const uint32_t flags = vehicle_command.param5; // TODO: support gimbal device id for multiple gimbals