mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-15 12:40:35 +00:00
debug3
This commit is contained in:
parent
592d50af79
commit
e2c2da67c4
@ -1713,11 +1713,9 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
|
|||||||
// DEBUG MESSAGE: Display position in console output
|
// DEBUG MESSAGE: Display position in console output
|
||||||
if( (d_ls_pvt->is_valid_position() == true) && (flag_display_pvt == true) )
|
if( (d_ls_pvt->is_valid_position() == true) && (flag_display_pvt == true) )
|
||||||
{
|
{
|
||||||
std::string text_green = "\033[32m";
|
std::cout << TEXT_GREEN << "Position at " << boost::posix_time::to_simple_string(d_ls_pvt->get_position_UTC_time())
|
||||||
std::string text_reset = "\033[0m";
|
|
||||||
std::cout << text_green << "Position at " << boost::posix_time::to_simple_string(d_ls_pvt->get_position_UTC_time())
|
|
||||||
<< " UTC using " << d_ls_pvt->get_num_valid_observations() << " observations is Lat = " << d_ls_pvt->get_latitude() << " [deg], Long = " << d_ls_pvt->get_longitude()
|
<< " UTC using " << d_ls_pvt->get_num_valid_observations() << " observations is Lat = " << d_ls_pvt->get_latitude() << " [deg], Long = " << d_ls_pvt->get_longitude()
|
||||||
<< " [deg], Height= " << d_ls_pvt->get_height() << " [m]" << text_reset << std::endl;
|
<< " [deg], Height= " << d_ls_pvt->get_height() << " [m]" << TEXT_RESET << std::endl;
|
||||||
|
|
||||||
LOG(INFO) << "Position at " << boost::posix_time::to_simple_string(d_ls_pvt->get_position_UTC_time())
|
LOG(INFO) << "Position at " << boost::posix_time::to_simple_string(d_ls_pvt->get_position_UTC_time())
|
||||||
<< " UTC using "<< d_ls_pvt->get_num_valid_observations() << " observations is Lat = " << d_ls_pvt->get_latitude() << " [deg], Long = " << d_ls_pvt->get_longitude()
|
<< " UTC using "<< d_ls_pvt->get_num_valid_observations() << " observations is Lat = " << d_ls_pvt->get_latitude() << " [deg], Long = " << d_ls_pvt->get_longitude()
|
||||||
|
@ -350,11 +350,19 @@ int gps_l1_ca_telemetry_decoder_cc::general_work (int noutput_items __attribute_
|
|||||||
//double decoder_latency_ms=(double)(current_symbol.Tracking_sample_counter-d_symbol_history.at(0).Tracking_sample_counter)
|
//double decoder_latency_ms=(double)(current_symbol.Tracking_sample_counter-d_symbol_history.at(0).Tracking_sample_counter)
|
||||||
// /(double)current_symbol.fs;
|
// /(double)current_symbol.fs;
|
||||||
// update TOW at the preamble instant (account with decoder latency)
|
// update TOW at the preamble instant (account with decoder latency)
|
||||||
d_TOW_at_Preamble = d_GPS_FSM.d_nav.d_TOW + 2 * GPS_L1_CA_CODE_PERIOD + GPS_CA_PREAMBLE_DURATION_S;
|
double tmp_tow = d_TOW_at_current_symbol + GPS_L1_CA_CODE_PERIOD;
|
||||||
|
|
||||||
|
d_TOW_at_Preamble = d_GPS_FSM.d_nav.d_TOW + 2 * GPS_L1_CA_CODE_PERIOD + GPS_CA_PREAMBLE_DURATION_S;
|
||||||
d_TOW_at_current_symbol = floor(d_TOW_at_Preamble * 1000.0) / 1000.0;
|
d_TOW_at_current_symbol = floor(d_TOW_at_Preamble * 1000.0) / 1000.0;
|
||||||
flag_TOW_set = true;
|
flag_TOW_set = true;
|
||||||
d_flag_new_tow_available = false;
|
d_flag_new_tow_available = false;
|
||||||
|
double tmp_diff = std::fabs(tmp_tow - d_TOW_at_current_symbol);
|
||||||
|
if ((tmp_tow != 0) or (tmp_diff > 0.0))
|
||||||
|
{
|
||||||
|
std::cout << TEXT_RED <<
|
||||||
|
"GPS L1 C/A. TOW incoherence on channel: "<< d_channel << ". TOW difference = " <<
|
||||||
|
tmp_diff * 1000.0 << " [ms]" << TEXT_RESET << std::endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -156,17 +156,15 @@ int gps_l2c_telemetry_decoder_cc::general_work (int noutput_items __attribute__(
|
|||||||
//* delay by the formulae:
|
//* delay by the formulae:
|
||||||
//* \code
|
//* \code
|
||||||
//* symbolTime_ms = msg->tow * 6000 + *pdelay * 20 + (12 * 20); 12 symbols of the encoder's transitory
|
//* 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;
|
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 = 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);
|
double tmp_diff = std::fabs(tmp_tow - d_TOW_at_current_symbol);
|
||||||
if ((tmp_tow != 0) or (tmp_diff > 0.0))
|
if ((tmp_tow != 0) or (tmp_diff > 0.0))
|
||||||
{
|
{
|
||||||
std::string text_red = "\033[31m";
|
std::cout << TEXT_RED <<
|
||||||
std::string text_reset = "\033[0m";
|
|
||||||
std::cout << text_red <<
|
|
||||||
"GPS L2C. TOW incoherence on channel: "<< d_channel << ". TOW difference = " <<
|
"GPS L2C. TOW incoherence on channel: "<< d_channel << ". TOW difference = " <<
|
||||||
tmp_diff * 1000.0 << " [ms]" << text_reset << std::endl;
|
tmp_diff * 1000.0 << " [ms]" << TEXT_RESET << std::endl;
|
||||||
}
|
}
|
||||||
d_flag_valid_word = true;
|
d_flag_valid_word = true;
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,8 @@
|
|||||||
#ifndef GNSS_SDR_MATH_CONSTANTS_H_
|
#ifndef GNSS_SDR_MATH_CONSTANTS_H_
|
||||||
#define GNSS_SDR_MATH_CONSTANTS_H_
|
#define GNSS_SDR_MATH_CONSTANTS_H_
|
||||||
|
|
||||||
|
#include<string>
|
||||||
|
|
||||||
/* Constants for scaling the ephemeris found in the data message
|
/* Constants for scaling the ephemeris found in the data message
|
||||||
the format is the following: TWO_N5 -> 2^-5, TWO_P4 -> 2^4, PI_TWO_N43 -> Pi*2^-43, etc etc
|
the format is the following: TWO_N5 -> 2^-5, TWO_P4 -> 2^4, PI_TWO_N43 -> Pi*2^-43, etc etc
|
||||||
Additionally some of the PI*2^N terms are used in the tracking stuff
|
Additionally some of the PI*2^N terms are used in the tracking stuff
|
||||||
@ -41,6 +43,11 @@
|
|||||||
ONE_PI_TWO_PX = (1/Pi)*2^X
|
ONE_PI_TWO_PX = (1/Pi)*2^X
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
const std::string TEXT_RED = "\033[31m";
|
||||||
|
const std::string TEXT_GREEN = "\033[32m";
|
||||||
|
const std::string TEXT_RESET = "\033[0m";
|
||||||
|
|
||||||
|
|
||||||
const double PI = 3.1415926535897932; //!< pi
|
const double PI = 3.1415926535897932; //!< pi
|
||||||
const double PI_2 = 2.0 * PI; //!< 2 * pi
|
const double PI_2 = 2.0 * PI; //!< 2 * pi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user