This is a follow up to the previous document which explained how the META field has been used to pass extended callsign and text data, in addition to the existing callsign and voice data. This document should be read in conjunction with the previous document.
For GPS data the Encryption Type is 0b00 as per the other types of extended META data, and the Encryption Subtype is set to 0b01. Unlike the other forms of data previously documented, this data is expected to be dynamic during the course of a transmission and to be transmitted quickly after the GPS data becomes available. To stop the LSF data stream from being overrun with GPS data relative to other data types, a throttle on the amount of GPS data transmitted is needed. The M17 Client sends GPS data every five seconds, for example.
The GPS data fits within one META field, which equates to six audio frames, and takes 240ms to transmit.
For this description C/C++ style array nomenclature is used. The META field is referred to as an array named meta and with an index of 0 referring to the first byte of that array, and therefore the first byte of the META field.
meta is the software/hardware used to generate this GPS data. The current defined values are 0x00 for the M17 Client, and 0x01 for OpenRTX, other hardware and software will be added as they become available. This is used to modify the message added to the APRS message sent to APRS-IS.
meta is the type of station that transmitted the data. 0x00 is for a fixed station, 0x01 is for a mobile station, and 0x02 for a handheld. These are translated into suitable APRS symbols when gated to APRS-IS.
The latitude and longitude are encoded as positive values with their ranges set to +90 to -90 for the latitude, and +180 to -180 for the longitude. The sign i.e. North/South and East/West are encoded separately.
meta is the whole number of degrees of latitude.
meta and meta are the decimal degrees of latitude multiplied by 65535, and stored with the MSB first.
meta is the whole number of degrees of longitude.
meta and meta are the decimal degrees of longitude multiplied by 65535, and stored with the MSB first.
If the latitude is south of the equator then meta is ORed with 0x01. If the longitude is west of the Greenwich meridian then meta is ORed with 0x02.
If altitude data is available from the GPS device then meta and meta contain the whole number of feet above sea level plus 1500 to always make it a positive number. This value is stored MSB first. The reason for using feet is two fold, firstly this is what APRS-IS expects, and secondly there are a little over three feet per metre, and so an integer number of feet gives finer granularity than metres in this context. meta is ORed with 0x04 to indicate that valid altitude data is available.
If speed and bearing data is available from the GPS device then meta and meta contain the whole number of degrees of the bearing which is expected to be between 0 and 360 degrees. This value is stored MSB first. The speed if converted to miles-per-hour and the integer value is stored in meta. The reason for using mps is this is what APRS-IS expects. meta is ORed with 0x08 to indicate that valid speed and bearing data is available.
This is a simple format of the GPS data and doesn’t require too much work to convert into, and provides enough flexibility for most cases. This has been tested on-air and successfully gated to APRS-IS, showing a location very close to the position reported by the GPS receiver.