GpsTelemetry (Draft)¶
Overview¶
Draft
GpsTelemetry is draft and subject to change.
This is the structure and behavior of GpsTelemetry in Extended Telemetry
This message carries GPS telemetry.
A GPS Location Lock is required to send this message.
Headline Improvement
- No more
RegularType1+BasicTelemetrymessage usage required when combined withTrackerTelemetry- Trackers can now fly unlimited channels, no longer limited to 5
- More efficient use of bitspace and airtime
Improved Data Ranges
- Improves altitude and speed range compared to legacy telemetry use
- Carries coarse global location Extended Telemetry message (
TrackerTelemetryrefines precision of location)
| Data | Notes |
|---|---|
| Location | Improved accuracy over 4-char maidenhead grid using square global cells |
| Speed | Improved range 0 - 310 MPH from BasicTelemetry max of 95 MPH(No more location-based high-speed estimating) |
Message Structure¶
The header, as explained in Header Fields, explains the whole message header structure.
The fields below are for when the HdrType indicates a GpsTelemetry message.
The GpsTelemetry message makes use of both Uniform and Segmented Field Encoding
Segmented fields are described in more detail below the message definition table.
The structure of the GpsTelemetry fields
| Field | Unit | LowValue | HighValue | StepSize | # Values |
|---|---|---|---|---|---|
| Latitude | Idx | 0 | 126 | 1 | 127 |
| Longitude | Idx | 0 | 253 | 1 | 254 |
| Altitude | Ft | 0 | 65,000 | [segmented] | 426 |
| Speed | MPH | 0 | 310 | [segmented] | 44 |
Field LatitudeIdx and LongitudeIdx¶
LatitudeIdx and LongitudeIdx values
They are not Maidenhead grid values. They divide the world into square regions with accuracy better than 4-char maidenhead grid.
These fields divide the globe into 127 latitude bins and 254 longitude bins:
127latitude bins (cell height =180 / 127degrees)254longitude bins (cell width =360 / 254degrees)
| Scheme | Cell Size | Lat Worst Error | Lng Worst Error | Worst-case Diagonal Error |
|---|---|---|---|---|
| 4-char Maidenhead | 138 mi × 69 mi | 34.5 mi | 69 mi | 77 mi |
| 127×254 global grid | 97.8 mi × 97.8 mi | 48.9 mi | 48.9 mi | 69 mi |
When paired with TrackerTelemetry location enhancements, precision is refined beyond 6-char maidenhead grid
Encoding¶
Encoding steps
### Step 1: Get actual GPS location in decimal degrees
// real gps full location in degrees
gpsLatDeg = 40.742... // whatever it is in full
gpsLngDeg = -70.032... // whatever it is in full
### Step 2: Convert the world to zero-based offsets
// shift latitude from [-90, +90) to [0, 180)
latWorldOffsetDeg = gpsLatDeg + 90
// shift longitude from [-180, +180) to [0, 360)
lngWorldOffsetDeg = gpsLngDeg + 180
### Step 3: Divide by the GT cell size and floor into bins
latIdxValueCount = 127
lngIdxValueCount = 254
latCellHeightDeg = 180 / latIdxValueCount
lngCellWidthDeg = 360 / lngIdxValueCount
latIdx = floor(latWorldOffsetDeg / latCellHeightDeg)
lngIdx = floor(lngWorldOffsetDeg / lngCellWidthDeg)
### Step 4: Decode by reversing back to the cell center
south = -90 + (latIdx * latCellHeightDeg)
west = -180 + (lngIdx * lngCellWidthDeg)
decodedLat = south + (latCellHeightDeg / 2)
decodedLng = west + (lngCellWidthDeg / 2)
Example
Suppose the GPS fix is:
lat = 40.742lng = -70.032
Then:
latWorldOffsetDeg = 130.742lngWorldOffsetDeg = 109.968latCellHeightDeg = 180 / 127 = 1.4173228346...lngCellWidthDeg = 360 / 254 = 1.4173228346...
So:
latIdx = floor(130.742 / 1.4173228346...) = 92lngIdx = floor(109.968 / 1.4173228346...) = 77
And decoding those cell indexes gives the center of that GT cell:
decodedLat ~= 41.102decodedLng ~= -70.866
Field Altitude¶
A segmented field, so variable resolution within the range of values.
AltitudeFt segments
| Range | Resolution | Description |
|---|---|---|
0 - 6,000 ft |
75 ft |
Precise for close-to-ground observations |
6,000 - 10,000 ft |
200 ft |
Less precise as heading to float |
10,000 - 27,000 ft |
250 ft |
Heading to float |
27,000 - 30,000 ft |
200 ft |
Beginning of float range |
30,000 - 36,000 ft |
150 ft |
Starting common float range |
36,000 - 45,000 ft |
75 ft |
Common float range |
45,000 - 54,000 ft |
150 ft |
Uncommonly-high float region |
54,000 - 65,000 ft |
500 ft |
Extremely uncommon region with broad visibility only |
Field SpeedMPH¶
A segmented field, so variable resolution within the range of values.
SpeedMPH segments
| Range | Resolution | Description |
|---|---|---|
0 - 100 MPH |
5 MPH |
Lower-speed region |
100 - 170 MPH |
7 MPH |
Mid-speed region |
170 - 250 MPH |
10 MPH |
Upper-speed region |
250 - 310 MPH |
12 MPH |
Extreme-speed region with broader resolution |
When this message can be sent¶
Send under numerous conditions
Suggested behavior is to be sent along with the TrackerTelemetry message as part of a 2-message pair within a window.
It can be sent any number of times in any Extended Telemetry slot.