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


module px4_msgs {
  module msg {
    typedef float float__2[2];
    module VehicleLocalPosition_Constants {
      const uint8 DIST_BOTTOM_SENSOR_NONE = 0;
      @verbatim (language="comment", text=
        "(1 << 0) a range sensor is used to estimate dist_bottom field")
      const uint8 DIST_BOTTOM_SENSOR_RANGE = 1;
      @verbatim (language="comment", text=
        "(1 << 1) a flow sensor is used to estimate dist_bottom field (mostly fixed-wing use case)")
      const uint8 DIST_BOTTOM_SENSOR_FLOW = 2;
    };
    @verbatim (language="comment", text=
      "Fused local position in NED." "\n"
      "The coordinate system origin is the vehicle position at the time when the EKF2-module was started.")
    struct VehicleLocalPosition {
      @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=
        "true if x and y are valid")
      boolean xy_valid;

      @verbatim (language="comment", text=
        "true if z is valid")
      boolean z_valid;

      @verbatim (language="comment", text=
        "true if vx and vy are valid")
      boolean v_xy_valid;

      @verbatim (language="comment", text=
        "true if vz is valid")
      boolean v_z_valid;

      @verbatim (language="comment", text=
        "Position in local NED frame" "\n"
        "North position in NED earth-fixed frame, (metres)")
      float x;

      @verbatim (language="comment", text=
        "East position in NED earth-fixed frame, (metres)")
      float y;

      @verbatim (language="comment", text=
        "Down position (negative altitude) in NED earth-fixed frame, (metres)")
      float z;

      @verbatim (language="comment", text=
        "Position reset delta" "\n"
        "Amount of lateral shift of position estimate in latest reset (in x and y)")
      @unit (value="m")
      float__2 delta_xy;

      @verbatim (language="comment", text=
        "Index of latest lateral position estimate reset")
      uint8 xy_reset_counter;

      @verbatim (language="comment", text=
        "Amount of vertical shift of position estimate in latest reset")
      @unit (value="m")
      float delta_z;

      @verbatim (language="comment", text=
        "Index of latest vertical position estimate reset")
      uint8 z_reset_counter;

      @verbatim (language="comment", text=
        "Velocity in NED frame" "\n"
        "North velocity in NED earth-fixed frame, (metres/sec)")
      float vx;

      @verbatim (language="comment", text=
        "East velocity in NED earth-fixed frame, (metres/sec)")
      float vy;

      @verbatim (language="comment", text=
        "Down velocity in NED earth-fixed frame, (metres/sec)")
      float vz;

      @verbatim (language="comment", text=
        "Down position time derivative in NED earth-fixed frame, (metres/sec)")
      float z_deriv;

      @verbatim (language="comment", text=
        "Velocity reset delta" "\n"
        "Amount of lateral shift of velocity estimate in latest reset (in x and y)")
      @unit (value="m/s")
      float__2 delta_vxy;

      @verbatim (language="comment", text=
        "Index of latest vertical velocity estimate reset")
      uint8 vxy_reset_counter;

      @verbatim (language="comment", text=
        "Amount of vertical shift of velocity estimate in latest reset")
      @unit (value="m/s")
      float delta_vz;

      @verbatim (language="comment", text=
        "Index of latest vertical velocity estimate reset")
      uint8 vz_reset_counter;

      @verbatim (language="comment", text=
        "Acceleration in NED frame" "\n"
        "North velocity derivative in NED earth-fixed frame, (metres/sec^2)")
      float ax;

      @verbatim (language="comment", text=
        "East velocity derivative in NED earth-fixed frame, (metres/sec^2)")
      float ay;

      @verbatim (language="comment", text=
        "Down velocity derivative in NED earth-fixed frame, (metres/sec^2)")
      float az;

      @verbatim (language="comment", text=
        "Euler yaw angle transforming the tangent plane relative to NED earth-fixed frame, -PI..+PI,  (radians)")
      float heading;

      float heading_var;

      @verbatim (language="comment", text=
        "Same as heading but generated by integrating corrected gyro data only")
      float unaided_heading;

      @verbatim (language="comment", text=
        "Heading delta caused by latest heading reset")
      @unit (value="rad")
      float delta_heading;

      @verbatim (language="comment", text=
        "Index of latest heading reset")
      uint8 heading_reset_counter;

      boolean heading_good_for_control;

      float tilt_var;

      @verbatim (language="comment", text=
        "Position of reference point (local NED frame origin) in global (GPS / WGS84) frame" "\n"
        "true if position (x, y) has a valid global reference (ref_lat, ref_lon)")
      boolean xy_global;

      @verbatim (language="comment", text=
        "true if z has a valid global reference (ref_alt)")
      boolean z_global;

      @verbatim (language="comment", text=
        "Time when reference position was set since system start, (microseconds)")
      uint64 ref_timestamp;

      @verbatim (language="comment", text=
        "Reference point latitude, (degrees)")
      double ref_lat;

      @verbatim (language="comment", text=
        "Reference point longitude, (degrees)")
      double ref_lon;

      @verbatim (language="comment", text=
        "Reference altitude AMSL, (metres)")
      float ref_alt;

      @verbatim (language="comment", text=
        "Distance to surface" "\n"
        "Distance from from bottom surface to ground, (metres)")
      float dist_bottom;

      @verbatim (language="comment", text=
        "true if distance to bottom surface is valid")
      boolean dist_bottom_valid;

      @verbatim (language="comment", text=
        "bitfield indicating what type of sensor is used to estimate dist_bottom")
      uint8 dist_bottom_sensor_bitfield;

      @verbatim (language="comment", text=
        "Standard deviation of horizontal position error, (metres)")
      float eph;

      @verbatim (language="comment", text=
        "Standard deviation of vertical position error, (metres)")
      float epv;

      @verbatim (language="comment", text=
        "Standard deviation of horizontal velocity error, (metres/sec)")
      float evh;

      @verbatim (language="comment", text=
        "Standard deviation of vertical velocity error, (metres/sec)")
      float evv;

      @verbatim (language="comment", text=
        "True if this position is estimated through dead-reckoning")
      boolean dead_reckoning;

      @verbatim (language="comment", text=
        "estimator specified vehicle limits" "\n"
        "maximum horizontal speed - set to 0 when limiting not required (meters/sec)")
      float vxy_max;

      @verbatim (language="comment", text=
        "maximum vertical speed - set to 0 when limiting not required (meters/sec)")
      float vz_max;

      @verbatim (language="comment", text=
        "minimum height above ground level - set to 0 when limiting not required (meters)")
      float hagl_min;

      @verbatim (language="comment", text=
        "maximum height above ground level - set to 0 when limiting not required (meters)")
      float hagl_max;
    };
  };
};
