1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-15 20:50:33 +00:00
This commit is contained in:
Antonio Ramos 2018-02-22 19:16:06 +01:00
parent 44f05263f0
commit 3921000ed2
2 changed files with 8 additions and 6 deletions

View File

@ -357,10 +357,10 @@ int gps_l1_ca_telemetry_decoder_cc::general_work (int noutput_items __attribute_
flag_TOW_set = true;
d_flag_new_tow_available = false;
double tmp_diff = std::fabs(tmp_tow - d_TOW_at_current_symbol);
if (tmp_diff > 0.0)
if (tmp_diff > 0.000001)
{
std::cout << TEXT_RED <<
"GPS L1 C/A. TOW incoherence on channel: "<< d_channel << ". TOW difference = " <<
"GPS L1 C/A. TOW incoherence on PRN: "<< current_symbol.PRN << ". TOW difference = " <<
tmp_diff * 1000.0 << " [ms]" << TEXT_RESET << std::endl;
}
}

View File

@ -150,7 +150,8 @@ int gps_l2c_telemetry_decoder_cc::general_work (int noutput_items __attribute__(
}
//update TOW at the preamble instant
d_TOW_at_Preamble = static_cast<int>(msg.tow);
std::cout<<"delta tow at preamble: "<<static_cast<double>(msg.tow) * 6.0-d_TOW_at_Preamble*6.0<<std::endl;
d_TOW_at_Preamble = static_cast<double>(msg.tow);
//std::cout<<"["<<(int)msg.prn<<"] deco delay: "<<delay<<"[symbols]"<<std::endl;
//* The time of the last input symbol can be computed from the message ToW and
//* delay by the formulae:
@ -158,12 +159,13 @@ int gps_l2c_telemetry_decoder_cc::general_work (int noutput_items __attribute__(
//* symbolTime_ms = msg->tow * 6000 + *pdelay * 20 + (12 * 20); 12 symbols of the encoder's transitory
double tmp_tow = d_TOW_at_current_symbol + GPS_L2_M_PERIOD;
d_TOW_at_current_symbol = static_cast<double>(msg.tow) * 6.0 + static_cast<double>(delay) * GPS_L2_M_PERIOD + 12 * GPS_L2_M_PERIOD;
d_TOW_at_current_symbol = floor(d_TOW_at_current_symbol * 1000.0) / 1000.0;
//d_TOW_at_current_symbol = floor(d_TOW_at_current_symbol * 1000.0) / 1000.0;
double tmp_diff = std::fabs(tmp_tow - d_TOW_at_current_symbol);
if ((tmp_tow != 0) or (tmp_diff > 0.0))
if (tmp_diff > 0.000001)
{
std::cout << TEXT_RED <<
"GPS L2C. TOW incoherence on channel: "<< d_channel << ". TOW difference = " <<
"GPS L2C. TOW incoherence on PRN: "<< current_synchro_data.PRN << ". TOW difference = " <<
tmp_diff * 1000.0 << " [ms]" << TEXT_RESET << std::endl;
}
d_flag_valid_word = true;