From 77db2cf30e25623619dfd2948d0628279e2992ad Mon Sep 17 00:00:00 2001 From: Adam Shapiro Date: Wed, 20 May 2026 10:44:39 -0400 Subject: [PATCH] Fixed missing sky plot entries for short-lived signals. --- python/fusion_engine_client/analysis/analyzer.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/python/fusion_engine_client/analysis/analyzer.py b/python/fusion_engine_client/analysis/analyzer.py index 8ecb2832..08b1a156 100755 --- a/python/fusion_engine_client/analysis/analyzer.py +++ b/python/fusion_engine_client/analysis/analyzer.py @@ -1253,11 +1253,24 @@ def plot_gnss_skyplot(self, decimate=True): if dt_sec < interval_sec: rounded_time = np.round(p1_time / interval_sec) * interval_sec idx = np.where(np.diff(rounded_time, prepend=rounded_time[0]) > 0.01)[0] + + # If this satellite appears for < interval_sec and all of its timestamps happen to round to the same + # time, idx will be empty. Pick the first point where az/el is available. + if len(idx) == 0: + idx = [find_first(~np.isnan(el_deg))] + if idx[0] < 0: + continue + p1_time = p1_time[idx] az_deg = az_deg[idx] el_deg = el_deg[idx] max_cn0_dbhz = max_cn0_dbhz[idx] + # If we never had ephemeris for this satellite, or were otherwise not able to compute az/el, we + # can't put this satellite on the sky plot. + if np.all(np.isnan(el_deg)): + continue + # Plot the data. We set styles for both coloring by SV and by C/N0. We'll add buttons below to switch # between styles. color_by_sv_format.append({'color': color_by_prn[sv_id.get_prn()]})