Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/georinex/nav3.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down
Binary file not shown.
Binary file not shown.
18 changes: 18 additions & 0 deletions src/georinex/tests/test_nav3.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down