Skip to content

Commit

Permalink
fix copy paste - update ephem.from_file_name
Browse files Browse the repository at this point in the history
  • Loading branch information
YassineYousfi committed Aug 2, 2024
1 parent e8a1027 commit cfdb565
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions laika/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,8 @@ def download_orbits_gps(time, cache_dir, ephem_types):
compression = '.gz'
ephem_strs = {
EphemerisType.FINAL_ORBIT: ['IGS0OPSFIN_{yyyy}{doy}0000_01D_15M_ORB.SP3'.format(yyyy=time.year, doy=time.doy)],
EphemerisType.RAPID_ORBIT: ['IGS0OPSFIN_{yyyy}{doy}0000_01D_15M_ORB.SP3'.format(yyyy=time.year, doy=time.doy)],
EphemerisType.ULTRA_RAPID_ORBIT: ['IGS0OPSFIN_{yyyy}{doy}0000_02D_15M_ORB.SP3'.format(yyyy=time.year, doy=time.doy)],
EphemerisType.RAPID_ORBIT: ['IGS0OPSRAP_{yyyy}{doy}0000_01D_15M_ORB.SP3'.format(yyyy=time.year, doy=time.doy)],
EphemerisType.ULTRA_RAPID_ORBIT: ['IGS0OPSULT_{yyyy}{doy}0000_02D_15M_ORB.SP3'.format(yyyy=time.year, doy=time.doy)],
}

folder_path = "%i/" % time.week
Expand Down
6 changes: 3 additions & 3 deletions laika/ephemeris.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ def all_orbits():

@classmethod
def from_file_name(cls, file_name: str):
if "/final" in file_name or "/igs" in file_name:
if "/final" in file_name or "/igs" in file_name or 'OPSFIN' in file_name:
return EphemerisType.FINAL_ORBIT
if "/rapid" in file_name or "/igr" in file_name:
if "/rapid" in file_name or "/igr" in file_name or 'OPSRAP' in file_name:
return EphemerisType.RAPID_ORBIT
if "/ultra" in file_name or "/igu" in file_name or "COD0OPSULT" in file_name:
if "/ultra" in file_name or "/igu" in file_name or "COD0OPSULT" in file_name or 'OPSULT' in file_name:
return EphemerisType.ULTRA_RAPID_ORBIT
raise RuntimeError(f"Ephemeris type not found in filename: {file_name}")

Expand Down

0 comments on commit cfdb565

Please sign in to comment.