gps-wizard

Proposal for GPY v1.1

Overview

The ESP GPS is gaining popularity and it would be great if the GPY format were to offer more flexible logging.

The following items have proven to be very useful when investigating GPS data quality.

This proposal for GPY 1.1 introduces the concept of “minimal” type definitions, building upon the existing 0xE0 and 0xD0 frames. The concept also ensures forward and backward compatibility of any future GPY enhancements, without being overly complicated.

New Record Types

It is perhaps easiest to describe the GPY 1.1 concepts using examples.

Forward and Backward Compatibility

The “minimal” type definition uses the idea of inheritance and extending base types.

On-and-On (OAO)

It may also be worth adding the remaining OAO fields in GPY 1.1.

Size Comparisons

How the new frame sizes compare to existing the existing GPY, OAO, and UBX.

Anyone doing GNSS investigations may require the use of 0xE1 + 0xD1 or 0xE2 + 0xD2.

Frame Definitions

The following tables may help to clarify the concepts within the GPY 1.1 proposal.

Header Frame

The header frame (0xF0) contains information about the device and its GNSS configuration.

Name Type Units Scale Description
id u1 - - Type identifier (xF0)
flags u1 - - Flags (default 0)
length u2 - - Length (0x004C)
deviceDescription u1 * 16 - - e.g. ESP-GPS
deviceName u1 * 16 - - e.g. K888
serialNumber u1 * 16 - - e.g. 8B61FC1ADB0
firmwareVersion u1 * 16 - - e.g. V 6.05beta
chipsetName u1 * 16 - - e.g. u-blox M10
chipsetVersion u1 * 16 - - e.g. ROM SPG 5.10
signals u2 - - GNSS signals
maxSats u1 - - e.g. 28
sampleRate u1 Hz - e.g. 10 Hz
checksum u2 - - Checksum (u-blox Fletcher)

Notes:

The inclusion of signals, maxSats, and sampleRate is primarily for the ESP GPS, additional to the TXT file.

Record Type Definition

The type definition frames (0xF1) provide the information ensuring forward and backward compatibility.

Name Type Units Scale Description
id u1 - - Type identifier (xE0)
flags u1 - - Flags (default 0)
length u2 - - Length (0x00A0)
typeId u1 - - Record type id (e.g. 0xE1)
baseId u1 - - Base type id (e.g. 0xE0)
payload u2 - - Payload length (excludes type, flags, checksum)
checksum u2 - - Checksum (u-blox Fletcher)

Notes:

GNSS PVT Frame (uncompressed)

The uncompressed / reference frames come in 3 flavours:

The table below shows how they all share a common structure.

Name Type Units Scale Description 0xE0 0xE1 0xE2
id u1 - - Type identifier (xE0)
flags u1 - - Flags (default 0)
hdop u2 - 1 x 10-2 Horizontal Dilution of Precision (HDOP)
dateTime u8 ms - Unix time
speed u4 m/s 1 x 10-3 Speed Over Ground (SOG)
speedErr u4 m/s 1 x 10-3 Speed error (SDOP / SDOS / sAcc)
latitude i4 deg 1 x 10-7 Latitude
longitude i4 deg 1 x 10-7 Longitude
course i4 deg 1 x 10-5 Course Over Ground (COG)
numSats u1 - - Number of satellites
fixType u1 - - GPS fix (0 = none, 2 = 2D, 3 = 3D fix)
heightMsl i4 m 1 x 10-3 Height above Mean Sea Level
horizontalErr u4 m 1 x 10-3 Horizontal error
verticalErr u4 m 1 x 10-3 Vertical error
courseErr u4 deg 1 x 10-5 Course over ground error
checksum u2 - - Checksum (u-blox Fletcher)
        Total bytes 36 44 52

Notes:

GNSS PVT Frame (compressed)

The compressed / delta frames come in 3 flavours:

The table below shows how they all share a common structure.

Name Type Units Scale Description 0xD0 0xD1 0xD2
id u1 - - Type identifier (xD0)
flags u1 - - Flags (default 0)
hdop u2 - 1 x 10-2 Horizontal Dilution of Precision (HDOP)
timeDelta i2 ms - Delta time
speedDelta i2 m/s 1 x 10-3 Speed Over Ground (SOG)
speedErrDelta i2 m/s 1 x 10-3 Speed error (SDOP / SDOS / sAcc)
latitudeDelta i2 deg 1 x 10-7 Latitude
longitudeDelta i2 deg 1 x 10-7 Longitude
courseDelta i2 deg 1 x 10-2 Course Over Ground (COG)
numSats u1 - - Number of satellites
fixType u1 - - GPS fix (0 = none, 2 = 2D, 3 = 3D fix)
heightMslDelta i2 m 1 x 10-3 Height above Mean Sea Level
horizontalErrDelta i2 m 1 x 10-3 Horizontal error
verticalErrDelta i2 m 1 x 10-3 Vertical error
courseErr u2 deg 1 x 10-2 Course Over Ground error (scaled)
checksum u2 - - Checksum (u-blox Fletcher)
        Total bytes 20 24 28

Notes:

Implementation

A few initial thoughts about the work required:

Once implemented, further GPY enhancements should be possible without impacting existing applications.

Summary

This proposal aims to enhance GPY in a way that is pragmatic, and not overly complicated.

The main concept introduced into GPY is the “minimal” type definition (0xF1).

Some thoughts about altitude / elevation, which is often useful when diagnosing issues.

Various other items are in UBX-NAV-PVT, but they are rarely required for speed sailing.