Skip to content

Commit 93bc1d8

Browse files
authored
Merge branch 'v0.2.3' into derek/android_raw
2 parents 0ee2516 + f8ce440 commit 93bc1d8

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

gnss_lib_py/utils/ephemeris_downloader.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ def _valid_ephemeris_in_paths(date, possible_types, file_paths=None):
664664
if os.path.split(path)[1][3:] == str(gps_week).zfill(4) + str((timetuple.tm_wday+1)%7) + ".sp3":
665665
return True, path
666666

667-
# sp3 before Aug 13, 2017 and May 25, 2012 or later
667+
# sp3 between May 25, 2012 and Aug 12, 2017 inclusive
668668
elif possible_type == "sp3_short_CODE":
669669
gps_week, _ = tc.datetime_to_tow(datetime.combine(date,
670670
time(tzinfo=timezone.utc)))
@@ -1020,7 +1020,7 @@ def _get_rinex_extension(timestamp):
10201020
.. [15] https://cddis.nasa.gov/Data_and_Derived_Products/GNSS/daily_30second_data.html
10211021
10221022
"""
1023-
# switched from .Z to .gz compression format on December 1st, 2020
1023+
10241024
if timestamp >= datetime(2020, 11, 30, tzinfo=timezone.utc).date():
10251025
extension = '.gz'
10261026
else:

tests/parsers/test_rinex_obs.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,3 +254,12 @@ def test_z_tracking(root_path):
254254

255255
assert len(rinex_navdata) == 210
256256
assert rinex_navdata.shape == (10,210)
257+
258+
# expected observation codes come from z_tracking.rnx header
259+
# header also lists the 3Q measurements for glonass but none exist
260+
# in this shortened version of the file
261+
expected_observation_codes = ['1C','1W','2W','2L','5Q','7Q','2P',
262+
'2C','2I','7I']
263+
264+
parsed_observation_codes = np.unique(rinex_navdata["observation_code"])
265+
assert sorted(expected_observation_codes) == sorted(parsed_observation_codes)

0 commit comments

Comments
 (0)