From e354b1ce53a6e615e4b0066f829861a6cb5082ac Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Mon, 4 May 2015 22:16:26 +0200 Subject: [PATCH] less verbose logging in Release --- src/algorithms/PVT/libs/galileo_e1_ls_pvt.cc | 4 ++-- src/algorithms/PVT/libs/gps_l1_ca_ls_pvt.cc | 10 ++++----- src/algorithms/PVT/libs/hybrid_ls_pvt.cc | 6 ++--- .../gps_l1_ca_dll_pll_tracking_cc.cc | 7 +++--- src/core/receiver/gnss_flowgraph.cc | 22 +++++++------------ 5 files changed, 21 insertions(+), 28 deletions(-) diff --git a/src/algorithms/PVT/libs/galileo_e1_ls_pvt.cc b/src/algorithms/PVT/libs/galileo_e1_ls_pvt.cc index e793b7ea0..a13c3b561 100644 --- a/src/algorithms/PVT/libs/galileo_e1_ls_pvt.cc +++ b/src/algorithms/PVT/libs/galileo_e1_ls_pvt.cc @@ -308,7 +308,7 @@ bool galileo_e1_ls_pvt::get_PVT(std::map gnss_pseudoranges_map //end debug // SV ECEF DEBUG OUTPUT - LOG(INFO) << "ECEF satellite SV ID=" << galileo_ephemeris_iter->second.i_satellite_PRN + DLOG(INFO) << "ECEF satellite SV ID=" << galileo_ephemeris_iter->second.i_satellite_PRN << " X=" << galileo_ephemeris_iter->second.d_satpos_X << " [m] Y=" << galileo_ephemeris_iter->second.d_satpos_Y << " [m] Z=" << galileo_ephemeris_iter->second.d_satpos_Z @@ -345,7 +345,7 @@ bool galileo_e1_ls_pvt::get_PVT(std::map gnss_pseudoranges_map // 22 August 1999 00:00 last Galileo start GST epoch (ICD sec 5.1.2) boost::posix_time::ptime p_time(boost::gregorian::date(1999, 8, 22), t); d_position_UTC_time = p_time; - LOG(INFO) << "Galileo Position at TOW=" << galileo_current_time << " in ECEF (X,Y,Z) = " << mypos; + DLOG(INFO) << "Galileo Position at TOW=" << galileo_current_time << " in ECEF (X,Y,Z) = " << mypos; cart2geo(static_cast(mypos(0)), static_cast(mypos(1)), static_cast(mypos(2)), 4); //ToDo: Find an Observables/PVT random bug with some satellite configurations that gives an erratic PVT solution (i.e. height>50 km) diff --git a/src/algorithms/PVT/libs/gps_l1_ca_ls_pvt.cc b/src/algorithms/PVT/libs/gps_l1_ca_ls_pvt.cc index 4323ae504..d58cc73df 100644 --- a/src/algorithms/PVT/libs/gps_l1_ca_ls_pvt.cc +++ b/src/algorithms/PVT/libs/gps_l1_ca_ls_pvt.cc @@ -289,7 +289,7 @@ bool gps_l1_ca_ls_pvt::get_PVT(std::map gnss_pseudoranges_map, valid_obs++; // SV ECEF DEBUG OUTPUT - LOG(INFO) << "(new)ECEF satellite SV ID=" << gps_ephemeris_iter->second.i_satellite_PRN + DLOG(INFO) << "(new)ECEF satellite SV ID=" << gps_ephemeris_iter->second.i_satellite_PRN << " X=" << gps_ephemeris_iter->second.d_satpos_X << " [m] Y=" << gps_ephemeris_iter->second.d_satpos_Y << " [m] Z=" << gps_ephemeris_iter->second.d_satpos_Z @@ -318,11 +318,11 @@ bool gps_l1_ca_ls_pvt::get_PVT(std::map gnss_pseudoranges_map, if (valid_obs >= 4) { arma::vec mypos; - LOG(INFO) << "satpos=" << satpos; - LOG(INFO) << "obs=" << obs; - LOG(INFO) << "W=" << W; + DLOG(INFO) << "satpos=" << satpos; + DLOG(INFO) << "obs=" << obs; + DLOG(INFO) << "W=" << W; mypos = leastSquarePos(satpos, obs, W); - LOG(INFO) << "(new)Position at TOW=" << GPS_current_time << " in ECEF (X,Y,Z) = " << mypos; + DLOG(INFO) << "(new)Position at TOW=" << GPS_current_time << " in ECEF (X,Y,Z) = " << mypos; gps_l1_ca_ls_pvt::cart2geo(mypos(0), mypos(1), mypos(2), 4); //ToDo: Find an Observables/PVT random bug with some satellite configurations that gives an erratic PVT solution (i.e. height>50 km) if (d_height_m > 50000) diff --git a/src/algorithms/PVT/libs/hybrid_ls_pvt.cc b/src/algorithms/PVT/libs/hybrid_ls_pvt.cc index ca81f2aa4..cd644c0fe 100644 --- a/src/algorithms/PVT/libs/hybrid_ls_pvt.cc +++ b/src/algorithms/PVT/libs/hybrid_ls_pvt.cc @@ -318,7 +318,7 @@ bool hybrid_ls_pvt::get_PVT(std::map gnss_pseudoranges_map, do //end debug // SV ECEF DEBUG OUTPUT - LOG(INFO) << "ECEF satellite SV ID=" << galileo_ephemeris_iter->second.i_satellite_PRN + DLOG(INFO) << "ECEF satellite SV ID=" << galileo_ephemeris_iter->second.i_satellite_PRN << " X=" << galileo_ephemeris_iter->second.d_satpos_X << " [m] Y=" << galileo_ephemeris_iter->second.d_satpos_Y << " [m] Z=" << galileo_ephemeris_iter->second.d_satpos_Z @@ -369,7 +369,7 @@ bool hybrid_ls_pvt::get_PVT(std::map gnss_pseudoranges_map, do valid_obs++; valid_obs_GPS_counter++; // SV ECEF DEBUG OUTPUT - LOG(INFO) << "(new)ECEF satellite SV ID=" << gps_ephemeris_iter->second.i_satellite_PRN + DLOG(INFO) << "(new)ECEF satellite SV ID=" << gps_ephemeris_iter->second.i_satellite_PRN << " X=" << gps_ephemeris_iter->second.d_satpos_X << " [m] Y=" << gps_ephemeris_iter->second.d_satpos_Y << " [m] Z=" << gps_ephemeris_iter->second.d_satpos_Z @@ -414,7 +414,7 @@ bool hybrid_ls_pvt::get_PVT(std::map gnss_pseudoranges_map, do // 22 August 1999 00:00 last Galileo start GST epoch (ICD sec 5.1.2) boost::posix_time::ptime p_time(boost::gregorian::date(1999, 8, 22), t); d_position_UTC_time = p_time; - LOG(INFO) << "HYBRID Position at TOW=" << hybrid_current_time << " in ECEF (X,Y,Z) = " << mypos; + DLOG(INFO) << "HYBRID Position at TOW=" << hybrid_current_time << " in ECEF (X,Y,Z) = " << mypos; cart2geo(static_cast(mypos(0)), static_cast(mypos(1)), static_cast(mypos(2)), 4); //ToDo: Find an Observables/PVT random bug with some satellite configurations that gives an erratic PVT solution (i.e. height>50 km) diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_cc.cc index 2b2a02ed1..ccea190d2 100644 --- a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_cc.cc @@ -178,7 +178,7 @@ void Gps_L1_Ca_Dll_Pll_Tracking_cc::start_tracking() long int acq_trk_diff_samples; float acq_trk_diff_seconds; acq_trk_diff_samples = static_cast(d_sample_counter) - static_cast(d_acq_sample_stamp);//-d_vector_length; - LOG(INFO) << "Number of samples between Acquisition and Tracking =" << acq_trk_diff_samples; + DLOG(INFO) << "Number of samples between Acquisition and Tracking =" << acq_trk_diff_samples; acq_trk_diff_seconds = static_cast(acq_trk_diff_samples) / static_cast(d_fs_in); //doppler effect // Fd=(C/(C+Vr))*F @@ -513,9 +513,8 @@ int Gps_L1_Ca_Dll_Pll_Tracking_cc::general_work (int noutput_items, gr_vector_in if (floor(d_sample_counter / d_fs_in) != d_last_seg) { d_last_seg = floor(d_sample_counter / d_fs_in); - LOG(INFO) << "Tracking CH " << d_channel << ": Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) - << ", CN0 = " << d_CN0_SNV_dB_Hz << " [dB-Hz]"; - //std::cout<<"TRK CH "<PRN) + << ", CN0 = " << d_CN0_SNV_dB_Hz << " [dB-Hz]"; } } } diff --git a/src/core/receiver/gnss_flowgraph.cc b/src/core/receiver/gnss_flowgraph.cc index 0f5def09c..704479b1e 100644 --- a/src/core/receiver/gnss_flowgraph.cc +++ b/src/core/receiver/gnss_flowgraph.cc @@ -383,7 +383,7 @@ void GNSSFlowgraph::wait() */ void GNSSFlowgraph::apply_action(unsigned int who, unsigned int what) { - LOG(INFO) << "received " << what << " from " << who; + DLOG(INFO) << "received " << what << " from " << who; switch (what) { @@ -418,13 +418,10 @@ void GNSSFlowgraph::apply_action(unsigned int who, unsigned int what) channels_.at(i)->start_acquisition(); break; } + DLOG(INFO) << "Channel " << i << " in state " << channels_state_[i]; } } - for (unsigned int i = 0; i < channels_count_; i++) - { - LOG(INFO) << "Channel " << i << " in state " << channels_state_[i] << std::endl; - } break; case 2: @@ -441,16 +438,16 @@ void GNSSFlowgraph::apply_action(unsigned int who, unsigned int what) channels_.at(who)->standby(); } - for (unsigned int i = 0; i < channels_count_; i++) - { - LOG(INFO) << "Channel " << i << " in state " << channels_state_[i] << std::endl; - } + // for (unsigned int i = 0; i < channels_count_; i++) + // { + // LOG(INFO) << "Channel " << i << " in state " << channels_state_[i] << std::endl; + // } break; default: break; } - LOG(INFO) << "Number of available satellites: " << available_GNSS_signals_.size(); + DLOG(INFO) << "Number of available satellites: " << available_GNSS_signals_.size(); } @@ -694,11 +691,8 @@ void GNSSFlowgraph::set_channels_state() } else channels_state_.push_back(0); + DLOG(INFO) << "Channel " << i << " in state " << channels_state_[i]; } acq_channels_count_ = max_acq_channels_; DLOG(INFO) << acq_channels_count_ << " channels in acquisition state"; - for (unsigned int i = 0; i < channels_count_; i++) - { - LOG(INFO) << "Channel " << i << " in state " << channels_state_[i]; - } }