Skip to content

Commit

Permalink
They changed bias format
Browse files Browse the repository at this point in the history
  • Loading branch information
haraschax committed Mar 19, 2024
1 parent 901906a commit c2f5446
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions laika/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,17 +447,19 @@ def download_ionex(time, cache_dir):

def download_dcb(time, cache_dir):
filenames = []
formats = ['CAS0MGXRAP_%Y%j0000_01D_01D_DCB.BSX',
'CAS0OPSRAP_%Y%j0000_01D_01D_DCB.BIA']
folder_paths = []
url_bases = (
mirror_url(CDDIS_BASE_URL, '/gnss/products/bias/'),
mirror_url(IGN_BASE_URL, '/igs/products/mgex/dcb/'),
)
# seem to be a lot of data missing, so try many days
for time_step in [time - i * SECS_IN_DAY for i in range(14)]:
t = time_step.as_datetime()
folder_paths.append(t.strftime('%Y/'))
filenames.append(t.strftime("CAS0MGXRAP_%Y%j0000_01D_01D_DCB.BSX"))

for file_format in formats:
t = time_step.as_datetime()
folder_paths.append(t.strftime('%Y/'))
filenames.append(t.strftime(file_format))
return download_and_cache_file_return_first_success(url_bases, list(zip(folder_paths, filenames)), cache_dir+'dcb/', compression='.gz', raise_error=True)


Expand Down

0 comments on commit c2f5446

Please sign in to comment.