Skip to content

feat(gsdc2023): opt-in DGNSS base correction for FGO-only rows#99

Open
rsasaki0109 wants to merge 1 commit into
mainfrom
feat/base-correction-fgo-masked-rows
Open

feat(gsdc2023): opt-in DGNSS base correction for FGO-only rows#99
rsasaki0109 wants to merge 1 commit into
mainfrom
feat/base-correction-fgo-masked-rows

Conversation

@rsasaki0109

@rsasaki0109 rsasaki0109 commented Jun 15, 2026

Copy link
Copy Markdown
Owner

What

Adds an opt-in flag base_correction_fgo_only_rows (BridgeConfig, default False) and CLI --base-correction-fgo-only-rows. When enabled, the DGNSS base correction is also applied to FGO-only rows — rows whose WLS weight was masked out while the FGO weight (weights_fgo) was kept — so the FGO objective sees corrected pseudoranges on those rows too.

The legacy behaviour (correct only WLS-active rows, weights > 0) is preserved by default; nothing changes unless the flag is set.

Why

Surfaced during the DGNSS / multi-constellation work: the shared pseudorange feeds both the WLS gate (weights) and the FGO objective (weights_fgo). Rows that the WLS pseudorange-residual mask zeros out can still feed FGO. Those rows were never base-corrected, so their common-mode error (iono/tropo/sat-clock/orbit) leaked into the FGO solution.

26-trip A/B (pixel=FGO preset, off vs on)

metric off (legacy) on
FGO standalone score 1.6386 m 1.5177 m (-12.1 cm)
wins / reg / wash 12 / 5 / 9 (2.4:1)

Biggest wins are bias-dominated rows recovered by the correction: mtv-pe1 (2023-05-09) -131 cm, lax-t -81 cm, mtv-e -42 cm, routen -27 cm, lax-o -23 cm, mtv-h -18 cm. The main regression is sjc-q +39 cm — an NLOS-heavy trip whose rows are then kept at full weight in FGO.

The result is net-positive but high variance, so the flag is opt-in and default off.

Changes

  • gsdc2023_bridge_config.py: new field + bool validation.
  • gsdc2023_trip_stages.py: apply_base_correction_to_pseudorange gains weights_fgo / include_fgo_only; flag threaded through the post-observation stages.
  • gsdc2023_raw_bridge.py: build_trip_arrays + both callers thread the flag.
  • build_gsdc2023_bridge_submission.py: CLI flag + reproducibility metadata.
  • Tests: default value, bool validation, and both correction behaviours (legacy skip vs FGO-only include).

Tests

tests/test_gsdc2023_bridge_config.py + tests/test_gsdc2023_trip_stages.py green (91 passed, +3 new). Full -k gsdc2023 suite shows only pre-existing failures unrelated to this change (gnss_log_reader / pixel5_candidate_queue, identical on main).

Production proxy (40-trip phone-aware, selected score)

Built the full 40-trip train set on the production phone-aware config (pixel → FGO direct adoption, non-pixel → taroz_sn gated), flag off vs on, measuring the selected (submission) score:

group n mean Δ note
non-pixel (gated) 14 +0.00 cm every trip bit-identical, base_correction_count = 0
pixel (FGO = selected) 26 -12.09 cm the FGO-masked base-correction win
40-trip aggregate 40 -7.86 cm/trip 12 wins / 5 reg / 23 wash

The non-pixel half is provably inert: base correction is only enabled by the taroz pixel preset (gated non-pixel trips run apply_base_correction=False), so the flag is structurally a pixel-only lever and touches none of the 14 gated trips. The regressions (e.g. sjc-q +39 cm) are confined to the known pixel set and are net-absorbed. Net-positive and submission-safe on the real selected metric.

Adds a BridgeConfig flag base_correction_fgo_only_rows (default False) and
CLI --base-correction-fgo-only-rows. When set, the DGNSS base correction is
also applied to FGO-only rows — rows whose WLS weight was masked out while the
FGO weight (weights_fgo) was kept — so the FGO objective sees corrected
pseudoranges on those rows too. The legacy behaviour (correct only WLS-active
rows) is preserved by default.

apply_base_correction_to_pseudorange gains weights_fgo / include_fgo_only
parameters; the flag is threaded through build_trip_arrays, the post-observation
stages and the submission CLI.

Motivation: a 26-trip A/B (off vs on) on the pixel=FGO preset improves the FGO
standalone score from 1.6386 m to 1.5177 m (-12.1 cm aggregate, 12 wins /
5 regressions / 9 wash). The wins are bias-dominated rows recovered by the DGNSS
correction (mtv-pe1 -131 cm, lax-t -81 cm, mtv-e -42 cm, lax-o -23 cm); the main
regression is sjc-q (+39 cm), an NLOS-heavy trip whose rows are then kept at full
weight in FGO. High variance, hence opt-in and default off.
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