diff --git a/src/georinex/nav3.py b/src/georinex/nav3.py index d0758c3..45d5448 100644 --- a/src/georinex/nav3.py +++ b/src/georinex/nav3.py @@ -232,6 +232,8 @@ def _sparefields(cf: list[str], sys: str, N: int) -> list[str]: elif sys == "I": if N == 28: cf = cf[:28] + if N == 26: # Only one middle spare field + cf = cf[:22] + cf[23:26] + cf[27:28] if N != len(cf): raise ValueError(f"System {sys} NAV data is not the same length as the number of fields.") diff --git a/src/georinex/tests/data/BRDC00IGS_R_20250570000_01D_MN.rnx.gz b/src/georinex/tests/data/BRDC00IGS_R_20250570000_01D_MN.rnx.gz new file mode 100644 index 0000000..aec9442 Binary files /dev/null and b/src/georinex/tests/data/BRDC00IGS_R_20250570000_01D_MN.rnx.gz differ diff --git a/src/georinex/tests/data/BRDC00IGS_R_20250870000_01D_MN.rnx.gz b/src/georinex/tests/data/BRDC00IGS_R_20250870000_01D_MN.rnx.gz new file mode 100644 index 0000000..c4f9827 Binary files /dev/null and b/src/georinex/tests/data/BRDC00IGS_R_20250870000_01D_MN.rnx.gz differ diff --git a/src/georinex/tests/test_nav3.py b/src/georinex/tests/test_nav3.py index 13554a4..55d2016 100755 --- a/src/georinex/tests/test_nav3.py +++ b/src/georinex/tests/test_nav3.py @@ -48,6 +48,24 @@ def test_spare(fname): assert (G01["FitIntvl"] == approx([4.0, 4.0])).all() +@pytest.mark.parametrize( + "fname", + [ + "BRDC00IGS_R_20250870000_01D_MN.rnx.gz", + "BRDC00IGS_R_20250570000_01D_MN.rnx.gz", + ], +) +def test_mixed_igs(fname): + """ + Test for mixed IGS files with multiple systems if all spare fields are detected + """ + fn = ir.files(f"{__package__}.data") / fname + nav = gr.load(fn) + + assert isinstance(nav, xarray.Dataset) + assert set(nav.svtype) == {"C", "E", "G", "R", "I", "S", "J"} + + @pytest.mark.parametrize("fname", ["ELKO00USA_R_20182100000_01D_MN.rnx.gz"]) def test_mixed(fname): fn = ir.files(f"{__package__}.data") / fname