1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2026-07-12 06:02:44 +00:00

Fix and refactor GPS L1 C/A KF tracking dump reader and plotter.

The KF tracking dump reader now follows the parameters dumped by kf_tracking.cc

lib/gps_l1_ca_kf_read_tracking_dump.py:
- Rewrite using the same _RECORD_FORMAT / _FIELD_NAMES architecture as
  dll_pll_veml_read_tracking_dump.py: one struct.unpack per record and
  EOF handling, dropping the v1..v22 / bytes_shift / seek.

gps_l1_ca_kf_plot_sample.py:
- map innovation -> carr_error; drop r_noise_cov

lib/plotKalman.py, lib/plotTracking.py:
- Skip the "Estimated Noise Variance" panel when r_noise_cov is absent.
- Replace fig.canvas.set_window_title() with
  fig.canvas.manager.set_window_title(). The canvas method was deprecated
  in matplotlib 3.4 and is gone in current matplotlib (3.6.3 here), where
  it raised AttributeError. Ref: https://github.com/raysect/source/issues/383

Signed-off-by: minhaj <minhaj.sixbyte@gmail.com>
This commit is contained in:
minhaj
2026-06-19 23:01:57 -05:00
parent ec718c6e64
commit 43bceb52ff
4 changed files with 130 additions and 254 deletions
+6 -4
View File
@@ -32,8 +32,9 @@ import matplotlib.pyplot as plt
def plotTracking(channelNr, trackResults, settings):
# ---------- CHANGE HERE:
fig_path = '/home/labnav/Desktop/TEST_IRENE/PLOTS/PlotTracking'
# ---------- CHANGE HERE (or pass 'fig_path' in settings):
fig_path = settings.get('fig_path',
'../../../PLOTS/PlotTracking')
if not os.path.exists(fig_path):
os.makedirs(fig_path)
@@ -43,7 +44,7 @@ def plotTracking(channelNr, trackResults, settings):
plt.figure(figsize=(1920 / 120, 1080 / 120))
plt.clf()
plt.gcf().canvas.set_window_title(
plt.gcf().canvas.manager.set_window_title(
f'Channel {channelNr} (PRN '
f'{trackResults[channelNr-1]["PRN"][0]}) results')
plt.subplots_adjust(left=0.1, right=0.9, top=0.9, bottom=0.1,
@@ -187,4 +188,5 @@ def plotTracking(channelNr, trackResults, settings):
f'trk_dump_ch{channelNr}_PRN_'
f'{trackResults[channelNr - 1]["PRN"][-1]}'
f'.png'))
plt.show()
if settings.get('show', True):
plt.show()