msgs: Clean up message definitions and descriptions

- Add versioning to interfacing messages
- Add header description
- Add units, frame and range wherever possible
- Add [norm] and @range indentifiers
This commit is contained in:
mahima-yoga
2025-05-26 14:47:38 +02:00
committed by Silvan Fuhrer
parent 8c1f7ec7c0
commit 8a5e5a411a
13 changed files with 73 additions and 47 deletions
@@ -0,0 +1,11 @@
# Fixed Wing Lateral Setpoint message
# Used by the fw_lateral_longitudinal_control module
# At least one of course, airspeed_direction, or lateral_acceleration must be finite.
uint32 MESSAGE_VERSION = 0
uint64 timestamp # time since system start (microseconds)
float32 course # [rad] [@range -pi, pi] Desired direction of travel over ground w.r.t (true) North. NAN if not controlled directly.
float32 airspeed_direction # [rad] [@range -pi, pi] Desired horizontal angle of airspeed vector w.r.t. (true) North. Same as vehicle heading if in the absence of sideslip. NAN if not controlled directly, takes precedence over course if finite.
float32 lateral_acceleration # [m/s^2] [FRD] Lateral acceleration setpoint. NAN if not controlled directly, used as feedforward if either course setpoint or airspeed_direction is finite.
@@ -0,0 +1,14 @@
# Fixed Wing Longitudinal Setpoint message
# Used by the fw_lateral_longitudinal_control module
# If pitch_direct and throttle_direct are not both finite, then the controller relies on altitude/height_rate and equivalent_airspeed to control vertical motion.
# If both altitude and height_rate are NAN, the controller maintains the current altitude.
uint32 MESSAGE_VERSION = 0
uint64 timestamp # time since system start (microseconds)
float32 altitude # [m] Altitude setpoint AMSL, not controlled directly if NAN or if height_rate is finite
float32 height_rate # [m/s] [ENU] Scalar height rate setpoint. NAN if not controlled directly
float32 equivalent_airspeed # [m/s] [@range 0, inf] Scalar equivalent airspeed setpoint. NAN if system default should be used
float32 pitch_direct # [rad] [@range -pi, pi] [FRD] NAN if not controlled, overrides total energy controller
float32 throttle_direct # [norm] [@range 0,1] NAN if not controlled, overrides total energy controller
@@ -0,0 +1,8 @@
# Fixed Wing Lateral Control Configuration message
# Used by the fw_lateral_longitudinal_control module to constrain FixedWingLateralSetpoint messages.
uint32 MESSAGE_VERSION = 0
uint64 timestamp # time since system start (microseconds)
float32 lateral_accel_max # [m/s^2] currently maps to a maximum roll angle, accel_max = tan(roll_max) * GRAVITY
@@ -0,0 +1,17 @@
# Fixed Wing Longitudinal Control Configuration message
# Used by the fw_lateral_longitudinal_control module and TECS to constrain FixedWingLongitudinalSetpoint messages
# and configure the resultant setpoints.
uint32 MESSAGE_VERSION = 0
uint64 timestamp # time since system start (microseconds)
float32 pitch_min # [rad][@range -pi, pi] defaults to FW_P_LIM_MIN if NAN.
float32 pitch_max # [rad][@range -pi, pi] defaults to FW_P_LIM_MAX if NAN.
float32 throttle_min # [norm] [@range 0,1] deaults to FW_THR_MIN if NAN.
float32 throttle_max # [norm] [@range 0,1] defaults to FW_THR_MAX if NAN.
float32 climb_rate_target # [m/s] target climbrate to change altitude. Defaults to FW_T_CLIMB_MAX if NAN. Not used if height_rate is directly set in FixedWingLongitudinalSetpoint.
float32 sink_rate_target # [m/s] target sinkrate to change altitude. Defaults to FW_T_SINK_MAX if NAN. Not used if height_rate is directly set in FixedWingLongitudinalSetpoint.
float32 speed_weight # [@range 0,2], 0=pitch controls altitude only, 2=pitch controls airspeed only
bool enforce_low_height_condition # [boolean] if true, the altitude controller is configured with an alternative timeconstant for tighter altitude tracking
bool disable_underspeed_protection # [boolean] if true, underspeed handling is disabled in the altitude controller