Skip to content

HighResLocation - HdrType=2

Overview

This is the structure and behavior of HighResLocation (HdrType=2) in Extended Telemetry

This message carries a high-resolution GPS location.

This should not be sent when there is no GPS Location lock

Message Structure

The header, as explained in Header Fields explains the whole message header structure.

The fields below are for when the HdrType=2 indicating a HighResLocation message.

Link to Playground

The structure of the HighResLocation fields

Field Unit LowValue HighValue StepSize # Values
Reference Enum 0 1 1 2
Latitude Idx 0 12352 1 12353
Longitude Idx 0 24617 1 24618

Field ReferenceEnum

ReferenceEnum values

  • 0 = Reserved reference.
  • 1 = Reference prior 4-char Maidenhead Grid value, increases accuracy to +/- 15 ft / 4 meters.

Field LatitudeIdx and LongitudeIdx values

These are not maidenhead grid values!

The 4-char Maidenhead Grid defines a rectangle with a spacial resolution

  • 2 deg x 1 deg box (Longitude x Latitude)
  • About 138 mi x 69 mi at equator (222 km x 111 km)

The LatitudeIdx and LongitudeIdx values divide the grid into evenly-sized squares

The Longitude and Latitude Idx resolve at a 2:1 ratio.

This divides that maidenhead grid rectangle into sub-division squares (each with equal side lengths).

That is, this refinement divides the 4-char Maidenhead grid into:

  • 24,618 longitude bins
  • 12,353 latitude bins

Approximate cell size at equator: 29 ft / 9 meters
Approximate resolution at equator: +/- 15 ft / 4 meters

Encoding

Encoding steps

### Step 1: Get actual GPS location in decimal degrees (not minutes/seconds/etc)

// 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 Maidenhead to bounding box

- Determine the GPS coordinates of the maidenhead grid
- not the center of the box, but the lower-left corner as defined by Maidenhead
- this gets you lat/lng in decimal degrees (eg FN20 = 40.0, -76.0)

// lower-left corner of 4-char maidenhead grid (calculate this)
llLatDeg =  40.0
llLngDeg = -76.0


### Step 3: Calculate how many segments up/right to go into that bounding box

// note -- each 4-char Maidenhead cell is 1 degree latitude and 2 degrees longitude.

// first, what's the difference in degrees?
latDegDiff = gpsLatDeg - llLatDeg   // will be less than 1 degree
lngDegDiff = gpsLngDeg - llLngDeg   // will be less than 2 degrees

// now, how many ticks into the outer bounding box is that?
latIdx = floor(latDegDiff * 12353 / 1)
lngIdx = floor(lngDegDiff * 24618 / 2)


// voila you have it

When this message can be sent

Send whenever

Slots 2, 3, 4, 5 in the same window that the referenced 4-char Maidenhead grid is found in.

Ok to send in multiple slots in the same window (ie with new or repeated location).

If the 4-char grid changes (eg with new location) it is not appropriate to send the new refinement as it no longer references an established 4-char grid. Re-sending old refinements are ok in that scenario.