From 361d66bb44b7adebe82606c616d56bd663e9d14b Mon Sep 17 00:00:00 2001 From: bresch Date: Mon, 15 Sep 2025 16:30:27 +0200 Subject: [PATCH] ekf2: add reporting of gnss_vel status flag --- msg/EstimatorStatus.msg | 3 ++- msg/EstimatorStatusFlags.msg | 1 + src/modules/ekf2/EKF2.cpp | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/msg/EstimatorStatus.msg b/msg/EstimatorStatus.msg index 3de2bfd722..b7933afdec 100644 --- a/msg/EstimatorStatus.msg +++ b/msg/EstimatorStatus.msg @@ -47,7 +47,8 @@ uint8 CS_SYNTHETIC_MAG_Z = 25 # 25 - true when we are using a synthesized measur uint8 CS_VEHICLE_AT_REST = 26 # 26 - true when the vehicle is at rest uint8 CS_GPS_YAW_FAULT = 27 # 27 - true when the GNSS heading has been declared faulty and is no longer being used uint8 CS_RNG_FAULT = 28 # 28 - true when the range finder has been declared faulty and is no longer being used -uint8 CS_GNSS_VEL = 44 # 44 - true if GNSS velocity measurements are being fused +uint8 CS_GNSS_VEL = 44 # 44 - true if GNSS velocity measurement fusion is intended +uint8 CS_GNSS_FAULT = 45 # 45 - true if GNSS measurements have been declared faulty and are no longer used uint32 filter_fault_flags # Bitmask to indicate EKF internal faults # 0 - true if the fusion of the magnetometer X-axis has encountered a numerical error diff --git a/msg/EstimatorStatusFlags.msg b/msg/EstimatorStatusFlags.msg index 8ab5b3d3e4..f22e2b727c 100644 --- a/msg/EstimatorStatusFlags.msg +++ b/msg/EstimatorStatusFlags.msg @@ -49,6 +49,7 @@ bool cs_valid_fake_pos # 41 - true if a valid constant position is bein bool cs_constant_pos # 42 - true if the vehicle is at a constant position bool cs_baro_fault # 43 - true when the current baro has been declared faulty and is no longer being used bool cs_gnss_vel # 44 - true if GNSS velocity measurement fusion is intended +bool cs_gnss_fault # 45 - true if GNSS measurements have been declared faulty and are no longer used # fault status uint32 fault_status_changes # number of filter fault status (fs) changes diff --git a/src/modules/ekf2/EKF2.cpp b/src/modules/ekf2/EKF2.cpp index 40b642c9b0..b40601bdd0 100644 --- a/src/modules/ekf2/EKF2.cpp +++ b/src/modules/ekf2/EKF2.cpp @@ -1935,6 +1935,7 @@ void EKF2::PublishStatusFlags(const hrt_abstime ×tamp) status_flags.cs_constant_pos = _ekf.control_status_flags().constant_pos; status_flags.cs_baro_fault = _ekf.control_status_flags().baro_fault; status_flags.cs_gnss_vel = _ekf.control_status_flags().gnss_vel; + status_flags.cs_gnss_fault = _ekf.control_status_flags().gnss_fault; status_flags.fault_status_changes = _filter_fault_status_changes; status_flags.fs_bad_mag_x = _ekf.fault_status_flags().bad_mag_x;