Repository navigation
Add BMW NBT navigation trails and trips - #403
Conversation
Decode original NBT navigation stores through the artifact framework. Include reproducible synthetic fixtures, POSIX baselines and corruption, time, WAL and multi-unit controls. Co-Authored-By: OpenAI Codex (GPT-6) <[email protected]>
abrignoni
left a comment
There was a problem hiding this comment.
Thanks for this. The parser is careful work and the synthetic fixture is a nice touch. I rebuilt the test data with make_bmw_nbt_fixture.py and it matches the committed zips. The test cases pass, the two-unit run doubles exactly and the .bak decoy stays out. So the code side looks good to me.
Most of what follows is about the text an examiner reads. That text ends up quoted in reports, so it has to say no more than the code and the data can back up.
Needs to change before merge
- Please drop the
sample_datablock from all three artifacts. Those keys have to match an entry in our sample registry so the row counts can be re-run, and a private casework extraction can't go in there. A key plus a row count also points back at that case. Keep the make, model and year in the notes ("worked out on one 2017 BMW 540i NBT unit") and that covers it.
Labels and notes
Distance Along Trail (as stored): the code only knows the value rises along the trail, and the notes say it has no established meaning or unit. The header shouldn't name one. Something likeRising Value (as stored)fits.Driver IDs (as stored): the column shows a list decoded from the blob, with hex as a fallback, so it isn't as stored.Driver IDsis enough, with a note that the count-prefixed layout is inferred.Local Time (as recorded): it's the begin local time plus the record offset, so it's derived.Local Time (no zone)or similar.- The iVe divisor (11,930,466): there's no source for it in the PR, and 2^32/360 is 11,930,464.7. I'd drop the number and just say the stored integers are kept so the scaling can be checked against other tools.
- The coordinate scaling, the begin/end columns read as Unix seconds UTC, and the time record read as milliseconds are all inferred from one unit. Please say "inferred" in the notes for each.
- "Tested on one unit", "Path Decoded was uniformly Yes", "were uniform", "LinkToTripIndexTiles was empty" and "trip positions repeat trail positions" all describe one private extraction nobody else can re-run. Please scope them as "on the one unit examined" and skip "tested". Simpler is fine too: cut the ones an examiner can't act on. The notes are long right now.
One question
Positions after the last time record take that record's time when the blob decodes cleanly. What did you see on the unit that supports that? If it came from the iVe comparison, that works for me, but I'd like to know, because an examiner will read that Timestamp as the time the vehicle was at that spot. If it's not clear, blank is the safer call, the same as you already do for a broken blob.
Small one
bmw_nbt_trail_points and bmw_nbt_trails each decode trails.sqlite on their own, so every decode failure gets logged twice. Not a blocker.
Once these are in I'm happy to merge. Thanks again.
Remove private registry references, refine labels and shorten report notes. Require a following clock record for each position time and refresh tests and baseline snapshots. Prepared locally for original-author review. Co-Authored-By: OpenAI Codex (GPT-6) <[email protected]>
|
Thanks, Alexis! I've pushed the changes. The sample_data blocks are gone, the three labels are updated, and I've shortened the notes. I also removed the iVe divisor and made it clear which interpretations were inferred from that one unit. You were right to ask about the trailing timestamps. I went back through the unit and the earlier comparison. That comparison matched the points iVe reported, but it didn't establish a time for positions after the final time record. I couldn't back up carrying the last time forward, so I've removed that step. Those positions are still in the output with their coordinates and source details; their UTC and local times are now blank. A cleanly decoded blob doesn't, by itself, tell us when those positions were recorded. I've updated the baselines and added tests for that behavior. Locally, all 852 tests and all 11 regression cases pass on Python 3.11 and 3.14. The two-unit run still doubles exactly, and the .bak decoy stays out. I left the duplicate failure logging unchanged for now. |
Mark the local-time epoch as inferred, say that an unlisted tag stops the decode, describe position counts and first/last positions as decoded, describe DriverIds as a decoded list, and say the fixture schema was copied from the unit. Co-Authored-By: Claude Opus 5.5 <[email protected]>
abrignoni
left a comment
There was a problem hiding this comment.
Thanks for the quick turnaround. I pushed a small wording pass on the notes on top of your changes. Merging.
What this changes
Adds BMW NBT navigation trail points, trail summaries and trip summaries from the original
nav/trails.sqliteandnav/trips.sqlitestores. GPS points use the standard HTML, TSV, LAVA, timeline and KML outputs. Existing BMW MGU modules cover different stores.For a new or changed artifact
Anything reviewers should know
The format, coordinate scaling and time interpretations were inferred on one 2017 BMW 540i NBT unit. Other hardware/software versions remain unverified. Stored coordinate integers remain available for comparison with other tools.
Only a following time record supplies a position's derived UTC and unzoned local time. Positions after the final time record remain untimed, including in a cleanly decoded blob. Positions and their raw coordinate integers are retained. Zero/invalid dates and other unestablished times are blank. Undocumented codes and units remain labelled as stored; Driver IDs describes an inferred count-prefixed list with hex fallback. No speed or occupant/driver identity is inferred.
Testing: 852 tests and all 11 regression cases pass on Python 3.11 and 3.14 on macOS, including 22 parser controls. Exact changed-file lint, repository guards, reproducible synthetic fixtures, UTC/POSIX baselines, full real-data output checks and source hash checks pass. The output checker notes uniform Path Decoded values in the one unit examined; the column is retained because it distinguishes incomplete paths, exercised by the synthetic case. The two artifacts still log their independent decode failures separately.
The PR contains synthetic data only. Other platforms and packaged builds were not tested locally.
Co-Authored-By: OpenAI Codex (GPT-6) [email protected]