022b(cli): gengnss almanac subcommand + --visible almanac-driven selection #39
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/022b-almanac-cli"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements step 022b (almanac core 022a merged in #38). Per the owner's standing direction, the work order is untracked from the backlog index and archived with its outcome in
docs/done/022b-almanac-cli.md.What it adds
gengnss almanac [FILE|URL](no args = latest CelesTrak Yuma;--semswitches parser/default URL):sat_id healthy slot/k elevation° azimuth°— visibility columns only when--lat/--lonare given;--whenISO-8601 UTC (default now),--min-elev--jsonprints the 022a interchange document (machine-parseable, even with--save);--save PATHwrites it (GLONASS hand-curation target)GENGNSS_CACHE_DIR)--visibleonrun/show: selects every healthy almanac satellite visible from--lat/--lonat--whenabove--min-elev(no position = all healthy). Mutually exclusive with--signal/--preset(exit 2).--almanac FILE|URLoverrides the source;--offlineforbids network.Reproducibility guarantee (the key property):
--visibleresolves at run time and freezes the selections as explicit entries in the sidecar —gengnss scenario <sidecar>regenerates byte-identically even when the live constellation later changes (test proves regeneration works with almanac fetching forbidden afterwards).Core tweak:
fetch_almanacgainedoffline=True(cache-only, any age; missing cache → cleanRuntimeError).Tests (
tests/test_cli_almanac.py, 12, network-free)run --visible: selections match the core visibility computation; sidecar frozen; byte-identical regeneration with fetching forbiddenshow --visibleresolved selections; no-position → all healthy; conflicts → exit 2; missing file → exit 2; offline empty-cache → exit 1, no tracebackruffclean;pytest: 235 passed, 8 skipped. README CLI examples added.