feat: DJI drone flight GPS track from the cached MCDat flight logs - #1088
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_V3marker 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 *.txtfiles 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