From bf2733e6d6b69f22d7d3bb782698d8648e503a46 Mon Sep 17 00:00:00 2001 From: Adam Shapiro Date: Tue, 3 Dec 2024 16:52:47 -0500 Subject: [PATCH] Removed deprecated HeadingBias config in favor of GNSS aux lever arm. --- .../messages/configuration.py | 37 ++++------ .../fusion_engine/messages/configuration.h | 70 ++++++------------- 2 files changed, 35 insertions(+), 72 deletions(-) diff --git a/python/fusion_engine_client/messages/configuration.py b/python/fusion_engine_client/messages/configuration.py index d6b9cf5c..b74500d7 100644 --- a/python/fusion_engine_client/messages/configuration.py +++ b/python/fusion_engine_client/messages/configuration.py @@ -30,7 +30,8 @@ class ConfigType(IntEnum): VEHICLE_DETAILS = 20 WHEEL_CONFIG = 21 HARDWARE_TICK_CONFIG = 22 - HEADING_BIAS = 23 + DEPRECATED_HEADING_BIAS = 23 + GNSS_AUX_LEVER_ARM = 24 ENABLED_GNSS_SYSTEMS = 50 ENABLED_GNSS_FREQUENCY_BANDS = 51 LEAP_SECOND = 52 @@ -654,19 +655,6 @@ class HardwareTickConfig(NamedTuple): "wheel_ticks_to_m" / Float32l, ) - class HeadingBias(NamedTuple): - """! - @brief Horizontal and vertical heading bias configuration settings. - """ - horizontal_bias_deg: float = math.nan - vertical_bias_deg: float = math.nan - - - HeadingBiasConstruct = Struct( - "horizontal_bias_deg" / Float32l, - "vertical_bias_deg" / Float32l, - ) - class IonosphereConfig(NamedTuple): """! @brief Ionospheric delay model configuration. @@ -754,8 +742,8 @@ class DeviceLeverArmConfig(_conf_gen.Point3F): @_conf_gen.create_config_class(ConfigType.GNSS_LEVER_ARM, _conf_gen.Point3FConstruct) class GNSSLeverArmConfig(_conf_gen.Point3F): """! - @brief The location of the GNSS antenna with respect to the vehicle body frame, resolved in the vehicle body frame - (in meters). + @brief The location of the primary GNSS antenna with respect to the vehicle body frame, resolved in the vehicle body + frame (in meters). """ pass @@ -763,6 +751,15 @@ class GNSSLeverArmConfig(_conf_gen.Point3F): GnssLeverArmConfig = GNSSLeverArmConfig +@_conf_gen.create_config_class(ConfigType.GNSS_AUX_LEVER_ARM, _conf_gen.Point3FConstruct) +class GNSSAuxLeverArmConfig(_conf_gen.Point3F): + """! + @brief The location of the secondary GNSS antenna with respect to the vehicle body frame on a dual-antenna platform, + resolved in the vehicle body frame (in meters). + """ + pass + + @_conf_gen.create_config_class(ConfigType.OUTPUT_LEVER_ARM, _conf_gen.Point3FConstruct) class OutputLeverArmConfig(_conf_gen.Point3F): """! @@ -930,14 +927,6 @@ class HardwareTickConfig(_conf_gen.HardwareTickConfig): pass -@_conf_gen.create_config_class(ConfigType.HEADING_BIAS, _conf_gen.HeadingBiasConstruct) -class HeadingBias(_conf_gen.HeadingBias): - """! - @brief Horizontal and vertical heading bias. - """ - pass - - @_conf_gen.create_interface_config_class(InterfaceConfigType.BAUD_RATE, _conf_gen.UInt32Construct) class InterfaceBaudRateConfig(_conf_gen.IntegerVal): """! diff --git a/src/point_one/fusion_engine/messages/configuration.h b/src/point_one/fusion_engine/messages/configuration.h index c074bd2d..f8668136 100644 --- a/src/point_one/fusion_engine/messages/configuration.h +++ b/src/point_one/fusion_engine/messages/configuration.h @@ -53,8 +53,8 @@ enum class ConfigType : uint16_t { DEVICE_COARSE_ORIENTATION = 17, /** - * The location of the GNSS antenna with respect to the vehicle body frame, - * resolved in the vehicle body frame (in meters). + * The location of the primary GNSS antenna with respect to the vehicle body + * frame, resolved in the vehicle body frame (in meters). * * Payload format: @ref Point3f */ @@ -101,11 +101,24 @@ enum class ConfigType : uint16_t { /** * Used to set horizontal (yaw) & vertical (pitch) biases (in degrees) on - * a dual-antenna heading platform configuration. + * a dual-antenna heading platform configuration (deprecated). * - * Payload format: @ref HeadingBias + * @deprecated + * Use @ref ConfigType::GNSS_AUX_LEVER_ARM instead. */ - HEADING_BIAS = 23, + DEPRECATED_HEADING_BIAS = 23, + + /** + * The location of the secondary GNSS antenna with respect to the vehicle body + * frame on a dual-antenna platform, resolved in the vehicle body frame (in + * meters). + * + * For dual-antenna systems, the secondary or auxiliary antenna is used to + * measure vehicle yaw and pitch. + * + * Payload format: @ref Point3f + */ + GNSS_AUX_LEVER_ARM = 24, /** * A bitmask indicating which GNSS constellations are enabled. @@ -287,9 +300,12 @@ P1_CONSTEXPR_FUNC const char* to_string(ConfigType type) { case ConfigType::HARDWARE_TICK_CONFIG: return "Hardware Tick Config"; - case ConfigType::HEADING_BIAS: + case ConfigType::DEPRECATED_HEADING_BIAS: return "Heading Bias"; + case ConfigType::GNSS_AUX_LEVER_ARM: + return "GNSS Aux Lever Arm"; + case ConfigType::ENABLED_GNSS_SYSTEMS: return "Enabled GNSS Systems"; @@ -1213,48 +1229,6 @@ struct P1_ALIGNAS(4) HardwareTickConfig { float wheel_ticks_to_m = NAN; }; -/** - * @brief Heading bias horizontal/vertical configuration settings. - * @ingroup config_types - * - * @note - * Both HeadingBias values must be set for the system to use them. - * If one value is NOT set, the system will not output the corrected - * heading message. - * - * @ref GNSSAttitudeOutput - */ -struct P1_ALIGNAS(4) HeadingBias { - /** - * The offset between the heading measured by a secondary GNSS device and the - * vehicle's direction of motion in the horizontal plane (defined by the - * vehicle's forward and left axes). - * - * Bias is defined as the angle between the vector pointing from the primary - * GNSS antenna to the secondary heading antenna, and the vector pointing from - * the primary antenna pointing in the forward direction of the vehicle. A - * positive angle means the secondary antenna is offset in a counter-clockwise - * direction from the forward vector (positive yaw rotation). - * - * For example, if the primary antenna is in the back of the vehicle and the - * secondary antenna is in the front, a positive angle would indicate that the - * secondary antenna is offset to the left side of the vehicle. - */ - float horizontal_bias_deg = NAN; - - /** - * The offset between the heading measured by a secondary GNSS device and the - * vehicle's direction of motion in the vertical plane (defined by the - * vehicle's forward and up axes). - * - * A positive angle means the secondary antenna is offset in the downward - * direction. For example, if the primary antenna is in the back of the - * vehicle and the secondary antenna is in the front, a positive angle would - * indicate that the secondary antenna is mounted below the primary antenna. - */ - float vertical_bias_deg = NAN; -}; - /** * @brief The ionospheric delay model to use. * @ingroup config_types