Skip to content

feat(gm_onstar_lg): read the generation 9 binary var/sysinfo/gps.dat - #455

Merged
abrignoni merged 5 commits into
abrignoni:mainfrom
burgers-n-bytes:feat/gm-onstar-gen9-gps-dat
Nov 19, 2026
Merged

abrignoni merged 5 commits into
abrignoni:mainfrom
burgers-n-bytes:feat/gm-onstar-gen9-gps-dat

Conversation

@burgers-n-bytes

Copy link
Copy Markdown
Contributor

What this changes

Adds GM OnStar LG Gen9 - GPS Fixes (gm_onstar_lg_gen9_gps_fixes), which reads the generation 9 binary var/sysinfo/gps.dat: ten 80-byte GPS fix slots, newest first, rewritten in place. No artifact read this file. GPS Reports reads only generation 10 text documents, and GPS Track reads obn/storage/gps, which was zero bytes on the tested unit. This also corrects the GPS Reports notes, which said generation 9 units have no gps.dat.

For a new or changed artifact

  • Ran the tool against a real extraction and confirmed the row counts, not just that it imports. One generation 9 unit (2015 Chevrolet Traverse): 412 rows from the chip-off flash image as -t raw input (2 live and 98 $Deleted copies), and 10 rows from the qnxprobe-extracted file set, the 10 among the 412. An independent byte scan of the whole image found the same 412 distinct fixes, with none missing on either side, and every row matched that parse on time and position. A full run with all 215 artifacts finished on both inputs with no errors.
  • Ran check_artifact_output.py on that report. The one finding was GPS Week constant (2442) on all 412 rows; the fixes span less than two days, and the notes now say so and why the column stays.
  • Second app data directory: not applicable. The module keeps a var and a backup var partition, and fixes found in both are listed once with Times Found. The unit test covers that de-duplication with three files.
  • notes, description and sample_data say only what the data shows, and every number was re-derived from the finished run. Three draft figures were corrected that way.

Also run: the new admin/test/scripts/test_gm_onstar_lg_gen9_gps_fixes.py (6 tests on synthetic files, no case data) and the existing OnStar fragment test, all passing; pylint --disable=C,R 10.00/10 on both files; check_claim_language.py, check_artifact_descriptions.py, check_report_local_paths.py, check_source_path.py, and the metadata, imports, icons, category and corpus-privacy tests.

Anything reviewers should know

  • Timestamp is the slot's GPS week and time of week, less the leap seconds in force on that date (a table from IERS Bulletin C, 18 s since 2017-01-01). Only dates after 2017 were exercised. Stored Date and Time is shown beside it, because on the tested unit it was 15 s behind GPS on 151 rows and 18 s on 261. That fits a receiver using a stale built-in leap count until it reads the current one, which is not established here.
  • Latitude/Longitude are the stored doubles ÷ 10,000,000. The scale is derived, not documented. It agreed to within 16 m with the SiRF receiver's own last position, a separate ECEF record in gps/SiRFNavIIIStorage0.sns.
  • Byte 56 is reported as stored (0 to 11 on the tested unit). It looks like a satellite count, but that is not established.
  • Left out: the other slot bytes, which are not decoded. blackbox.dat and occ.dat on this unit held no coordinates. The SiRF storage files are not surfaced here: they hold the receiver's last position at each power-down, and their timestamps carry time of week without a week number.
  • Tested on one unit only. Units with dates before 2017, or whose gps.dat differs in size or tag, are the samples that would close the gaps. Files that don't match are logged and not read.

🤖 Generated with Claude Code

burgers-n-bytes and others added 3 commits November 19, 2026 10:52
Add GM OnStar LG Gen9 - GPS Fixes. Generation 9 units keep a binary
gps.dat of ten 80-byte GPS fix slots (newest first) that no artifact
read: the GPS Reports artifact reads only generation 10 text documents
and the GPS Track artifact reads obn/storage/gps. Live and $Deleted
copies are read; a fix in several copies is listed once with Times
Found. Timestamp comes from the GPS week and time of week less the leap
seconds in force; the stored date and time is shown beside it, because
on the tested unit it ran 3 seconds late on 151 of 412 rows.

Tested on one generation 9 unit: 412 rows from the chip-off flash image
as raw input (2 live and 98 deleted copies), equal to an independent
byte scan of the whole image, and 10 rows from the extracted file set.

Also corrects the GPS Reports notes, which said generation 9 units have
no gps.dat.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Name the artifact's author @burgers-n-bytes, Claude and replace the
placeholder sample_data key with burgers_n_bytes_item001, in sample_data
and in the notes that cite it. Rewrap one notes line over 100 columns.
No change to parsing; the raw image run still gives 412 rows.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The tested generation 9 unit came from a 2015 Chevrolet Traverse, as
confirmed by the examiner. Name it in sample_data and the notes, as the
module's other artifacts do for their units.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Test data is now included for every changed artifact module. Thank you!

@github-actions github-actions Bot added the needs-test-data Artifact PR without test data for the changed modules label Nov 19, 2026
caseGmOnStarGen9GpsDatSanitized holds four real var/sysinfo/gps.dat
copies from one generation 9 unit (the live file, its backup-partition
copy, the version before it and an older $NoFolder copy), sanitized in
place: every position moved by one fixed offset to open water near
30N 40W and every date moved back by a whole number of weeks, stored
date fields and GPS week together. Times of day, the gaps between
fixes, the 15 and 18 second stored-versus-GPS differences and all
other bytes are as the module wrote them.

Gen9 GPS Fixes gives 13 rows with Times Found from 1 to 4. GPS Reports
and Stored Values match the same files and give 0 rows, a checked
absence for a binary gps.dat. Baselines were recorded on Windows and
their paths written with forward slashes, which the runner compares
equal there and as recorded elsewhere. run_test_cases.py passes all 14
cases.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot removed the needs-test-data Artifact PR without test data for the changed modules label Nov 19, 2026
@burgers-n-bytes

Copy link
Copy Markdown
Contributor Author

Added a fixture in 8229bc1: caseGmOnStarGen9GpsDatSanitized, four real gps.dat copies (live, backup-partition copy, the previous version and an older $NoFolder copy) sanitized in place: positions moved by one fixed offset to open water near 30N 40W, dates moved back a whole number of weeks, all other bytes as written. Gen9 GPS Fixes gives 13 rows with Times Found 1–4; GPS Reports and Stored Values match the same files and give 0 rows. Baselines were recorded on Windows with paths written as /. run_test_cases.py passes all 14 cases locally.

@abrignoni
abrignoni merged commit e7023ff into abrignoni:main Nov 19, 2026
11 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.

2 participants