mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2026-04-25 00:01:25 +00:00
Observables and all PVT products now are referenced to the uncorrected RX clock, that is guaranteed to be integer multiple of 1 ms
This commit is contained in:
@@ -456,8 +456,9 @@ int galileo_e1b_telemetry_decoder_cc::general_work(int noutput_items __attribute
|
||||
current_symbol.Flag_valid_word = false;
|
||||
}
|
||||
|
||||
current_symbol.TOW_at_current_symbol_s = floor(d_TOW_at_current_symbol * 1000.0) / 1000.0;
|
||||
current_symbol.TOW_at_current_symbol_s -= delta_t; //Galileo to GPS TOW
|
||||
current_symbol.TOW_at_current_symbol_ms = round(d_TOW_at_current_symbol * 1000.0);
|
||||
//todo: Galileo to GPS time conversion should be moved to observable block.
|
||||
//current_symbol.TOW_at_current_symbol_ms -= delta_t; //Galileo to GPS TOW
|
||||
|
||||
if (d_dump == true)
|
||||
{
|
||||
|
||||
@@ -470,7 +470,7 @@ int galileo_e5a_telemetry_decoder_cc::general_work(int noutput_items __attribute
|
||||
current_sample.Flag_valid_word = false;
|
||||
}
|
||||
|
||||
current_sample.TOW_at_current_symbol_s = floor(d_TOW_at_current_symbol * 1000.0) / 1000.0;
|
||||
current_sample.TOW_at_current_symbol_ms = round(d_TOW_at_current_symbol * 1000.0);
|
||||
|
||||
if (d_dump)
|
||||
{
|
||||
|
||||
@@ -413,8 +413,9 @@ int glonass_l1_ca_telemetry_decoder_cc::general_work(int noutput_items __attribu
|
||||
}
|
||||
|
||||
current_symbol.PRN = this->d_satellite.get_PRN();
|
||||
current_symbol.TOW_at_current_symbol_s = d_TOW_at_current_symbol;
|
||||
current_symbol.TOW_at_current_symbol_s -= delta_t; // Galileo to GPS TOW
|
||||
current_symbol.TOW_at_current_symbol_ms = round(d_TOW_at_current_symbol * 1000.0);
|
||||
//todo: glonass time to gps time should be done in observables block
|
||||
//current_symbol.TOW_at_current_symbol_s -= delta_t; // Galileo to GPS TOW
|
||||
|
||||
if (d_dump == true)
|
||||
{
|
||||
|
||||
@@ -413,8 +413,9 @@ int glonass_l2_ca_telemetry_decoder_cc::general_work(int noutput_items __attribu
|
||||
}
|
||||
|
||||
current_symbol.PRN = this->d_satellite.get_PRN();
|
||||
current_symbol.TOW_at_current_symbol_s = d_TOW_at_current_symbol;
|
||||
current_symbol.TOW_at_current_symbol_s -= delta_t; // Galileo to GPS TOW
|
||||
current_symbol.TOW_at_current_symbol_ms = round(d_TOW_at_current_symbol * 1000.0);
|
||||
//todo: glonass time to gps time should be done in observables block
|
||||
//current_symbol.TOW_at_current_symbol_s -= delta_t;
|
||||
|
||||
if (d_dump == true)
|
||||
{
|
||||
|
||||
@@ -91,7 +91,6 @@ gps_l1_ca_telemetry_decoder_cc::gps_l1_ca_telemetry_decoder_cc(
|
||||
d_prev_GPS_frame_4bytes = 0;
|
||||
d_flag_parity = false;
|
||||
d_TOW_at_Preamble = 0.0;
|
||||
d_TOW_at_current_symbol = 0.0;
|
||||
flag_TOW_set = false;
|
||||
d_average_count = 0;
|
||||
d_flag_preamble = false;
|
||||
@@ -396,25 +395,17 @@ int gps_l1_ca_telemetry_decoder_cc::general_work(int noutput_items __attribute__
|
||||
//2. Add the telemetry decoder information
|
||||
if (this->d_flag_preamble == true and d_flag_new_tow_available == true)
|
||||
{
|
||||
//double decoder_latency_ms=(double)(current_symbol.Tracking_sample_counter-d_symbol_history.at(0).Tracking_sample_counter)
|
||||
// /(double)current_symbol.fs;
|
||||
// update TOW at the preamble instant (account with decoder latency)
|
||||
|
||||
d_TOW_at_Preamble = d_GPS_FSM.d_nav.d_TOW + 2.0 * GPS_L1_CA_CODE_PERIOD + GPS_CA_PREAMBLE_DURATION_S;
|
||||
d_TOW_at_current_symbol_ms = static_cast<unsigned int>(d_GPS_FSM.d_nav.d_TOW) * 1000 + 161;
|
||||
//d_TOW_at_current_symbol = floor(d_TOW_at_Preamble * 1000.0) / 1000.0;
|
||||
d_TOW_at_current_symbol = d_TOW_at_Preamble;
|
||||
flag_TOW_set = true;
|
||||
d_flag_new_tow_available = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
d_TOW_at_current_symbol += GPS_L1_CA_CODE_PERIOD;
|
||||
d_TOW_at_current_symbol_ms += GPS_L1_CA_CODE_PERIOD_MS;
|
||||
}
|
||||
|
||||
current_symbol.TOW_at_current_symbol_s = static_cast<double>(d_TOW_at_current_symbol_ms) / 1000.0;
|
||||
//current_symbol.TOW_at_current_symbol_s = d_TOW_at_current_symbol;
|
||||
current_symbol.TOW_at_current_symbol_ms = d_TOW_at_current_symbol_ms;
|
||||
current_symbol.Flag_valid_word = flag_TOW_set;
|
||||
|
||||
if (flag_PLL_180_deg_phase_locked == true)
|
||||
@@ -430,7 +421,7 @@ int gps_l1_ca_telemetry_decoder_cc::general_work(int noutput_items __attribute__
|
||||
{
|
||||
double tmp_double;
|
||||
unsigned long int tmp_ulong_int;
|
||||
tmp_double = d_TOW_at_current_symbol;
|
||||
tmp_double = static_cast<double>(d_TOW_at_current_symbol_ms) / 1000.0;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_double), sizeof(double));
|
||||
tmp_ulong_int = current_symbol.Tracking_sample_counter;
|
||||
d_dump_file.write(reinterpret_cast<char *>(&tmp_ulong_int), sizeof(unsigned long int));
|
||||
|
||||
@@ -112,7 +112,6 @@ private:
|
||||
unsigned long int d_preamble_time_samples;
|
||||
|
||||
double d_TOW_at_Preamble;
|
||||
double d_TOW_at_current_symbol;
|
||||
unsigned int d_TOW_at_current_symbol_ms;
|
||||
|
||||
bool flag_TOW_set;
|
||||
|
||||
@@ -201,7 +201,7 @@ int gps_l2c_telemetry_decoder_cc::general_work(int noutput_items __attribute__((
|
||||
d_flag_valid_word = false;
|
||||
}
|
||||
}
|
||||
current_synchro_data.TOW_at_current_symbol_s = d_TOW_at_current_symbol;
|
||||
current_synchro_data.TOW_at_current_symbol_ms = round(d_TOW_at_current_symbol * 1000.0);
|
||||
current_synchro_data.Flag_valid_word = d_flag_valid_word;
|
||||
|
||||
if (d_dump == true)
|
||||
|
||||
@@ -253,7 +253,7 @@ int gps_l5_telemetry_decoder_cc::general_work(int noutput_items __attribute__((u
|
||||
d_flag_valid_word = false;
|
||||
}
|
||||
}
|
||||
current_synchro_data.TOW_at_current_symbol_s = d_TOW_at_current_symbol;
|
||||
current_synchro_data.TOW_at_current_symbol_ms = round(d_TOW_at_current_symbol * 1000.0);
|
||||
current_synchro_data.Flag_valid_word = d_flag_valid_word;
|
||||
|
||||
if (d_dump == true)
|
||||
|
||||
Reference in New Issue
Block a user