Skip to content

Commit

Permalink
Removed deprecated HeadingBias config in favor of GNSS aux lever arm.
Browse files Browse the repository at this point in the history
  • Loading branch information
adamshapiro0 committed Dec 4, 2024
1 parent 559d659 commit f24cd20
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 70 deletions.
32 changes: 10 additions & 22 deletions python/fusion_engine_client/messages/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -761,6 +749,14 @@ 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 (in meters).
"""
pass


@_conf_gen.create_config_class(ConfigType.OUTPUT_LEVER_ARM, _conf_gen.Point3FConstruct)
class OutputLeverArmConfig(_conf_gen.Point3F):
"""!
Expand Down Expand Up @@ -927,14 +923,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):
"""!
Expand Down
69 changes: 21 additions & 48 deletions src/point_one/fusion_engine/messages/configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 (in
* meters).
* The location of the primary GNSS antenna with respect to the vehicle body
* frame (in meters).
*
* Payload format: @ref Point3f
*/
Expand Down Expand Up @@ -101,11 +101,23 @@ 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 (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.
Expand Down Expand Up @@ -287,9 +299,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";

Expand Down Expand Up @@ -1213,48 +1228,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
Expand Down

0 comments on commit f24cd20

Please sign in to comment.