mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-11-23 18:44:52 +00:00
Process optimization: Moved the receiver stdout status output
(a.k.a seconds counter) from the tracking blocks to PVT block
This commit is contained in:
@@ -102,6 +102,8 @@ galileo_e1_pvt_cc::galileo_e1_pvt_cc(unsigned int nchannels, boost::shared_ptr<g
|
||||
b_rtcm_writing_started = false;
|
||||
rp = std::make_shared<Rinex_Printer>();
|
||||
|
||||
d_last_status_print_seg=0;
|
||||
|
||||
// ############# ENABLE DATA FILE LOG #################
|
||||
if (d_dump == true)
|
||||
{
|
||||
@@ -134,6 +136,18 @@ bool galileo_e1_pvt_cc::pseudoranges_pairCompare_min(const std::pair<int,Gnss_Sy
|
||||
}
|
||||
|
||||
|
||||
void galileo_e1_pvt_cc::print_receiver_status(Gnss_Synchro** channels_synchronization_data)
|
||||
{
|
||||
// Print the current receiver status using std::cout every second
|
||||
int current_rx_seg=floor(channels_synchronization_data[0][0].Tracking_timestamp_secs);
|
||||
if ( current_rx_seg!= d_last_status_print_seg)
|
||||
{
|
||||
d_last_status_print_seg = current_rx_seg;
|
||||
std::cout << "Current input signal time = " << current_rx_seg << " [s]" << std::endl<< std::flush;
|
||||
//DLOG(INFO) << "GPS L1 C/A Tracking CH " << d_channel << ": Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN)
|
||||
// << ", CN0 = " << d_CN0_SNV_dB_Hz << " [dB-Hz]" << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
int galileo_e1_pvt_cc::general_work (int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
|
||||
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items __attribute__((unused)))
|
||||
@@ -144,6 +158,8 @@ int galileo_e1_pvt_cc::general_work (int noutput_items __attribute__((unused)),
|
||||
|
||||
Gnss_Synchro **in = (Gnss_Synchro **) &input_items[0]; //Get the input pointer
|
||||
|
||||
print_receiver_status(in);
|
||||
|
||||
for (unsigned int i = 0; i < d_nchannels; i++)
|
||||
{
|
||||
if (in[i][0].Flag_valid_pseudorange == true)
|
||||
|
||||
@@ -102,6 +102,9 @@ private:
|
||||
bool b_rinex_header_updated;
|
||||
bool b_rtcm_writing_started;
|
||||
|
||||
void print_receiver_status(Gnss_Synchro** channels_synchronization_data);
|
||||
int d_last_status_print_seg; //for status printer
|
||||
|
||||
unsigned int d_nchannels;
|
||||
std::string d_dump_filename;
|
||||
std::ofstream d_dump_file;
|
||||
|
||||
@@ -115,6 +115,8 @@ gps_l1_ca_pvt_cc::gps_l1_ca_pvt_cc(unsigned int nchannels,
|
||||
d_last_sample_nav_output = 0;
|
||||
d_rx_time = 0.0;
|
||||
|
||||
d_last_status_print_seg = 0;
|
||||
|
||||
b_rinex_header_writen = false;
|
||||
b_rinex_header_updated = false;
|
||||
b_rinex_sbs_header_writen = false;
|
||||
@@ -131,7 +133,7 @@ gps_l1_ca_pvt_cc::gps_l1_ca_pvt_cc(unsigned int nchannels,
|
||||
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);
|
||||
LOG(INFO) << "PVT dump enabled Log file: " << d_dump_filename.c_str();
|
||||
}
|
||||
catch (std::ifstream::failure e)
|
||||
catch (const std::ifstream::failure & e)
|
||||
{
|
||||
LOG(INFO) << "Exception opening PVT dump file " << e.what();
|
||||
}
|
||||
@@ -152,6 +154,18 @@ bool pseudoranges_pairCompare_min(const std::pair<int,Gnss_Synchro>& a, const st
|
||||
}
|
||||
|
||||
|
||||
void gps_l1_ca_pvt_cc::print_receiver_status(Gnss_Synchro** channels_synchronization_data)
|
||||
{
|
||||
// Print the current receiver status using std::cout every second
|
||||
int current_rx_seg=floor(channels_synchronization_data[0][0].Tracking_timestamp_secs);
|
||||
if ( current_rx_seg!= d_last_status_print_seg)
|
||||
{
|
||||
d_last_status_print_seg = current_rx_seg;
|
||||
std::cout << "Current input signal time = " << current_rx_seg << " [s]" << std::endl<< std::flush;
|
||||
//DLOG(INFO) << "GPS L1 C/A Tracking CH " << d_channel << ": Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN)
|
||||
// << ", CN0 = " << d_CN0_SNV_dB_Hz << " [dB-Hz]" << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
int gps_l1_ca_pvt_cc::general_work (int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
|
||||
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items __attribute__((unused)))
|
||||
@@ -163,6 +177,8 @@ int gps_l1_ca_pvt_cc::general_work (int noutput_items __attribute__((unused)), g
|
||||
Gnss_Synchro **in = (Gnss_Synchro **) &input_items[0]; //Get the input pointer
|
||||
//Gnss_Synchro **out = (Gnss_Synchro **) &output_items[0]; //Get the output pointer
|
||||
|
||||
print_receiver_status(in);
|
||||
|
||||
// ############ 1. READ EPHEMERIS FROM GLOBAL MAP ####
|
||||
d_ls_pvt->gps_ephemeris_map = global_gps_ephemeris_map.get_map_copy();
|
||||
|
||||
|
||||
@@ -103,6 +103,9 @@ private:
|
||||
bool b_rinex_header_updated;
|
||||
bool b_rtcm_writing_started;
|
||||
|
||||
void print_receiver_status(Gnss_Synchro** channels_synchronization_data);
|
||||
int d_last_status_print_seg; //for status printer
|
||||
|
||||
unsigned int d_nchannels;
|
||||
std::string d_dump_filename;
|
||||
std::ofstream d_dump_file;
|
||||
|
||||
@@ -105,6 +105,8 @@ hybrid_pvt_cc::hybrid_pvt_cc(unsigned int nchannels, boost::shared_ptr<gr::msg_q
|
||||
b_rinex_header_updated = false;
|
||||
rp = std::make_shared<Rinex_Printer>();
|
||||
|
||||
d_last_status_print_seg=0;
|
||||
|
||||
// ############# ENABLE DATA FILE LOG #################
|
||||
if (d_dump == true)
|
||||
{
|
||||
@@ -137,6 +139,18 @@ bool hybrid_pvt_cc::pseudoranges_pairCompare_min(const std::pair<int,Gnss_Synchr
|
||||
}
|
||||
|
||||
|
||||
void hybrid_pvt_cc::print_receiver_status(Gnss_Synchro** channels_synchronization_data)
|
||||
{
|
||||
// Print the current receiver status using std::cout every second
|
||||
int current_rx_seg=floor(channels_synchronization_data[0][0].Tracking_timestamp_secs);
|
||||
if ( current_rx_seg!= d_last_status_print_seg)
|
||||
{
|
||||
d_last_status_print_seg = current_rx_seg;
|
||||
std::cout << "Current input signal time = " << current_rx_seg << " [s]" << std::endl<< std::flush;
|
||||
//DLOG(INFO) << "GPS L1 C/A Tracking CH " << d_channel << ": Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN)
|
||||
// << ", CN0 = " << d_CN0_SNV_dB_Hz << " [dB-Hz]" << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
int hybrid_pvt_cc::general_work (int noutput_items __attribute__((unused)), gr_vector_int &ninput_items __attribute__((unused)),
|
||||
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items __attribute__((unused)))
|
||||
@@ -148,6 +162,8 @@ int hybrid_pvt_cc::general_work (int noutput_items __attribute__((unused)), gr_v
|
||||
|
||||
Gnss_Synchro **in = (Gnss_Synchro **) &input_items[0]; //Get the input pointer
|
||||
|
||||
print_receiver_status(in);
|
||||
|
||||
for (unsigned int i = 0; i < d_nchannels; i++)
|
||||
{
|
||||
if (in[i][0].Flag_valid_pseudorange == true)
|
||||
|
||||
@@ -101,6 +101,9 @@ private:
|
||||
bool b_rinex_header_writen;
|
||||
bool b_rinex_header_updated;
|
||||
|
||||
void print_receiver_status(Gnss_Synchro** channels_synchronization_data);
|
||||
int d_last_status_print_seg; //for status printer
|
||||
|
||||
unsigned int d_nchannels;
|
||||
std::string d_dump_filename;
|
||||
std::ofstream d_dump_file;
|
||||
|
||||
Reference in New Issue
Block a user