From 3921000ed2f45df3402528cfcbab399829c1f546 Mon Sep 17 00:00:00 2001 From: Antonio Ramos Date: Thu, 22 Feb 2018 19:16:06 +0100 Subject: [PATCH] debug5 --- .../gnuradio_blocks/gps_l1_ca_telemetry_decoder_cc.cc | 4 ++-- .../gnuradio_blocks/gps_l2c_telemetry_decoder_cc.cc | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_cc.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_cc.cc index 4084db964..880b9b7fb 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_cc.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_cc.cc @@ -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; } } diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2c_telemetry_decoder_cc.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2c_telemetry_decoder_cc.cc index be426b70a..95d34aa4f 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2c_telemetry_decoder_cc.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2c_telemetry_decoder_cc.cc @@ -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(msg.tow); + std::cout<<"delta tow at preamble: "<(msg.tow) * 6.0-d_TOW_at_Preamble*6.0<(msg.tow); //std::cout<<"["<<(int)msg.prn<<"] deco delay: "<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(msg.tow) * 6.0 + static_cast(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;