mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-11-16 23:27:28 +00:00
glonass pvt: Fix bug when in PPP_Static mode
Fixes a bug in trk module to provide right observables for position solution computation using the accumulated carrier phase measurements.
This commit is contained in:
@@ -54,9 +54,6 @@
|
||||
#include "control_message_factory.h"
|
||||
|
||||
|
||||
/*!
|
||||
* \todo Include in definition header file
|
||||
*/
|
||||
#define CN0_ESTIMATION_SAMPLES 10
|
||||
#define MINIMUM_VALID_CN0 25
|
||||
#define MAXIMUM_LOCK_FAIL_COUNTER 50
|
||||
@@ -175,6 +172,7 @@ Glonass_L1_Ca_Dll_Pll_Tracking_cc::Glonass_L1_Ca_Dll_Pll_Tracking_cc(
|
||||
d_acq_code_phase_samples = 0.0;
|
||||
d_acq_carrier_doppler_hz = 0.0;
|
||||
d_carrier_doppler_hz = 0.0;
|
||||
d_carrier_doppler_phase_step_rad = 0.0;
|
||||
d_carrier_frequency_hz = 0.0;
|
||||
d_acc_carrier_phase_rad = 0.0;
|
||||
d_code_phase_samples = 0.0;
|
||||
@@ -235,6 +233,7 @@ void Glonass_L1_Ca_Dll_Pll_Tracking_cc::start_tracking()
|
||||
d_carrier_frequency_hz = d_acq_carrier_doppler_hz + d_if_freq + (DFRQ1_GLO * GLONASS_PRN.at(d_acquisition_gnss_synchro->PRN));
|
||||
d_carrier_doppler_hz = d_acq_carrier_doppler_hz;
|
||||
d_carrier_phase_step_rad = GLONASS_TWO_PI * d_carrier_frequency_hz / static_cast<double>(d_fs_in);
|
||||
d_carrier_doppler_phase_step_rad = GLONASS_TWO_PI * (d_carrier_doppler_hz) / static_cast<double>(d_fs_in);
|
||||
|
||||
// DLL/PLL filter initialization
|
||||
d_carrier_loop_filter.initialize(); // initialize the carrier filter
|
||||
@@ -554,9 +553,9 @@ int Glonass_L1_Ca_Dll_Pll_Tracking_cc::general_work (int noutput_items __attribu
|
||||
d_sample_counter = d_sample_counter + samples_offset; // count for the processed samples
|
||||
d_pull_in = false;
|
||||
// take into account the carrier cycles accumulated in the pull in signal alignment
|
||||
d_acc_carrier_phase_rad -= d_carrier_phase_step_rad * samples_offset;
|
||||
d_acc_carrier_phase_rad -= d_carrier_doppler_phase_step_rad * samples_offset;
|
||||
current_synchro_data.Carrier_phase_rads = d_acc_carrier_phase_rad;
|
||||
current_synchro_data.Carrier_Doppler_hz = d_carrier_frequency_hz;
|
||||
current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz;
|
||||
current_synchro_data.fs = d_fs_in;
|
||||
current_synchro_data.correlation_length_ms = 1;
|
||||
*out[0] = current_synchro_data;
|
||||
@@ -605,12 +604,13 @@ int Glonass_L1_Ca_Dll_Pll_Tracking_cc::general_work (int noutput_items __attribu
|
||||
|
||||
//################### PLL COMMANDS #################################################
|
||||
// carrier phase step (NCO phase increment per sample) [rads/sample]
|
||||
d_carrier_doppler_phase_step_rad = GLONASS_TWO_PI * d_carrier_doppler_hz / static_cast<double>(d_fs_in);
|
||||
d_carrier_phase_step_rad = GLONASS_TWO_PI * d_carrier_frequency_hz / static_cast<double>(d_fs_in);
|
||||
// remnant carrier phase to prevent overflow in the code NCO
|
||||
d_rem_carr_phase_rad = d_rem_carr_phase_rad + d_carrier_phase_step_rad * d_current_prn_length_samples;
|
||||
d_rem_carr_phase_rad = fmod(d_rem_carr_phase_rad, GLONASS_TWO_PI);
|
||||
// carrier phase accumulator
|
||||
d_acc_carrier_phase_rad -= d_carrier_phase_step_rad * d_current_prn_length_samples;
|
||||
d_acc_carrier_phase_rad -= d_carrier_doppler_phase_step_rad * d_current_prn_length_samples;
|
||||
|
||||
//################### DLL COMMANDS #################################################
|
||||
// code phase step (Code resampler phase increment per sample) [chips/sample]
|
||||
@@ -657,7 +657,7 @@ int Glonass_L1_Ca_Dll_Pll_Tracking_cc::general_work (int noutput_items __attribu
|
||||
current_synchro_data.Tracking_sample_counter = d_sample_counter + d_current_prn_length_samples;
|
||||
current_synchro_data.Code_phase_samples = d_rem_code_phase_samples;
|
||||
current_synchro_data.Carrier_phase_rads = d_acc_carrier_phase_rad;
|
||||
current_synchro_data.Carrier_Doppler_hz = d_carrier_frequency_hz;
|
||||
current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz;
|
||||
current_synchro_data.CN0_dB_hz = d_CN0_SNV_dB_Hz;
|
||||
current_synchro_data.Flag_valid_symbol_output = true;
|
||||
current_synchro_data.correlation_length_ms = 1;
|
||||
|
||||
@@ -140,6 +140,7 @@ private:
|
||||
double d_code_freq_chips;
|
||||
double d_code_phase_step_chips;
|
||||
double d_carrier_doppler_hz;
|
||||
double d_carrier_doppler_phase_step_rad;
|
||||
double d_carrier_frequency_hz;
|
||||
double d_carrier_phase_step_rad;
|
||||
double d_acc_carrier_phase_rad;
|
||||
|
||||
Reference in New Issue
Block a user