Skip to content

Commit 9704649

Browse files
committed
revert temp changes
1 parent b4a9c7b commit 9704649

2 files changed

Lines changed: 5 additions & 63 deletions

File tree

gnss_lib_py/parsers/clk.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,7 @@ def interpolate_clk(self, navdata, window=6, verbose=False):
131131

132132
if np.min(navdata_id_gps_millis) < x_data[0] \
133133
or np.max(navdata_id_gps_millis) > x_data[-1]:
134-
print(gnss_sv_id)
135-
print("t:",navdata_id_gps_millis[0])
136-
print("t:",np.min(x_data))
137-
print("t:",np.max(x_data))
138-
# todo check E30 at 1362865253267
139-
# E30 is available earlier in the day but not later
140-
141-
raise RuntimeWarning("clk data does not include all "\
134+
raise RuntimeError("clk data does not include all "\
142135
+ "times in measurement file.")
143136

144137
b_sv_m = np.zeros(len(navdata_id))

gnss_lib_py/utils/ephemeris_downloader.py

Lines changed: 4 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,15 @@
4343
The CODE final solutions became available starting GPS week 1962 or
4444
Aug 13, 2017. The CODE final solution includes: GPS+GLO+GAL+BDS+QZS
4545
46-
gbm available week 1790 and after
47-
4846
Details on the MGEX precise orbit and clock products can be found on the
4947
IGS website [4]_.
5048
51-
IGS files can be viewed online using their file browser [5]_.
52-
5349
References
5450
----------
5551
.. [1] https://cddis.nasa.gov/Data_and_Derived_Products/GNSS/daily_30second_data.html
5652
.. [2] https://igs.org/mgex/data-products/#bce
5753
.. [3] https://network.igs.org/
5854
.. [4] https://igs.org/mgex/data-products/#orbit_clock
59-
.. [5] https://igs.bkg.bund.de/browseFiles
6055
6156
"""
6257

@@ -194,20 +189,16 @@ def _verify_ephemeris(file_type, gps_millis, constellations=None,
194189
possible_types += ["sp3_rapid_CODE"]
195190
elif datetime.utcnow().date() - timedelta(days=14) < date:
196191
possible_types += ["sp3_rapid_GFZ"]
197-
elif date >= datetime(2017, 8, 13).date():
198-
possible_types += ["sp3_final_CODE"]
199192
else:
200-
possible_types += ["sp3_final_GFZ"]
193+
possible_types += ["sp3_final_CODE"]
201194

202195
if file_type == "clk":
203196
if datetime.utcnow().date() - timedelta(days=3) < date:
204197
possible_types += ["clk_rapid_CODE"]
205198
elif datetime.utcnow().date() - timedelta(days=14) < date:
206199
possible_types += ["clk_rapid_GFZ"]
207-
elif date >= datetime(2017, 8, 13).date():
208-
possible_types += ["clk_final_CODE"]
209200
else:
210-
possible_types += ["clk_final_GFZ"]
201+
possible_types += ["clk_final_CODE"]
211202

212203
already_exists, filepath = _valid_ephemeris_in_paths(date,
213204
possible_types, file_paths)
@@ -541,27 +532,6 @@ def _valid_ephemeris_in_paths(date, possible_types, file_paths=None):
541532
if os.path.split(path)[1][3:] == str(gps_week).zfill(4) + str((timetuple.tm_wday+1)%7) + ".sp3":
542533
return True, path
543534

544-
# sp3 before Aug 13, 2017
545-
elif possible_type == "sp3_final_GFZ":
546-
gps_week, _ = tc.datetime_to_tow(datetime.combine(date,
547-
time(tzinfo=timezone.utc)))
548-
recommended_file = ("gdc.cddis.eosdis.nasa.gov",
549-
"/gnss/products/" \
550-
+ str(gps_week).zfill(4) + "/" \
551-
+ "gbm" + str(gps_week).zfill(4) \
552-
+ str((timetuple.tm_wday+1)%7) \
553-
+ ".sp3.Z")
554-
recommended_files.append(recommended_file)
555-
if file_paths is None:
556-
return False, recommended_file
557-
# check compatible file types
558-
for path in file_paths:
559-
if os.path.split(path)[1] + ".Z" == os.path.split(recommended_file[1])[1]:
560-
return True, path
561-
for path in file_paths:
562-
if os.path.split(path)[1][3:] + ".Z" == os.path.split(recommended_file[1])[1]:
563-
return True, path
564-
565535
# clk from last three days
566536
elif possible_type == "clk_rapid_CODE":
567537
gps_week, _ = tc.datetime_to_tow(datetime.combine(date,
@@ -634,27 +604,6 @@ def _valid_ephemeris_in_paths(date, possible_types, file_paths=None):
634604
if os.path.split(path)[1][3:] == str(gps_week).zfill(4) + str((timetuple.tm_wday+1)%7) + ".clk":
635605
return True, path
636606

637-
# clk before Aug 13, 2017
638-
elif possible_type == "clk_final_GFZ":
639-
gps_week, _ = tc.datetime_to_tow(datetime.combine(date,
640-
time(tzinfo=timezone.utc)))
641-
recommended_file = ("gdc.cddis.eosdis.nasa.gov",
642-
"/gnss/products/" \
643-
+ str(gps_week).zfill(4) + "/" \
644-
+ "gbm" + str(gps_week).zfill(4) \
645-
+ str((timetuple.tm_wday+1)%7) \
646-
+ ".clk.Z")
647-
recommended_files.append(recommended_file)
648-
if file_paths is None:
649-
return False, recommended_file
650-
# check compatible file types
651-
for path in file_paths:
652-
if os.path.split(path)[1] + ".Z" == os.path.split(recommended_file[1])[1]:
653-
return True, path
654-
for path in file_paths:
655-
if os.path.split(path)[1][3:] + ".Z" == os.path.split(recommended_file[1])[1]:
656-
return True, path
657-
658607
else:
659608
raise RuntimeError(possible_type,"invalid possible_type "\
660609
+"for valid ephemeris")
@@ -793,7 +742,7 @@ def _get_rinex_extension(timestamp):
793742
"""Get file extension of rinex file based on timestamp.
794743
795744
GPS and Glonass Rinex files switched from .Z to .gz on
796-
December 1, 2020 [6]_.
745+
December 1, 2020 [5]_.
797746
798747
Parameters
799748
----------
@@ -807,7 +756,7 @@ def _get_rinex_extension(timestamp):
807756
808757
References
809758
----------
810-
.. [6] https://cddis.nasa.gov/Data_and_Derived_Products/GNSS/daily_30second_data.html
759+
.. [5] https://cddis.nasa.gov/Data_and_Derived_Products/GNSS/daily_30second_data.html
811760
812761
"""
813762
# switched from .Z to .gz compression format on December 1st, 2020

0 commit comments

Comments
 (0)