// generated from rosidl_adapter/resource/msg.idl.em
// with input from px4_msgs/msg/EstimatorStatus.msg
// generated code does not contain a copyright notice


module px4_msgs {
  module msg {
    typedef float float__3[3];
    module EstimatorStatus_Constants {
      @verbatim (language="comment", text=
        "bits are true when corresponding test has failed" "\n"        "0 : insufficient fix type (no 3D solution)")
      const uint8 GPS_CHECK_FAIL_GPS_FIX = 0;
      @verbatim (language="comment", text=
        "1 : minimum required sat count fail")
      const uint8 GPS_CHECK_FAIL_MIN_SAT_COUNT = 1;
      @verbatim (language="comment", text=
        "2 : maximum allowed PDOP fail")
      const uint8 GPS_CHECK_FAIL_MAX_PDOP = 2;
      @verbatim (language="comment", text=
        "3 : maximum allowed horizontal position error fail")
      const uint8 GPS_CHECK_FAIL_MAX_HORZ_ERR = 3;
      @verbatim (language="comment", text=
        "4 : maximum allowed vertical position error fail")
      const uint8 GPS_CHECK_FAIL_MAX_VERT_ERR = 4;
      @verbatim (language="comment", text=
        "5 : maximum allowed speed error fail")
      const uint8 GPS_CHECK_FAIL_MAX_SPD_ERR = 5;
      @verbatim (language="comment", text=
        "6 : maximum allowed horizontal position drift fail - requires stationary vehicle")
      const uint8 GPS_CHECK_FAIL_MAX_HORZ_DRIFT = 6;
      @verbatim (language="comment", text=
        "7 : maximum allowed vertical position drift fail - requires stationary vehicle")
      const uint8 GPS_CHECK_FAIL_MAX_VERT_DRIFT = 7;
      @verbatim (language="comment", text=
        "8 : maximum allowed horizontal speed fail - requires stationary vehicle")
      const uint8 GPS_CHECK_FAIL_MAX_HORZ_SPD_ERR = 8;
      @verbatim (language="comment", text=
        "9 : maximum allowed vertical velocity discrepancy fail")
      const uint8 GPS_CHECK_FAIL_MAX_VERT_SPD_ERR = 9;
      @verbatim (language="comment", text=
        "0 - true if the filter tilt alignment is complete")
      const uint8 CS_TILT_ALIGN = 0;
      @verbatim (language="comment", text=
        "1 - true if the filter yaw alignment is complete")
      const uint8 CS_YAW_ALIGN = 1;
      @verbatim (language="comment", text=
        "2 - true if GPS measurements are being fused")
      const uint8 CS_GPS = 2;
      @verbatim (language="comment", text=
        "3 - true if optical flow measurements are being fused")
      const uint8 CS_OPT_FLOW = 3;
      @verbatim (language="comment", text=
        "4 - true if a simple magnetic yaw heading is being fused")
      const uint8 CS_MAG_HDG = 4;
      @verbatim (language="comment", text=
        "5 - true if 3-axis magnetometer measurement are being fused")
      const uint8 CS_MAG_3D = 5;
      @verbatim (language="comment", text=
        "6 - true if synthetic magnetic declination measurements are being fused")
      const uint8 CS_MAG_DEC = 6;
      @verbatim (language="comment", text=
        "7 - true when thought to be airborne")
      const uint8 CS_IN_AIR = 7;
      @verbatim (language="comment", text=
        "8 - true when wind velocity is being estimated")
      const uint8 CS_WIND = 8;
      @verbatim (language="comment", text=
        "9 - true when baro height is being fused as a primary height reference")
      const uint8 CS_BARO_HGT = 9;
      @verbatim (language="comment", text=
        "10 - true when range finder height is being fused as a primary height reference")
      const uint8 CS_RNG_HGT = 10;
      @verbatim (language="comment", text=
        "11 - true when GPS height is being fused as a primary height reference")
      const uint8 CS_GPS_HGT = 11;
      @verbatim (language="comment", text=
        "12 - true when local position data from external vision is being fused")
      const uint8 CS_EV_POS = 12;
      @verbatim (language="comment", text=
        "13 - true when yaw data from external vision measurements is being fused")
      const uint8 CS_EV_YAW = 13;
      @verbatim (language="comment", text=
        "14 - true when height data from external vision measurements is being fused")
      const uint8 CS_EV_HGT = 14;
      @verbatim (language="comment", text=
        "15 - true when synthetic sideslip measurements are being fused")
      const uint8 CS_BETA = 15;
      @verbatim (language="comment", text=
        "16 - true when only the magnetic field states are updated by the magnetometer")
      const uint8 CS_MAG_FIELD = 16;
      @verbatim (language="comment", text=
        "17 - true when thought to be operating as a fixed wing vehicle with constrained sideslip")
      const uint8 CS_FIXED_WING = 17;
      @verbatim (language="comment", text=
        "18 - true when the magnetometer has been declared faulty and is no longer being used")
      const uint8 CS_MAG_FAULT = 18;
      @verbatim (language="comment", text=
        "19 - true when airspeed measurements are being fused")
      const uint8 CS_ASPD = 19;
      @verbatim (language="comment", text=
        "20 - true when when protection from ground effect induced static pressure rise is active")
      const uint8 CS_GND_EFFECT = 20;
      @verbatim (language="comment", text=
        "21 - true when a stuck range finder sensor has been detected")
      const uint8 CS_RNG_STUCK = 21;
      @verbatim (language="comment", text=
        "22 - true when yaw (not ground course) data from a GPS receiver is being fused")
      const uint8 CS_GPS_YAW = 22;
      @verbatim (language="comment", text=
        "23 - true when the in-flight mag field alignment has been completed")
      const uint8 CS_MAG_ALIGNED = 23;
      @verbatim (language="comment", text=
        "24 - true when local frame velocity data fusion from external vision measurements is intended")
      const uint8 CS_EV_VEL = 24;
      @verbatim (language="comment", text=
        "25 - true when we are using a synthesized measurement for the magnetometer Z component")
      const uint8 CS_SYNTHETIC_MAG_Z = 25;
      @verbatim (language="comment", text=
        "26 - true when the vehicle is at rest")
      const uint8 CS_VEHICLE_AT_REST = 26;
      @verbatim (language="comment", text=
        "27 - true when the GNSS heading has been declared faulty and is no longer being used")
      const uint8 CS_GPS_YAW_FAULT = 27;
      @verbatim (language="comment", text=
        "28 - true when the range finder has been declared faulty and is no longer being used")
      const uint8 CS_RNG_FAULT = 28;
    };
    struct EstimatorStatus {
      @verbatim (language="comment", text=
        "time since system start (microseconds)")
      uint64 timestamp;

      @verbatim (language="comment", text=
        "the timestamp of the raw data (microseconds)")
      uint64 timestamp_sample;

      @verbatim (language="comment", text=
        "return a vector containing the output predictor angular, velocity and position tracking error magnitudes (rad), (m/s), (m)")
      float__3 output_tracking_error;

      @verbatim (language="comment", text=
        "Bitmask to indicate status of GPS checks - see definition below")
      uint16 gps_check_fail_flags;

      @verbatim (language="comment", text=
        "Bitmask to indicate EKF logic state")
      uint64 control_mode_flags;

      @verbatim (language="comment", text=
        "Bitmask to indicate EKF internal faults")
      uint32 filter_fault_flags;

      @verbatim (language="comment", text=
        "0 - true if the fusion of the magnetometer X-axis has encountered a numerical error" "\n"
        "1 - true if the fusion of the magnetometer Y-axis has encountered a numerical error" "\n"
        "2 - true if the fusion of the magnetometer Z-axis has encountered a numerical error" "\n"
        "3 - true if the fusion of the magnetic heading has encountered a numerical error" "\n"
        "4 - true if the fusion of the magnetic declination has encountered a numerical error" "\n"
        "5 - true if fusion of the airspeed has encountered a numerical error" "\n"
        "6 - true if fusion of the synthetic sideslip constraint has encountered a numerical error" "\n"
        "7 - true if fusion of the optical flow X axis has encountered a numerical error" "\n"
        "8 - true if fusion of the optical flow Y axis has encountered a numerical error" "\n"
        "9 - true if fusion of the North velocity has encountered a numerical error" "\n"
        "10 - true if fusion of the East velocity has encountered a numerical error" "\n"
        "11 - true if fusion of the Down velocity has encountered a numerical error" "\n"
        "12 - true if fusion of the North position has encountered a numerical error" "\n"
        "13 - true if fusion of the East position has encountered a numerical error" "\n"
        "14 - true if fusion of the Down position has encountered a numerical error" "\n"
        "15 - true if bad delta velocity bias estimates have been detected" "\n"
        "16 - true if bad vertical accelerometer data has been detected" "\n"
        "17 - true if delta velocity data contains clipping (asymmetric railing)" "\n"
        "1-Sigma estimated horizontal position accuracy relative to the estimators origin (m)")
      float pos_horiz_accuracy;

      @verbatim (language="comment", text=
        "1-Sigma estimated vertical position accuracy relative to the estimators origin (m)")
      float pos_vert_accuracy;

      @verbatim (language="comment", text=
        "Bitmask to indicate pass/fail status of innovation consistency checks")
      uint16 innovation_check_flags;

      @verbatim (language="comment", text=
        "0 - true if velocity observations have been rejected" "\n"
        "1 - true if horizontal position observations have been rejected" "\n"
        "2 - true if true if vertical position observations have been rejected" "\n"
        "3 - true if the X magnetometer observation has been rejected" "\n"
        "4 - true if the Y magnetometer observation has been rejected" "\n"
        "5 - true if the Z magnetometer observation has been rejected" "\n"
        "6 - true if the yaw observation has been rejected" "\n"
        "7 - true if the airspeed observation has been rejected" "\n"
        "8 - true if the synthetic sideslip observation has been rejected" "\n"
        "9 - true if the height above ground observation has been rejected" "\n"
        "10 - true if the X optical flow observation has been rejected" "\n"
        "11 - true if the Y optical flow observation has been rejected" "\n"
        "ratio of the largest magnetometer innovation component to the innovation test limit")
      float mag_test_ratio;

      @verbatim (language="comment", text=
        "ratio of the largest velocity innovation component to the innovation test limit")
      float vel_test_ratio;

      @verbatim (language="comment", text=
        "ratio of the largest horizontal position innovation component to the innovation test limit")
      float pos_test_ratio;

      @verbatim (language="comment", text=
        "ratio of the vertical position innovation to the innovation test limit")
      float hgt_test_ratio;

      @verbatim (language="comment", text=
        "ratio of the true airspeed innovation to the innovation test limit")
      float tas_test_ratio;

      @verbatim (language="comment", text=
        "ratio of the height above ground innovation to the innovation test limit")
      float hagl_test_ratio;

      @verbatim (language="comment", text=
        "ratio of the synthetic sideslip innovation to the innovation test limit")
      float beta_test_ratio;

      @verbatim (language="comment", text=
        "Bitmask indicating which filter kinematic state outputs are valid for flight control use.")
      uint16 solution_status_flags;

      @verbatim (language="comment", text=
        "0 - True if the attitude estimate is good" "\n"
        "1 - True if the horizontal velocity estimate is good" "\n"
        "2 - True if the vertical velocity estimate is good" "\n"
        "3 - True if the horizontal position (relative) estimate is good" "\n"
        "4 - True if the horizontal position (absolute) estimate is good" "\n"
        "5 - True if the vertical position (absolute) estimate is good" "\n"
        "6 - True if the vertical position (above ground) estimate is good" "\n"
        "7 - True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)" "\n"
        "8 - True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate" "\n"
        "9 - True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate" "\n"
        "10 - True if the EKF has detected a GPS glitch" "\n"
        "11 - True if the EKF has detected bad accelerometer data" "\n"
        "number of horizontal position reset events (allow to wrap if count exceeds 255)")
      uint8 reset_count_vel_ne;

      @verbatim (language="comment", text=
        "number of vertical velocity reset events (allow to wrap if count exceeds 255)")
      uint8 reset_count_vel_d;

      @verbatim (language="comment", text=
        "number of horizontal position reset events (allow to wrap if count exceeds 255)")
      uint8 reset_count_pos_ne;

      @verbatim (language="comment", text=
        "number of vertical position reset events (allow to wrap if count exceeds 255)")
      uint8 reset_count_pod_d;

      @verbatim (language="comment", text=
        "number of quaternion reset events (allow to wrap if count exceeds 255)")
      uint8 reset_count_quat;

      @verbatim (language="comment", text=
        "cumulative amount of time in seconds that the EKF inertial calculation has slipped relative to system time")
      float time_slip;

      boolean pre_flt_fail_innov_heading;

      boolean pre_flt_fail_innov_vel_horiz;

      boolean pre_flt_fail_innov_vel_vert;

      boolean pre_flt_fail_innov_height;

      boolean pre_flt_fail_mag_field_disturbed;

      uint32 accel_device_id;

      uint32 gyro_device_id;

      uint32 baro_device_id;

      uint32 mag_device_id;

      @verbatim (language="comment", text=
        "legacy local position estimator (LPE) flags" "\n"
        "Bitmask to indicate sensor health states (vel, pos, hgt)")
      uint8 health_flags;

      @verbatim (language="comment", text=
        "Bitmask to indicate timeout flags (vel, pos, hgt)")
      uint8 timeout_flags;

      float mag_inclination_deg;

      float mag_inclination_ref_deg;

      float mag_strength_gs;

      float mag_strength_ref_gs;
    };
  };
};
