Skip to content

Commit

Permalink
AP_NavEKF: add enumeration to document EKF SolutionStatus
Browse files Browse the repository at this point in the history
this isn't used for anything but documenting the solution status field, which can be used in the Wiki and in various log analysis tools
  • Loading branch information
peterbarker committed Oct 20, 2024
1 parent 264d69b commit 5f122e6
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions libraries/AP_NavEKF/AP_Nav_Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,30 @@
#include <stdint.h>
#include <AP_Math/AP_Math.h>

// enumeration corresponding to buts within nav_filter_status union.
// Only used for documentation purposes.
enum class NavFilterStatusBit {
ATTITUDE = 0, // 0 - true if attitude estimate is valid
HORIZ_VEL = 1, // 1 - true if horizontal velocity estimate is valid
VERT_VEL = 2, // 2 - true if the vertical velocity estimate is valid
HORIZ_POS_REL = 3, // 3 - true if the relative horizontal position estimate is valid
VERT_POS_REL = 4, // 4 - true if the absolute horizontal position estimate is valid
VERT_POS = 5, // 5 - true if the vertical position estimate is valid
TERRAIN_ALT = 6, // 6 - true if the terrain height estimate is valid
CONST_POS_MODE = 7, // 7 - true if we are in const position mode
PRED_HORIZ_POS_REL = 8, // 8 - true if filter expects it can produce a good relative horizontal position estimate - used before takeoff
PRED_HORIZ_POS_ABS = 9, // 9 - true if filter expects it can produce a good absolute horizontal position estimate - used before takeoff
TAKEOFF_DETECTED = 10, // 10 - true if optical flow takeoff has been detected
TAKEOFF_EXPECTED = 11, // 11 - true if filter is compensating for baro errors during takeoff
TOUCHDOWN_EXPECTED = 12, // 12 - true if filter is compensating for baro errors during touchdown
USING_GPS = 13, // 13 - true if we are using GPS position
GPS_GLITCHING = 14, // 14 - true if GPS glitching is affecting navigation accuracy
GPS_QUALITY_GOOD = 15, // 15 - true if we can use GPS for navigation
INITALIZED = 16, // 16 - true if the EKF has ever been healthy
REJECTING_AIRSPEED = 17, // 17 - true if we are rejecting airspeed data
DEAD_RECKONING = 18, // 18 - true if we are dead reckoning (e.g. no position or velocity source)
};

union nav_filter_status {
struct {
bool attitude : 1; // 0 - true if attitude estimate is valid
Expand Down

0 comments on commit 5f122e6

Please sign in to comment.