From f85887ee10b93fdd3d212c995f870c96c39b7495 Mon Sep 17 00:00:00 2001 From: Damian Miralles Date: Fri, 22 Dec 2017 15:08:54 -0700 Subject: [PATCH] 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. --- conf/gnss-sdr_GLONASS_L1_CA_ibyte.conf | 8 ++++---- conf/gnss-sdr_GPS_L1_CA_ibyte.conf | 2 +- .../glonass_l1_ca_dll_pll_tracking_cc.cc | 14 +++++++------- .../glonass_l1_ca_dll_pll_tracking_cc.h | 1 + 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/conf/gnss-sdr_GLONASS_L1_CA_ibyte.conf b/conf/gnss-sdr_GLONASS_L1_CA_ibyte.conf index d6cbbf891..e5e3e4d3a 100644 --- a/conf/gnss-sdr_GLONASS_L1_CA_ibyte.conf +++ b/conf/gnss-sdr_GLONASS_L1_CA_ibyte.conf @@ -27,7 +27,7 @@ Resampler.item_type=gr_complex ;######### CHANNELS GLOBAL CONFIG ############ Channel.signal=1G Channels.in_acquisition=1 -Channels_1G.count=8 +Channels_1G.count=5 Channel0.satellite=24 ; k= Channel1.satellite=1 ; k=1 @@ -43,9 +43,9 @@ Acquisition_1G.pfa=0.0001 Acquisition_1G.if=0 Acquisition_1G.doppler_max=10000 Acquisition_1G.doppler_step=250 -Acquisition_1G.dump=true; +Acquisition_1G.dump=false; Acquisition_1G.dump_filename=/archive/glo_acquisition.dat -Acquisition_1G.coherent_integration_time_ms=1 +;Acquisition_1G.coherent_integration_time_ms=1 ;Acquisition_1G.max_dwells = 5 ;######### TRACKING GLOBAL CONFIG ############ @@ -72,7 +72,7 @@ PVT.positioning_mode=Single PVT.output_rate_ms=100 PVT.display_rate_ms=500 PVT.trop_model=Saastamoinen -PVT.flag_rtcm_server=true +PVT.flag_rtcm_server=false PVT.flag_rtcm_tty_port=false PVT.rtcm_dump_devname=/dev/pts/1 PVT.rtcm_tcp_port=2101 diff --git a/conf/gnss-sdr_GPS_L1_CA_ibyte.conf b/conf/gnss-sdr_GPS_L1_CA_ibyte.conf index ecb652dca..9de3c4e6b 100644 --- a/conf/gnss-sdr_GPS_L1_CA_ibyte.conf +++ b/conf/gnss-sdr_GPS_L1_CA_ibyte.conf @@ -78,7 +78,7 @@ Observables.dump_filename=/archive/gps_observables.dat ;######### PVT CONFIG ############ PVT.implementation=RTKLIB_PVT -PVT.positioning_mode=Single +PVT.positioning_mode=PPP_Static PVT.output_rate_ms=100 PVT.display_rate_ms=500 PVT.trop_model=Saastamoinen diff --git a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_tracking_cc.cc index 89c6b5cfe..c7926ac3b 100644 --- a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_tracking_cc.cc @@ -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(d_fs_in); + d_carrier_doppler_phase_step_rad = GLONASS_TWO_PI * (d_carrier_doppler_hz) / static_cast(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(d_fs_in); d_carrier_phase_step_rad = GLONASS_TWO_PI * d_carrier_frequency_hz / static_cast(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; diff --git a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_tracking_cc.h b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_tracking_cc.h index 4e080fae2..3e7a0cb14 100644 --- a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_tracking_cc.h +++ b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_tracking_cc.h @@ -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;