gimbal: Fix deg/rad for angular rates

The command is in degrees, but the rest in radians.

Also, set roll to NAN, rather than 0 when not set.
This commit is contained in:
Julian Oes 2024-08-01 13:20:45 +12:00 committed by Beat Küng
parent 55ec6df751
commit c0c412570d

View File

@ -882,8 +882,8 @@ InputMavlinkGimbalV2::_process_command(ControlData &control_data, const vehicle_
const matrix::Eulerf euler(0.0f, math::radians(vehicle_command.param1),
math::radians(vehicle_command.param2));
const matrix::Quatf q(euler);
const matrix::Vector3f angular_velocity(0.0f, vehicle_command.param3,
vehicle_command.param4);
const matrix::Vector3f angular_velocity(NAN, math::radians(vehicle_command.param3),
math::radians(vehicle_command.param4));
const uint32_t flags = vehicle_command.param5;
// TODO: support gimbal device id for multiple gimbals