mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-11-10 12:13:07 +00:00
Replace std::endl by \n character. There is no need to always flush the stream.
This commit is contained in:
@@ -122,7 +122,7 @@ hybrid_observables_gs::hybrid_observables_gs(const Obs_Conf &conf_) : gr::block(
|
||||
// create directory
|
||||
if (!gnss_sdr_create_directory(dump_path))
|
||||
{
|
||||
std::cerr << "GNSS-SDR cannot create dump file for the Observables block. Wrong permissions?" << std::endl;
|
||||
std::cerr << "GNSS-SDR cannot create dump file for the Observables block. Wrong permissions?\n";
|
||||
d_dump = false;
|
||||
}
|
||||
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
||||
@@ -230,7 +230,7 @@ int32_t hybrid_observables_gs::save_matfile() const
|
||||
int32_t number_of_double_vars = 7;
|
||||
int32_t epoch_size_bytes = sizeof(double) * number_of_double_vars * d_nchannels_out;
|
||||
std::ifstream dump_file;
|
||||
std::cout << "Generating .mat file for " << dump_filename << std::endl;
|
||||
std::cout << "Generating .mat file for " << dump_filename << '\n';
|
||||
dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
||||
try
|
||||
{
|
||||
@@ -238,7 +238,7 @@ int32_t hybrid_observables_gs::save_matfile() const
|
||||
}
|
||||
catch (const std::ifstream::failure &e)
|
||||
{
|
||||
std::cerr << "Problem opening dump file:" << e.what() << std::endl;
|
||||
std::cerr << "Problem opening dump file:" << e.what() << '\n';
|
||||
return 1;
|
||||
}
|
||||
// count number of epochs and rewind
|
||||
@@ -284,7 +284,7 @@ int32_t hybrid_observables_gs::save_matfile() const
|
||||
}
|
||||
catch (const std::ifstream::failure &e)
|
||||
{
|
||||
std::cerr << "Problem reading dump file:" << e.what() << std::endl;
|
||||
std::cerr << "Problem reading dump file:" << e.what() << '\n';
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -400,14 +400,14 @@ bool hybrid_observables_gs::interp_trk_obs(Gnss_Synchro &interpolated_obs, uint3
|
||||
if (rx_clock > d_gnss_synchro_history->get(ch, nearest_element).Tracking_sample_counter)
|
||||
{
|
||||
// std::cout << "S1= " << d_gnss_synchro_history->get(ch, nearest_element).Tracking_sample_counter
|
||||
// << " Si=" << rx_clock << " S2=" << d_gnss_synchro_history->get(ch, neighbor_element).Tracking_sample_counter << std::endl;
|
||||
// << " Si=" << rx_clock << " S2=" << d_gnss_synchro_history->get(ch, neighbor_element).Tracking_sample_counter << '\n';
|
||||
t1_idx = nearest_element;
|
||||
t2_idx = neighbor_element;
|
||||
}
|
||||
else
|
||||
{
|
||||
// std::cout << "inv S1= " << d_gnss_synchro_history->get(ch, neighbor_element).Tracking_sample_counter
|
||||
// << " Si=" << rx_clock << " S2=" << d_gnss_synchro_history->get(ch, nearest_element).Tracking_sample_counter << std::endl;
|
||||
// << " Si=" << rx_clock << " S2=" << d_gnss_synchro_history->get(ch, nearest_element).Tracking_sample_counter << '\n';
|
||||
t1_idx = neighbor_element;
|
||||
t2_idx = nearest_element;
|
||||
}
|
||||
@@ -515,7 +515,7 @@ void hybrid_observables_gs::update_TOW(const std::vector<Gnss_Synchro> &data)
|
||||
void hybrid_observables_gs::compute_pranges(std::vector<Gnss_Synchro> &data) const
|
||||
{
|
||||
// std::cout.precision(17);
|
||||
// std::cout << " d_T_rx_TOW_ms: " << static_cast<double>(d_T_rx_TOW_ms) << std::endl;
|
||||
// std::cout << " d_T_rx_TOW_ms: " << static_cast<double>(d_T_rx_TOW_ms) << '\n';
|
||||
std::vector<Gnss_Synchro>::iterator it;
|
||||
auto current_T_rx_TOW_ms = static_cast<double>(d_T_rx_TOW_ms);
|
||||
double current_T_rx_TOW_s = current_T_rx_TOW_ms / 1000.0;
|
||||
@@ -532,8 +532,8 @@ void hybrid_observables_gs::compute_pranges(std::vector<Gnss_Synchro> &data) con
|
||||
it->Pseudorange_m = traveltime_ms * SPEED_OF_LIGHT_M_MS;
|
||||
it->Flag_valid_pseudorange = true;
|
||||
// debug code
|
||||
// std::cout << "[" << it->Channel_ID << "] interp_TOW_ms: " << it->interp_TOW_ms << std::endl;
|
||||
// std::cout << "[" << it->Channel_ID << "] Diff d_T_rx_TOW_ms - interp_TOW_ms: " << static_cast<double>(d_T_rx_TOW_ms) - it->interp_TOW_ms << std::endl;
|
||||
// std::cout << "[" << it->Channel_ID << "] interp_TOW_ms: " << it->interp_TOW_ms << '\n';
|
||||
// std::cout << "[" << it->Channel_ID << "] Diff d_T_rx_TOW_ms - interp_TOW_ms: " << static_cast<double>(d_T_rx_TOW_ms) - it->interp_TOW_ms << '\n';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user