<!-- $Id$ -->
<!-- ublox UBX Binary Protocol description -->

<!DOCTYPE ubx SYSTEM "ubx.dtd">

<ubx>

  <msg_class name="NAV" ID="0x01">

    <message name="POSLLH" ID="0x02" length="28">
      <field name="ITOW" format="U4" unit="ms"/>
      <field name="LON" format="I4" scaling="1e-7" unit="deg"/>
      <field name="LAT" format="I4" scaling="1e-7" unit="deg"/>
      <field name="HEIGHT" format="I4" unit="mm"/>
      <field name="HMSL" format="I4" unit="mm"/>
      <field name="Hacc" format="U4" unit="mm"/>
      <field name="Vacc" format="U4" unit="mm"/>
    </message>

    <message name="DOP" ID="0x04" length="18">
      <field name="ITOW" format="U4" unit="ms"/>
      <field name="GDOP" format="U2"/>
      <field name="PDOP" format="U2"/>
      <field name="TDOP" format="U2"/>
      <field name="VDOP" format="U2"/>
      <field name="HDOP" format="U2"/>
      <field name="NDOP" format="U2"/>
      <field name="EDOP" format="U2"/>
    </message>

    <message name="SOL" ID="0x06" length="52">
      <field name="ITOW" format="U4" unit="ms"/>
      <field name="Frac" format="I4" unit="ns"/>
      <field name="week" format="I2"/>
      <field name="GPSfix" format="U1"/>
      <field name="Flags" format="U1"/>
      <field name="ECEF_X" format="I4" unit="cm"/>
      <field name="ECEF_Y" format="I4" unit="cm"/>
      <field name="ECEF_Z" format="I4" unit="cm"/>
      <field name="Pacc" format="U4"/>
      <field name="ECEFVX" format="I4" unit="cm/s"/>
      <field name="ECEFVY" format="I4" unit="cm/s"/>
      <field name="ECEFVZ" format="I4" unit="cm/s"/>
      <field name="Sacc" format="U4"/>
      <field name="PDOP" format="U2"/>
      <field name="res1" format="U1"/>
      <field name="numSV" format="U1"/>
      <field name="res2" format="U4"/>
    </message>

    <message name="POSUTM" ID="0x08" length="18">
      <field name="ITOW" format="U4" unit="ms"/>
      <field name="EAST" format="I4" unit="cm"/>
      <field name="NORTH" format="I4" unit="cm"/>
      <field name="ALT" format="I4" unit="cm"/>
      <field name="ZONE" format="I1"/>
      <field name="HEM" format="I1"/>
    </message>

    <message name="STATUS" ID="0x03" length="16">
      <field name="ITOW" format="U4" unit="ms"/>
      <field name="GPSfix" format="U1"/>
      <field name="Flags" format="U1"/>
      <field name="DiffS" format="U1"/>
      <field name="res" format="U1"/>
      <field name="TTFF" format="U4"/>
      <field name="MSSS" format="U4"/>
    </message>

    <message name="VELNED" ID="0x12" length="36">
      <field name="ITOW" format="U4" unit="ms"/>
      <field name="VEL_N" format="I4" unit="cm/s"/>
      <field name="VEL_E" format="I4" unit="cm/s"/>
      <field name="VEL_D" format="I4" unit="cm/s"/>
      <field name="Speed" format="U4" unit="cm/s"/>
      <field name="GSpeed" format="U4" unit="cm/s"/>
      <field name="Heading" format="I4" scaling="1e-5" unit="deg"/>
      <field name="SAcc" format="U4" unit="cm/s"/>
      <field name="CAcc" format="U4" scaling="1e-5" unit="deg"/>
    </message>

    <message name="SVINFO" ID="0x30">
      <field name="ITOW" format="U4" unit="ms"/>
      <field name="NCH" format="U1"/>
      <field name="RES1" format="U1"/>
      <field name="RES2" format="U2"/>
      <block times="NCH" length="12">
        <field name="chn" format="U1"/>
        <field name="SVID" format="U1"/>
        <field name="Flags" format="U1"/>
        <field name="QI" format="I1"/>
        <field name="CNO" format="U1" unit="dbHz"/>
        <field name="Elev" format="I1" unit="deg"/>
        <field name="Azim" format="I2" unit="deg"/>
        <field name="PRRes" format="I4" unit="cm"/>
      </block>
    </message>

    <message name="HPPOSECEF" ID="0x13" length="28">
      <field name="VERSION" format="U1"/>
      <field name="RES1" format="U2"/>
      <field name="RES2" format="U1"/>
      <field name="ITOW" format="U4" unit="ms"/>
      <field name="ECEF_X" format="I4" unit="cm"/>
      <field name="ECEF_Y" format="I4" unit="cm"/>
      <field name="ECEF_Z" format="I4" unit="cm"/>
      <field name="ECEF_XHP" format="I1" scaling="1e-1" unit="mm"/>
      <field name="ECEF_YHP" format="I1" scaling="1e-1" unit="mm"/>
      <field name="ECEF_ZHP" format="I1" scaling="1e-1" unit="mm"/>
      <field name="RES3" format="U1"/>
      <field name="Pacc" format="U4" scaling="1e-1" unit="mm"/>
    </message>

    <message name="HPPOSLLH" ID="0x14" length="36">
      <field name="VERSION" format="U1"/>
      <field name="RES1" format="U2"/>
      <field name="RES2" format="U1"/>
      <field name="ITOW" format="U4" unit="ms"/>
      <field name="LON" format="I4" scaling="1e-7" unit="deg"/>
      <field name="LAT" format="I4" scaling="1e-7" unit="deg"/>
      <field name="HEIGHT" format="I4" unit="mm"/>
      <field name="HMSL" format="I4" unit="mm"/>
      <field name="LONHP" format="I1" scaling="1e-9" unit="deg"/>
      <field name="LATHP" format="I1" scaling="1e-9" unit="deg"/>
      <field name="HEIGHTHP" format="I1" scaling="1e-1" unit="mm"/>
      <field name="HMSLHP" format="I1" scaling="1e-1" unit="mm"/>
      <field name="Hacc" format="U4" scaling="1e-1" unit="mm"/>
      <field name="Vacc" format="U4" scaling="1e-1" unit="mm"/>
    </message>

    <message name="RELPOSNED" ID="0x3C" length="40">
      <field name="VERSION" format="U1"/>
      <field name="RES1" format="U1"/>
      <field name="refStationId" format="U2"/>
      <field name="ITOW" format="U4" unit="ms"/>
      <field name="RELPOSN" format="I4" unit="cm"/>
      <field name="RELPOSE" format="I4" unit="cm"/>
      <field name="RELPOSD" format="I4" unit="cm"/>
      <field name="RELPOSNHP" format="I1" scaling="1e-1" unit="mm"/>
      <field name="RELPOSEHP" format="I1" scaling="1e-1" unit="mm"/>
      <field name="RELPOSDHP" format="I1" scaling="1e-1" unit="mm"/>
      <field name="RES2" format="U1"/>
      <field name="Nacc" format="U4" scaling="1e-1" unit="mm"/>
      <field name="Eacc" format="U4" scaling="1e-1" unit="mm"/>
      <field name="Dacc" format="U4" scaling="1e-1" unit="mm"/>
      <field name="Flags" format="U4"/>
    </message>

    <message name="SVIN" ID="0x3B" length="40">
      <field name="VERSION" format="U1" />
      <field name="RES1" format="U1" />
      <field name="RES2" format="U2" />
      <field name="ITOW" format="U4" unit="ms" />
      <field name="dur" format="U4" unit="s" />
      <field name="meanX" format="I4" unit="cm" />
      <field name="meanY" format="I4" unit="cm" />
      <field name="meanZ" format="I4" unit="cm" />
      <field name="meanXHP" format="I1" scaling="1e-1" unit="cm" />
      <field name="meanYHP" format="I1" scaling="1e-1" unit="cm" />
      <field name="meanZHP" format="I1" scaling="1e-1" unit="cm" />
      <field name="RES3" format="U1" />
      <field name="meanACC" format="U4" scaling="1e-1" unit="mm" />
      <field name="OBS" format="U4" />
      <field name="Valid" format="U1" />
      <field name="Active" format="U1" />
      <field name="RES4" format="U2" />
    </message>


  </msg_class>

  <msg_class name="CFG" ID="0x06">

    <message name="PRT" ID="0x00">
      <block length="20">
        <field name="PortId" format="U1"/>
        <field name="ReS0" format="U1"/>
        <field name="ReS1" format="U2"/>
        <field name="Mode" format="U4"/>
        <field name="Baudrate" format="U4"/>
        <field name="In_proto_mask" format="U2"/>
        <field name="Out_proto_mask" format="U2"/>
        <field name="Flags" format="U2"/>
        <field name="Res2" format="U2"/>
      </block>
    </message>

    <message name="PRT_POLL" ID="0x00" length="0">
    </message>

    <message name="MSG" ID="0x01" length="3">
      <field name="Class" format="U1"/>
      <field name="MsgId" format="U1"/>
      <field name="Rate" format="U1"/>
    </message>

    <message name="NAV" ID="0x03" length="28">
      <field name="Platform" format="U1"/>
      <field name="MinSvs" format="U1"/>
      <field name="MaxSvs" format="U1"/>
      <field name="MinCN0" format="U1"/>
      <field name="AbsCN0" format="U1"/>
      <field name="MinELE" format="U1"/>
      <field name="DGPSTTR" format="U1"/>
      <field name="DGPST0" format="U1"/>
      <field name="PRCAGE" format="U1"/>
      <field name="CPCAGE" format="U1"/>
      <field name="MinCLT" format="U2"/>
      <field name="AbsCLT" format="U2"/>
      <field name="MaxDR" format="U1"/>
      <field name="NAVOPT" format="U1"/>
      <field name="PDOP" format="U2"/>
      <field name="TDOP" format="U2"/>
      <field name="PACC" format="U2"/>
      <field name="TACC" format="U2"/>
      <field name="FACC" format="U2"/>
      <field name="StaticThres" format="U1"/>
      <field name="reserved" format="U1"/>
    </message>

    <message name="RST" ID="0x04" length="4">
      <field name="nav_bbr" format="U2"/>
      <field name="Reset" format="U1"/>
      <field name="Res" format="U1"/>
    </message>

    <message name="RATE" ID="0x08" length="6">
      <field name="Meas" format="U2"/>
      <field name="Nav" format="U2"/>
      <field name="Time" format="U2"/>
    </message>

    <message name="CFG" ID="0x09" length="12">
      <field name="Clear_mask" format="U4"/>
      <field name="Save_mask" format="U4"/>
      <field name="Load_mask" format="U4"/>
    </message>

    <message name="SBAS" ID="0x16">
      <field name="mode" format="U1"/>
      <field name="usage" format="U1"/>
      <field name="maxbas" format="U1"/>
      <field name="reserved" format="U1"/>
      <field name="scanmode" format="U4"/>
    </message>

    <message name="NAV5" ID="0x24" length="36">
      <field name="mask"   format="U2"/>
      <field name="dynModel" format="U1"/>
      <field name="fixModel" format="U1"/>
      <field name="fixedAlt" format="I4"/>
      <field name="fixedAltVar" format="U4"/>
      <field name="minElev" format="I1"/>
      <field name="drLimit" format="U1"/>
      <field name="dDop" format="U2"/>
      <field name="tDop" format="U2"/>
      <field name="pAcc" format="U2"/>
      <field name="tAcc" format="U2"/>
      <field name="staticHoldThresh" format="U1"/>
      <field name="res1" format="U1"/>
      <field name="res2" format="U4"/>
      <field name="res3" format="U4"/>
      <field name="res4" format="U4"/>
    </message>

    <message name="NAV5_HPG" ID="0x24" length="36">
      <field name="mask"   format="U2"/>
      <field name="dynModel" format="U1"/>
      <field name="fixModel" format="U1"/>
      <field name="fixedAlt" format="I4"/>
      <field name="fixedAltVar" format="U4"/>
      <field name="minElev" format="I1"/>
      <field name="drLimit" format="U1"/>
      <field name="dDop" format="U2"/>
      <field name="tDop" format="U2"/>
      <field name="pAcc" format="U2"/>
      <field name="tAcc" format="U2"/>
      <field name="staticHoldThresh" format="U1"/>
      <field name="dgnssTimeout" format="U1" unit="s"/>
      <field name="cnoThreshNumSVs" format="U1"/>
      <field name="cnoThresh" format="U1" unit="dBHz"/>
      <field name="res1" format="U2"/>
      <field name="staticHoldMaxDist" format="U2" unit="m"/>
      <field name="utcStandard" format="U1"/>
      <field name="res2" format="U4"/>
      <field name="res3" format="U1"/>
    </message>

    <message name="DGNSS" ID="0x70" length="4">
      <field name="dgnssMode" format="U1"/>
      <field name="RES1" format="U2"/>
      <field name="RES2" format="U1"/>
    </message>

    <message name="TMODE3" ID="0x71" length="40">
      <field name="version"   format="U1"/>
      <field name="RES1"      format="U1"/>
      <field name="flags" format="U2"/>
      <field name="EcecfXOrLat" format="I4"/>
      <field name="EcecfYOrLon" format="I4"/>
      <field name="EcecfZOrAlt" format="I4" unit="cm"/>
      <field name="EcecfXOrLatHP" format="I1"/>
      <field name="EcecfYOrLonHP" format="I1"/>
      <field name="EcecfZOrAltHP" format="I1" scaling="1e-1" unit="mm" />
      <field name="RES2" format="U1"/>
      <field name="FixedPosACC" format="U4" scaling="1e-1" unit="mm"/>
      <field name="SvinMinDur" format="U4"  unit="s" />
      <field name="SvinAcclimit" format="U4" scaling="1e-1" unit="mm" />
      <field name="RES3" format="U4"/>
      <field name="RES4" format="U4"/>
    </message>

  </msg_class>

  <msg_class name="ACK" ID="0x05">

    <message name="ACK" ID="0x01" length="2">
      <field name="ClsID" format="U1"/>
      <field name="MsgID" format="U1"/>
    </message>

    <message name="NAK" ID="0x00" length="2">
      <field name="ClsID" format="U1"/>
      <field name="MsgID" format="U1"/>
    </message>

  </msg_class>

  <msg_class name="RXM" ID="0x02">

<!--
Only available with raw data product variant.
This message contains all information needed to be able to generate a RINEX observation
file.
This message outputs pseudorange, doppler and carrier phase measurements for GPS
satellites once signals have been synchronised. No other GNSS types are currently
supported.
-->
    <message name="RAW" ID="0x10">
      <field name="iTOW" format="I4" unit="ms"/>
      <field name="week" format="I2" unit="weeks"/>
      <field name="numSV" format="U1"/>
      <field name="reserverd1" format="U1"/>
      <block length="24">
        <field name="cpMes" format="R8" unit="cycles"/>
        <field name="prMes" format="R8" unit="m"/>
        <field name="doMes" format="R4" unit="Hz"/>
        <field name="sv" format="U1"/>
        <field name="mesQI" format="I1"/>
        <field name="cno" format="I1" unit="dbHz"/>
        <field name="lli" format="U1"/>
      </block>
    </message>

    <message name="SFRB" ID="0x11" length="42">
      <field name="chn" format="U1"/>
      <field name="svid" format="U1"/>
      <field name="dwrd0" format="U4"/>
      <field name="dwrd1" format="U4"/>
      <field name="dwrd2" format="U4"/>
      <field name="dwrd3" format="U4"/>
      <field name="dwrd4" format="U4"/>
      <field name="dwrd5" format="U4"/>
      <field name="dwrd6" format="U4"/>
      <field name="dwrd7" format="U4"/>
      <field name="dwrd8" format="U4"/>
      <field name="dwrd9" format="U4"/>
    </message>

    <message name="RTCM" ID="0x32" length="8">
      <field name="version" format="U1"/>
      <field name="flags" format="U1"/>
      <field name="reserved1" format="U2"/>
      <field name="refStation" format="U2"/>
      <field name="msgType" format="U2"/>
    </message>

  </msg_class>

  <msg_class name="MON" ID="0x0A">

    <message name="GET_VER" ID="0x04" length="0">
    </message>

    <message name="VER" ID="0x04">
      <block length="1">
        <field name="c" format="U1"/>
      </block>
    </message>

  </msg_class>

</ubx>
