Skip to content

Commit

Permalink
NPI-3430 initial fixes for sp3 header parse bug with orbit accuracy c…
Browse files Browse the repository at this point in the history
…odes. More doc and unit tests to come
  • Loading branch information
treefern committed Jul 31, 2024
1 parent 027701b commit ee8d48d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions gnssanalysis/gn_io/sp3.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,13 @@
(\w+)(?:[ ]+(\w+)|)""",
_re.VERBOSE,
)
# SV names. multiline, findall
# Regex to extract Satellite Vehicle (SV) names (E.g. G02). Regex options/flags: multiline, findall
_RE_SP3_HEAD_SV = _re.compile(rb"^\+[ ]+(?:[\d]+|)[ ]+((?:[A-Z]\d{2})+)\W", _re.MULTILINE)
# orbits accuracy codes
_RE_SP3_ACC = _re.compile(rb"^\+{2}[ ]+([\d\s]{50}\d)\W", _re.MULTILINE)

# Regex for orbits accuracy codes (E.g. ' 15' - space padded, blocks are three chars wide).
# Note: header is padded with ' 0' entries after the actual data, so empty fields are matched and then trimmed.
_RE_SP3_ACC = _re.compile(rb"^\+{2}[ ]+([\d\s]{51})$", _re.MULTILINE)

# File descriptor and clock
_RE_SP3_HEAD_FDESCR = _re.compile(rb"\%c[ ]+(\w{1})[ ]+cc[ ](\w{3})")

Expand Down

0 comments on commit ee8d48d

Please sign in to comment.