Commit Graph
22 Commits
Author SHA1 Message Date
daoyyy7777 33f3618335 Plot telemetry TOW values in their stored seconds
Signed-off-by: daoyyy7777 <354528186+daoyyy7777@users.noreply.github.com>
2026-11-12 09:55:52 +08:00
daoyyy7777 4a851382af Test the units used for both telemetry plot channels
Signed-off-by: daoyyy7777 <354528186+daoyyy7777@users.noreply.github.com>
2026-11-12 09:52:51 +08:00
Carles Fernandez 8f0b310ef9 Add L1C signals to utility scripts 2026-11-01 10:12:05 +01:00
Carles Fernandez 6564d6148f Write the accumulated carrier phase as double in all tracking dumps
Extend the change of the previous merge to the remaining tracking
blocks: kf_tracking and gps_l1_ca_gaussian_tracking_cc (binary dump and
.mat file; records grow from 96 to 100 bytes), and the GPS L1 C/A and
Galileo E1 TCP connector and GPS L1 C/A GPU blocks (records grow from 88
to 92 bytes). The Galileo E1 TCP connector block accumulated the carrier
phase in a float, which is now a double.

Update the KF readers in utils/matlab and utils/python accordingly.

Tracking_Dump_Reader now takes the record layout, since the FPGA and
Gaussian tests read dumps that lack the TOW and WN fields (and, for the
Gaussian block, have the carrier noise variance in place of the code
frequency rate) with the dll_pll_veml_tracking layout.

Add a CHANGELOG entry.
2026-10-26 16:56:47 +01:00
ObvMamut a81888f2ae Write the accumulated carrier phase as double in tracking dumps
log_data() in dll_pll_veml_tracking and dll_pll_veml_tracking_fpga casts
d_acc_carrier_phase_rad, a double, to float before writing it to the
binary dump, and save_matfile() reads it back as a float. The
accumulated phase grows by 2*pi times the Doppler shift every second
(about 31400 rad/s at 5 kHz), so it reaches 1e6 rad after about 30 s of
tracking at 5 kHz, or under 3 minutes at 1 kHz. The float spacing is
0.0625 rad at 1e6 rad, 0.25 rad at 3e6 rad and 1 rad at 1e7 rad. At
3e6 rad, for instance, the phase difference between two 1 ms epochs of
the dump is only known to within +/-0.25 rad, about 40 Hz in frequency
terms. The phase used by the receiver (Gnss_Synchro::Carrier_phase_rads)
is a double and is not affected; only the dump is.

Write the field as a double, and read it back as a double in
save_matfile(), so that the .mat file also holds a double.

This changes the dump record layout. The field keeps its position but
grows from 4 to 8 bytes, so a record is now 112 bytes long in
dll_pll_veml_tracking (it was 108) and 100 bytes long in
dll_pll_veml_tracking_fpga (it was 96). The readers of this format are
updated accordingly: Tracking_Dump_Reader, used by the unit tests, and
dll_pll_veml_read_tracking_dump in utils/matlab and utils/python.

Signed-off-by: ObvMamut <obvmamut@proton.me>
2026-10-20 14:17:46 +02:00
Carles Fernandez fd274fb891 Make acquisition dump readers skip noise-reference columns
With set_doppler_num_bins(), acq_grid holds the Doppler candidate columns
followed by 0, 1 or 2 noise-reference columns placed at doppler_center
+/- the configured doppler_max, outside the linear Doppler axis. Nothing
in the dump said how many columns were candidates, so the readers either
rejected the file (Acquisition_Dump_Reader) or plotted the reference
columns on a wrong Doppler axis (plot_acq_grid.py, plot_acq_grid.m).

Write a new doppler_num_candidates variable to the dump and use it in
the readers to keep only the candidate columns. Dumps without it are
read as before, except that the reference column of older narrowed
dumps is also skipped. The Python and MATLAB scripts plot a
single-candidate (narrowed) grid as a code-delay line instead of an
empty surface.

Add a regression test that reads back a full-grid dump with two
reference columns and a narrowed N = 5 dump.
2026-09-23 12:46:37 +02:00
Carles Fernandez 0af508713a Fix Acquisition dump readers
Update changelog
Add Joel to the CITATION.cff file
2026-09-01 09:22:38 +02:00
joebre a9c12954f3 python: fix signal-type label when overriding the plotted channel range
apply_conf_defaults() picked the plotted signal-type label as
signals[0].signal whenever --first-channel/--channels was passed
explicitly to override the conf-derived channel range. signals[0] is
just the first enabled signal in SIGNAL_ORDER for the given conf, so
it is only correct when the manually requested range happens to start
at channel 0 of that same signal; for any other range it mislabels
every plot with the wrong signal type, even though the correct .dat
files are read (since --file-prefix is typically also given
explicitly in that case).

For example, running
  --conf EVK1029_Galileo_E1_E5a.conf --file-prefix trk_GalileoE5a_ch \
  --first-channel 10 --channels 10
correctly reads the Galileo E5a tracking dumps but titled every plot
"Galileo E1B", the conf's first enabled signal.

Resolve each requested channel's signal type from the conf's own
per-signal channel ranges (SignalConfig.channels) instead, falling
back to the previous behavior only when no conf is available at all.

Signed-off-by: joebre <joel.brenner@saphyrion.ch>
2026-08-27 15:48:11 +02:00
joebre 6d3bdbc3cc python: add missing BeiDou B1C/SBAS L1 entries to plot SIGNAL_ORDER
SIGNAL_ORDER in utils/python/lib/gnss_sdr_conf.py is meant to mirror
signal_mapping in src/core/receiver/gnss_block_factory.cc, which
GetChannels() walks in a fixed order to assign absolute channel IDs
(consuming Channels_<type>.count channels per entry; the per-channel
Channel<N>.signal lines in the conf file are not used for this).

SIGNAL_ORDER was missing "1D" (BeiDou B1C) and "S1" (SBAS L1), both
present in signal_mapping. Any configuration enabling BeiDou B1C or
SBAS alongside other signal types would get every later signal's
inferred channel range shifted, mislabeling tracking dump plots for
those channels. Added both entries, in the same relative position as
signal_mapping, along with their SignalType metadata.

Signed-off-by: joebre <joel.brenner@saphyrion.ch>
2026-08-27 15:48:02 +02:00
Carles Fernandez cb2c955151 Do not plot CN0 initialization to zero 2026-07-28 10:16:22 +02:00
Carles Fernandez 80d24ee105 Fix vanishing correlation peak in acquisition grid plots of long codes 2026-07-05 13:50:21 +02:00
Carles Fernandez d332fdbb21 Improve Python observables plots 2026-06-26 10:36:12 +02:00
Carles Fernandez 60a1c43f2b Add titles in some Python plots 2026-06-26 08:59:15 +02:00
Carles Fernandez 95ad7d19ec Add possibility to infer Python plot defaults from GNSS-SDR configuration files 2026-06-25 20:49:30 +02:00
minhaj 16cf5e7753 While testing, I found the old version of this script had an old bug.
For some reason, the old script calculated "mean()" of PRN numbers
in a tracking channel. E.g., channel 1 tracked PRN 3 for few seconds,
then tracked PRN 16 for the rest. The script would add legend PRN 9
(3+16)/2 = .... Fixed that and added "PRN-wise tracking indicator" in
addition to the existing "channel-wise tracking indicator"

Signed-off-by: minhaj <minhaj.sixbyte@gmail.com>
2026-06-24 13:01:28 +02:00
minhaj 96a767d353 for debugging, print-out/write csv for investigating the numbers lib/dll_pll_veml_read_tracking_dump.py
if the file is ran by itself. not sure a separate "dump-to-csv" script is needed.

Signed-off-by: minhaj <minhaj.sixbyte@gmail.com>
2026-06-24 13:01:28 +02:00
Carles Fernandez e438d08c6e Parameterize Python plotting utilities in utils/python 2026-06-23 15:49:25 +02:00
minhaj 43bceb52ff 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>
2026-06-19 23:10:01 -05:00
minhaj ec718c6e64 The dll_pll_veml_read_tracking_dump.py file was failing as it didn't read last
two fields (TOW_ms and WN). Probably because this file was written at a time when
these fields were not present in the tracking dump.
This commit fixes that, and plot_tracking_quality_indicator.py is operational now.
This script now also lays out a _RECORD_FORMAT such that it is easily maintainable
if the structure changes again in future in the dll_pll_veml_tracking.cc
Thanks!

Signed-off-by: minhaj <minhaj.sixbyte@gmail.com>
2026-06-19 17:29:08 -05:00
minhaj 2693aa48f9 drop import sys; no longer used
Signed-off-by: minhaj <minhaj.sixbyte@gmail.com>
2026-06-19 16:35:52 -05:00
minhaj 06fb7f0d11 Improved plot_acq_grid.py utility.
- Added a plot_positive_acq filter option, to enable plotting only the positive
  acquisitions.
- Improved the file path processing. Previous version used hardcoded character
  offset that will not work if someone sets custom dump prefix. Now we use
  python's built-in pathlib and split-parse using the "_" separator.
- The scripts used to use two different ways of encoding system,channel,chips,
  one with python dict another with massive if-else nest. This has been uniformed.
- The script used to assume all files in the dump folder would be acquisition dump
  but now we filter for acq dumps using pathlib's glob()

Signed-off-by: minhaj <minhaj.sixbyte@gmail.com>
2026-06-19 16:35:47 -05:00
Carles Fernandez 825037592a Remove build and data folders, move tests and utils to the base of the source tree 2024-10-04 11:55:09 +02:00