From 24b5531953d9689ccb809ede5d217ad085651946 Mon Sep 17 00:00:00 2001 From: David Sastre Date: Wed, 13 Mar 2024 19:29:33 +0100 Subject: [PATCH 1/3] gimbal_v2.md: Add clarification about gimbal yaw frame --- en/services/gimbal_v2.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/en/services/gimbal_v2.md b/en/services/gimbal_v2.md index c3f401859..f0e96baf4 100644 --- a/en/services/gimbal_v2.md +++ b/en/services/gimbal_v2.md @@ -255,6 +255,17 @@ This signals that the gimbal manager also is also acting as the gimbal device. Also see [how to address non-MAVLink gimbal devices](#non_mavlink_gimbal_device_addressing). +#### How to interpret correctly GIMBAL_DEVICE_ATTITUDE_STATUS yaw gimbal angle +We need to check the flags field as follows: + +- GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME: If set, yaw will be relative to vehicle. +- GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME: If set, yaw will be relative to North +- **Only if none of the above are set**, we must check for GIMBAL_DEVICE_FLAGS_YAW_LOCK: if this one is set yaw will be relative to North, if this flag is not set + either, yaw will be relative to vehicle. + +For manufacturers working on new devices, it is preferred to use GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME. But for +backwards compatibility GIMBAL_DEVICE_FLAGS_YAW_LOCK is also valid, and some systems could report their flags this way. + ## Message/Command/Enum Summary ### Gimbal Manager Messages From 8280278f0945c9c410fd51d7d503d389dc3ff602 Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Thu, 14 Mar 2024 10:13:25 +1100 Subject: [PATCH 2/3] Subedit --- en/services/gimbal_v2.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/en/services/gimbal_v2.md b/en/services/gimbal_v2.md index f0e96baf4..405508e10 100644 --- a/en/services/gimbal_v2.md +++ b/en/services/gimbal_v2.md @@ -255,16 +255,18 @@ This signals that the gimbal manager also is also acting as the gimbal device. Also see [how to address non-MAVLink gimbal devices](#non_mavlink_gimbal_device_addressing). -#### How to interpret correctly GIMBAL_DEVICE_ATTITUDE_STATUS yaw gimbal angle -We need to check the flags field as follows: +#### How to interpret `GIMBAL_DEVICE_ATTITUDE_STATUS` yaw gimbal angle -- GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME: If set, yaw will be relative to vehicle. -- GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME: If set, yaw will be relative to North -- **Only if none of the above are set**, we must check for GIMBAL_DEVICE_FLAGS_YAW_LOCK: if this one is set yaw will be relative to North, if this flag is not set - either, yaw will be relative to vehicle. +The [GIMBAL_DEVICE_ATTITUDE_STATUS.flags](#GIMBAL_DEVICE_ATTITUDE_STATUS) field must report the frame used for reported yaw values as **either**: -For manufacturers working on new devices, it is preferred to use GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME. But for -backwards compatibility GIMBAL_DEVICE_FLAGS_YAW_LOCK is also valid, and some systems could report their flags this way. +- `GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME`: Yaw is relative to vehicle. +- `GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME`: Yaw is relative to north. + +Older devices may use the deprecated `GIMBAL_DEVICE_FLAGS_YAW_LOCK` to indicate that the yaw is relative to north, and un-set to indicate that yaw is relative to the vehicle. +This should only be checked if the two flags above are not set! + +> **Note** Manufacturers working on new gimbal devices should set either `GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME` or `GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME`. +> Components recieving the message should also handle `GIMBAL_DEVICE_FLAGS_YAW_LOCK` for backwards compatibility with older devices. ## Message/Command/Enum Summary From ab2bf8ac734f91bbf5c3d3894ac26e5d9b9dbb96 Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Fri, 15 Mar 2024 13:21:28 +1100 Subject: [PATCH 3/3] Update en/services/gimbal_v2.md Co-authored-by: Julian Oes --- en/services/gimbal_v2.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/en/services/gimbal_v2.md b/en/services/gimbal_v2.md index 405508e10..8018c1c89 100644 --- a/en/services/gimbal_v2.md +++ b/en/services/gimbal_v2.md @@ -262,8 +262,8 @@ The [GIMBAL_DEVICE_ATTITUDE_STATUS.flags](#GIMBAL_DEVICE_ATTITUDE_STATUS) field - `GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME`: Yaw is relative to vehicle. - `GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME`: Yaw is relative to north. -Older devices may use the deprecated `GIMBAL_DEVICE_FLAGS_YAW_LOCK` to indicate that the yaw is relative to north, and un-set to indicate that yaw is relative to the vehicle. -This should only be checked if the two flags above are not set! +For older devices, if neither of the flags above are set, the yaw frame must be inferred from the `GIMBAL_DEVICE_FLAGS_YAW_LOCK`. +If it is set, the yaw is relative to North, otherwise to the front of the vehicle. > **Note** Manufacturers working on new gimbal devices should set either `GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME` or `GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME`. > Components recieving the message should also handle `GIMBAL_DEVICE_FLAGS_YAW_LOCK` for backwards compatibility with older devices.