From c0c4544650ca02477acc9e856b3534d20e23f48c Mon Sep 17 00:00:00 2001 From: Vladslav P Date: Fri, 28 Oct 2022 03:47:19 +0300 Subject: [PATCH] acquisition: populate gnss_synchro.fs with acquisition sample rate This makes it possible to use GNSS-SDR-Monitor to monitor acquisition process too. Set AcquisitionMonitor.udp_port to the same value as Monitor.udp_port to see acquisition results. The acquisitions will be shown with a red telemetry mark and no tracking data. Signed-off-by: Vladslav P --- .../acquisition/gnuradio_blocks/pcps_acquisition.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc index a8ac0428e..91753592c 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition.cc @@ -686,12 +686,14 @@ void pcps_acquisition::acquisition_core(uint64_t samp_count) d_gnss_synchro->Acq_delay_samples -= static_cast(d_acq_parameters.resampler_latency_samples); // account the resampler filter latency d_gnss_synchro->Acq_doppler_hz = static_cast(doppler); d_gnss_synchro->Acq_samplestamp_samples = rint(static_cast(samp_count) * d_acq_parameters.resampler_ratio); + d_gnss_synchro->fs = d_acq_parameters.resampled_fs; } else { d_gnss_synchro->Acq_delay_samples = static_cast(std::fmod(static_cast(indext), d_acq_parameters.samples_per_code)); d_gnss_synchro->Acq_doppler_hz = static_cast(doppler); d_gnss_synchro->Acq_samplestamp_samples = samp_count; + d_gnss_synchro->fs = d_acq_parameters.fs_in; } } else @@ -745,6 +747,7 @@ void pcps_acquisition::acquisition_core(uint64_t samp_count) d_gnss_synchro->Acq_doppler_hz = static_cast(doppler); d_gnss_synchro->Acq_samplestamp_samples = rint(static_cast(samp_count) * d_acq_parameters.resampler_ratio); d_gnss_synchro->Acq_doppler_step = d_acq_parameters.doppler_step2; + d_gnss_synchro->fs = d_acq_parameters.resampled_fs; } else { @@ -752,6 +755,7 @@ void pcps_acquisition::acquisition_core(uint64_t samp_count) d_gnss_synchro->Acq_doppler_hz = static_cast(doppler); d_gnss_synchro->Acq_samplestamp_samples = samp_count; d_gnss_synchro->Acq_doppler_step = d_acq_parameters.doppler_step2; + d_gnss_synchro->fs = d_acq_parameters.fs_in; } }