Skip to content

Commit 44ab1ca

Browse files
committed
Fixed missing sky plot entries for short-lived signals.
1 parent d2be405 commit 44ab1ca

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

‎python/fusion_engine_client/analysis/analyzer.py‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1253,11 +1253,24 @@ def plot_gnss_skyplot(self, decimate=True):
12531253
if dt_sec < interval_sec:
12541254
rounded_time = np.round(p1_time / interval_sec) * interval_sec
12551255
idx = np.where(np.diff(rounded_time, prepend=rounded_time[0]) > 0.01)[0]
1256+
1257+
# If this satellite appears for < interval_sec and all of its timestamps happen to round to the same
1258+
# time, idx will be empty. Pick the first point where az/el is available.
1259+
if len(idx) == 0:
1260+
idx = [find_first(~np.isnan(el_deg))]
1261+
if idx[0] < 0:
1262+
continue
1263+
12561264
p1_time = p1_time[idx]
12571265
az_deg = az_deg[idx]
12581266
el_deg = el_deg[idx]
12591267
max_cn0_dbhz = max_cn0_dbhz[idx]
12601268

1269+
# If we never had ephemeris for this satellite, or were otherwise not able to compute az/el, we
1270+
# can't put this satellite on the sky plot.
1271+
if np.all(np.isnan(el_deg)):
1272+
continue
1273+
12611274
# Plot the data. We set styles for both coloring by SV and by C/N0. We'll add buttons below to switch
12621275
# between styles.
12631276
color_by_sv_format.append({'color': color_by_prn[sv_id.get_prn()]})

0 commit comments

Comments
 (0)