<?xml version="1.0"?>
<!DOCTYPE protocol SYSTEM "abi.dtd">
<protocol>

  <msg_class name="airborne">

    <message name="BARO_ABS" id="0">
      <field name="pressure" type="float" unit="Pa"/>
    </message>

    <message name="BARO_DIFF" id="1">
      <field name="pressure" type="float" unit="Pa"/>
    </message>

    <message name="AGL" id="2">
      <field name="distance" type="float" unit="m"/>
    </message>

    <message name="TEMPERATURE" id="3">
      <field name="temp" type="float" unit="deg Celcius"/>
    </message>

    <message name="IMU_GYRO_INT32" id="4">
      <field name="stamp" type="uint32_t" unit="us"/>
      <field name="gyro" type="struct Int32Rates *"/>
    </message>

    <message name="IMU_ACCEL_INT32" id="5">
      <field name="stamp" type="uint32_t" unit="us"/>
      <field name="accel" type="struct Int32Vect3 *"/>
    </message>

    <message name="IMU_MAG_INT32" id="6">
      <field name="stamp" type="uint32_t" unit="us"/>
      <field name="mag" type="struct Int32Vect3 *"/>
    </message>

    <message name="IMU_LOWPASSED" id="7">
      <field name="stamp" type="uint32_t" unit="us"/>
      <field name="gyro" type="struct Int32Rates *"/>
      <field name="accel" type="struct Int32Vect3 *"/>
      <field name="mag" type="struct Int32Vect3 *"/>
    </message>

    <message name="BODY_TO_IMU_QUAT" id="8">
      <field name="q_b2i_f" type="struct FloatQuat *"/>
    </message>

    <message name="GEO_MAG" id="9">
      <field name="h" type="struct FloatVect3 *" unit="1.0"/>
    </message>

    <message name="GPS" id="10">
      <field name="stamp" type="uint32_t" unit="us"/>
      <field name="gps_s" type="struct GpsState *"/>
    </message>

    <message name="OPTICAL_FLOW" id="11">
      <field name="stamp" type="uint32_t" unit="us"/>
      <field name="flow_x" type="int16_t">Flow in x direction from the camera (in subpixels)</field>
      <field name="flow_y" type="int16_t">Flow in y direction from the camera (in subpixels)</field>
      <field name="flow_der_x" type="int16_t">The derotated flow calculation in the x direction (in subpixels)</field>
      <field name="flow_der_y" type="int16_t">The derotated flow calculation in the y direction (in subpixels)</field>
      <field name="quality" type="float"/>
      <field name="size_divergence" type="float">Divergence as determined with the size method (in 1/seconds) with LK, and Divergence (1/seconds) itself with EF</field>
    </message>

    <message name="VELOCITY_ESTIMATE" id="12">
      <field name="stamp" type="uint32_t" unit="us"/>
      <field name="x" type="float" unit="m/s"/>
      <field name="y" type="float" unit="m/s"/>
      <field name="z" type="float" unit="m/s"/>
      <field name="noise" type="float"/>
    </message>

    <message name="RSSI" id="13">
      <field name="ac_id" type="uint8_t"/>
      <field name="source_strength" type="int8_t" unit="dB"/>
      <field name="rssi" type="int8_t" unit="dB"/>
    </message>

    <message name="AIRSPEED" id="14">
      <field name="eas" type="float" unit="m/s"/>
    </message>

    <message name="RPM" id="15">
      <field name="rpm" type="uint16_t *" unit="rpm"/>
      <field name="num_act" type="uint8_t"/>
    </message>

    <message name="THRUST" id="16">
      <field name="thrust_increment" type="float" unit="m/s^2"/>
    </message>

    <message name="OBSTACLE_DETECTION" id="17">
      <field name="distance_obstacle" type="float" unit="m"/>
      <field name="relative_heading" type="float" unit="rad"/>
    </message>

    <message name="POSITION_ESTIMATE" id="18">
      <field name="stamp" type="uint32_t" unit="us"/>
      <field name="x" type="float" unit="m"/>
      <field name="y" type="float" unit="m"/>
      <field name="z" type="float" unit="m"/>
      <field name="noise" type="float"/>
    </message>
    
    <message name="UWB_COMMUNICATION" id="19">
      <field name="id" type="uint8_t"/>
      <field name="range" type="float" unit="m"/>
      <field name="vx" type="float" unit="m/s"/>
      <field name="vy" type="float" unit="m/s"/>
      <field name="h" type="float" unit="m"/>
    </message>

  </msg_class>

</protocol>
