Skip to content

feat: DJI drone flight GPS track from the cached MCDat flight logs - #1088

Merged
abrignoni merged 1 commit into
mainfrom
feat/dji-drone-flight-logs
Aug 10, 2026
Merged

feat: DJI drone flight GPS track from the cached MCDat flight logs#1088
abrignoni merged 1 commit into
mainfrom
feat/dji-drone-flight-logs

Conversation

@abrignoni

Copy link
Copy Markdown
Owner

Adds an ALEAPP artifact that decodes the DJI flight-controller DAT logs the DJI GO / DJI Pilot apps cache on the mobile device under */DJI/<app>/FlightRecord/MCDatFlightRecords/*.DAT, and reports the recorded GPS track: one row per positional record with a UTC timestamp, latitude and longitude. Output is HTML + TSV + timeline + LAVA + KML, so the flight plots as a track on a map.

Format

The DAT container (0x55-framed records, length/type/ticket/CRC-16, record start at 256 with the DJI_LOG_V3 marker else 128, positional record type 2096 XOR-obfuscated by the ticket low byte then date/time/lon/lat as 1e7 integers) follows the DJI DAT format documented by the CsvView / DatCon community tooling. It is carried here from the closed contribution in #660, with @riasramadan credited as co-author.

Only the fields that decode to verifiable values are reported — timestamp, latitude, longitude. The rest of the payload carries further telemetry that is not decoded rather than guessed. The paired DJIFlightRecord *.txt files are a separate container whose positional records are encrypted from format version 11 on and are not recoverable offline, so this reads the DAT logs, which are not encrypted.

Validation (the reason this can land now)

Decoded against the VTO Labs / NIST CFReDS drone dataset DF020 (DJI Mavic Pro), newly added to the test corpus. From the two 2018-06-19 flight logs, 4,159 positions decode; 100% fall on the stated flight date and 99% inside the data sheet's stated Colorado GPS boundary (the handful outside are real neighbouring flight positions, not decode noise — a bad decode yields wild values, not adjacent coordinates). Full pipeline verified: 4,159 HTML/TSV rows and a 4,159-placemark KML track whose first point matches the ground-truth location.

This is the drone flight-log coverage that #660 and iLEAPP #1428 were closed for lacking data to validate. That data now exists in the corpus, so the parser is validated against known ground truth from day one.

🤖 Generated with Claude Code

Adds an ALEAPP artifact that decodes the DJI flight-controller DAT logs the
DJI GO / DJI Pilot apps cache under
*/DJI/<app>/FlightRecord/MCDatFlightRecords/*.DAT and reports the recorded
GPS track: one row per positional record with a UTC timestamp, latitude and
longitude, with HTML, TSV, timeline, LAVA and KML output so the track plots
on a map.

The DAT record framing (0x55 start byte, length, type, ticket number, CRC-16),
the record-start offset selection (256 with the DJI_LOG_V3 header marker, 128
otherwise) and the positional record layout (type 2096, payload XOR-obfuscated
by the low byte of the ticket number, then date/time/longitude/latitude as
1e7-scaled integers) follow the DJI DAT format documented by the CsvView /
DatCon community tooling, carried here from the closed contribution in PR #660
with @riasramadan credited.

Only the fields that decode to verifiable values are reported: timestamp,
latitude and longitude. The remaining payload bytes carry further telemetry
that is not decoded rather than guessed at. Positional records with no fix
(0,0) are dropped.

The DJIFlightRecord *.txt files in the same folder are a separate container
whose positional records are encrypted from format version 11 on and are not
recoverable offline; this artifact reads the DAT logs, which are not encrypted.

Validated against the VTO Labs / NIST CFReDS drone dataset DF020 (DJI Mavic
Pro): 4,159 positions decode from the two 2018-06-19 flight logs, every one on
the stated flight date and, bar a handful of edge points, inside the data
sheet's stated Colorado GPS boundary, so the timestamp and coordinate decoding
is corpus-verified against known ground truth. This is the drone flight-log
coverage that PR #660 and iLEAPP #1428 were closed for lacking test data to
validate; that data now exists in the corpus.

Co-Authored-By: riasramadan <143983266+riasramadan@users.noreply.github.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@abrignoni
abrignoni merged commit 3045f0e into main Aug 10, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant