Skip to content

Commit

Permalink
Ignore dcb rows with fewer than 10 columns (#158)
Browse files Browse the repository at this point in the history
* Ignore dcb rows with fewer than 10 columns

* Added comment
  • Loading branch information
mitchellgoffpc authored Dec 15, 2023
1 parent b334e4e commit 916b57f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions laika/dcb.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ def parse_dcbs(file_name, SUPPORTED_CONSTELLATIONS):
prn = line_components[2]
if get_constellation(prn) not in SUPPORTED_CONSTELLATIONS:
continue
# The lines may be formatted incorrectly with no whitespace between the
# estimated_value and std_dev columns, e.g. CAS0MGXRAP_20232340000_01D_01D_DCB.BSX.
# We ignore these lines since they can't be parsed.
if len(line_components) < 10:
continue
dcb_type = line_components[3] + '_' + line_components[4]
epoch = GPSTime.from_datetime(datetime.strptime(line_components[5], '%Y:%j:%f')) + 12*SECS_IN_HR
if prn not in dcbs_dict:
Expand Down

0 comments on commit 916b57f

Please sign in to comment.