Skip to content

Commit

Permalink
Avoid gaps in bias products
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreHauschild committed Apr 2, 2024
1 parent 38f44aa commit e50fd00
Showing 1 changed file with 24 additions and 9 deletions.
33 changes: 24 additions & 9 deletions samples/ssr2sp3.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ def file2time(year, fileName):
navfile = baseDirName+'../data{}/BRD400DLR_S_{:4d}{:03d}0000_01D_MN.rnx'\
.format('/doy223' if doy == 223 else '', year, doy)


if "qzsl6" in ssrfile:

name = 'QZS0CLSOPS'
Expand Down Expand Up @@ -447,11 +446,19 @@ def file2time(year, fileName):
if sig_ not in biases[sat_].keys():
biases[sat_].update({sig_: []})

if len(biases[sat_][sig_]) == 0 or \
biases[sat_][sig_][-1][2] != val_:
# Add first entry if empty
#
if len(biases[sat_][sig_]) == 0:
biases[sat_][sig_].append([time, time, val_])

# Extend previous record with end time of current record
#
biases[sat_][sig_][-1][1] = time

# Add new value if biase has changed
#
if biases[sat_][sig_][-1][2] != val_:
biases[sat_][sig_].append([time, time, val_])
else:
biases[sat_][sig_][-1][1] = time

# Get SSR phase biases
#
Expand All @@ -469,11 +476,19 @@ def file2time(year, fileName):
if sig_ not in biases[sat_].keys():
biases[sat_].update({sig_: []})

if len(biases[sat_][sig_]) == 0 or \
biases[sat_][sig_][-1][2] != val_:
# Add first entry if empty
#
if len(biases[sat_][sig_]) == 0:
biases[sat_][sig_].append([time, time, val_])

# Extend previous record with end time of current record
#
biases[sat_][sig_][-1][1] = time

# Add new value if biase has changed
#
if biases[sat_][sig_][-1][2] != val_:
biases[sat_][sig_].append([time, time, val_])
else:
biases[sat_][sig_][-1][1] = time

# Next time-step
#
Expand Down

0 comments on commit e50fd00

Please sign in to comment.