Skip to content

jbirby/globalsat-dg388-gpl-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GlobalSat DG-388 .gpl File Parser

The first open-source decoder for the GlobalSat DG-388 GPS data logger's proprietary .gpl binary format.

The DG-388 stores track logs as .gpl files on USB mass storage, but no public documentation or open-source tools exist to read them — until now. This parser was built by reverse-engineering the binary format and validating every field against the official GlobalSat PC-tool exports (CSV, GPX, KML). It decodes all seven data fields in the 28-byte record structure, including the previously undocumented heading and waypoint-flag fields.

What it does

Converts .gpl binary files into CSV or GPX format using only the Python 3 standard library (no dependencies to install).

Quick start

# Convert to CSV (default)
python gpl_to_csv.py yourfile.gpl

# Specify output filename
python gpl_to_csv.py yourfile.gpl output.csv

# Convert to GPX instead
python gpl_to_csv.py yourfile.gpl output.gpx

# Batch convert everything in a folder
for f in *.gpl; do python gpl_to_csv.py "$f"; done

The .gpl binary format

Each .gpl file is a sequence of fixed 28-byte records with no file header. All fields are little-endian.

Offset Size Type Field Encoding
0–3 4 int32 Date YYYYMMDD integer (e.g. 20240511)
4–7 4 int32 Time (UTC) HHMMSS integer (e.g. 142654 = 14:26:54Z)
8–11 4 int32 Latitude 1×10⁻⁷ degrees, signed (negative = South)
12–15 4 int32 Longitude 1×10⁻⁷ degrees, signed (negative = West)
16–19 4 int32 Altitude Decimeters above MSL (÷ 10 for meters)
20–23 4 int32 Speed km/h × 100 (÷ 100 for km/h)
24–25 2 uint16 Heading Degrees × 100 (÷ 100 for 0.00–359.99°)
26–27 2 uint16 Record flag 2 = auto log, 3 = manual waypoint button

Key details

  • Time is UTC, not local. The GlobalSat PC tool converts to local time for CSV display, but the binary stores UTC (confirmed against GPX exports which use a Z suffix).
  • Altitude comes before speed (offsets 16 and 20) — the opposite of what the CSV column order suggests.
  • Bytes 24–27 are two packed uint16 values, not a single uint32. The low word is heading/course-over-ground. The high word is a record-type flag: 2 for automatic logging, 3 for the DG-388's manual "1-click record" button.
  • Coordinates use 1×10⁻⁷ degree precision (~1.1 cm), the same convention used by FIT files and modern GNSS chipsets.
  • The DG-388 uses the Airoha AG3335M multi-GNSS receiver (GPS, Galileo, BeiDou, GLONASS, QZSS).

CSV output format

Date,Time (UTC),Latitude,Longitude,Altitude (m),Speed (km/h),Heading (deg),Record Type
2024-05-11,14:26:54,34.4006688,-78.7109056,1039.1,158.88,19.78,auto
2024-05-11,14:26:56,34.4013344,-78.7106240,1032.1,160.38,20.45,auto

GPX output format

Manual waypoints are written as <wpt> elements. Automatic track points go into a <trk>/<trkseg> with speed and heading in <extensions>.

Validation

The parser was verified against GlobalSat's own PC-tool exports from a Cessna 150 flight log:

  • 7,130 timestamp-matched records: altitude error = 0.00 m, speed error = 0.00 km/h
  • Latitude matches to the full 1×10⁻⁷ degree precision (the PC tool rounds to 6 decimal places in CSV)
  • Heading values confirmed against calculated bearing between consecutive GPS points (typical deviation < 2°, consistent with GPS course-over-ground smoothing)
  • Pre-allocated/empty .gpl files handled gracefully (0 records output)

How the format was decoded

No documentation exists for the .gpl format. The field mapping was determined by:

  1. Parsing the raw 28-byte records as little-endian int32 values
  2. Cross-referencing each field against the GlobalSat PC tool's CSV, GPX, and KML exports of the same data
  3. Confirming the heading field against the .gsx export (which stores heading as a double-precision float) and against calculated bearings between consecutive GPS points
  4. Identifying the record-type flag by finding the single flag=3 record that corresponded to a manual waypoint button press while the aircraft was stationary

The older DG-100 and DG-200 models used a completely different architecture (USB-to-serial with a proprietary protocol). The DG-388's USB mass storage approach and .gpl format share no compatibility with those earlier devices.

Requirements

Python 3.6 or later. No third-party packages needed.

Claude Skill

A Claude Code / Cowork skill is also included — install it and Claude can parse .gpl files for you automatically

License

MIT

About

The first open-source decoder for the GlobalSat DG-388 GPS data logger's proprietary `.gpl` binary format.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages