1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-06-22 21:13:15 +00:00

Replace std::endl by \n character. There is no need to always flush the stream.

This commit is contained in:
Carles Fernandez 2020-07-07 18:53:50 +02:00
parent 58853ace7d
commit 09bcd1981c
174 changed files with 2219 additions and 2223 deletions

View File

@ -418,10 +418,10 @@ Rtklib_Pvt::Rtklib_Pvt(const ConfigurationInterface* configuration,
if (positioning_mode == -1)
{
// warn user and set the default
std::cout << "WARNING: Bad specification of positioning mode." << std::endl;
std::cout << "positioning_mode possible values: Single / Static / Kinematic / PPP_Static / PPP_Kinematic" << std::endl;
std::cout << "positioning_mode specified value: " << positioning_mode_str << std::endl;
std::cout << "Setting positioning_mode to Single" << std::endl;
std::cout << "WARNING: Bad specification of positioning mode.\n";
std::cout << "positioning_mode possible values: Single / Static / Kinematic / PPP_Static / PPP_Kinematic\n";
std::cout << "positioning_mode specified value: " << positioning_mode_str << '\n';
std::cout << "Setting positioning_mode to Single\n";
positioning_mode = PMODE_SINGLE;
}
@ -497,10 +497,10 @@ Rtklib_Pvt::Rtklib_Pvt(const ConfigurationInterface* configuration,
if (iono_model == -1)
{
// warn user and set the default
std::cout << "WARNING: Bad specification of ionospheric model." << std::endl;
std::cout << "iono_model possible values: OFF / Broadcast / SBAS / Iono-Free-LC / Estimate_STEC / IONEX" << std::endl;
std::cout << "iono_model specified value: " << iono_model_str << std::endl;
std::cout << "Setting iono_model to OFF" << std::endl;
std::cout << "WARNING: Bad specification of ionospheric model.\n";
std::cout << "iono_model possible values: OFF / Broadcast / SBAS / Iono-Free-LC / Estimate_STEC / IONEX\n";
std::cout << "iono_model specified value: " << iono_model_str << '\n';
std::cout << "Setting iono_model to OFF\n";
iono_model = IONOOPT_OFF; /* 0: ionosphere option: correction off */
}
@ -530,10 +530,10 @@ Rtklib_Pvt::Rtklib_Pvt(const ConfigurationInterface* configuration,
if (trop_model == -1)
{
// warn user and set the default
std::cout << "WARNING: Bad specification of tropospheric model." << std::endl;
std::cout << "trop_model possible values: OFF / Saastamoinen / SBAS / Estimate_ZTD / Estimate_ZTD_Grad" << std::endl;
std::cout << "trop_model specified value: " << trop_model_str << std::endl;
std::cout << "Setting trop_model to OFF" << std::endl;
std::cout << "WARNING: Bad specification of tropospheric model.\n";
std::cout << "trop_model possible values: OFF / Saastamoinen / SBAS / Estimate_ZTD / Estimate_ZTD_Grad\n";
std::cout << "trop_model specified value: " << trop_model_str << '\n';
std::cout << "Setting trop_model to OFF\n";
trop_model = TROPOPT_OFF;
}
@ -608,10 +608,10 @@ Rtklib_Pvt::Rtklib_Pvt(const ConfigurationInterface* configuration,
if (integer_ambiguity_resolution_gps == -1)
{
// warn user and set the default
std::cout << "WARNING: Bad specification of GPS ambiguity resolution method." << std::endl;
std::cout << "AR_GPS possible values: OFF / Continuous / Instantaneous / Fix-and-Hold / PPP-AR" << std::endl;
std::cout << "AR_GPS specified value: " << integer_ambiguity_resolution_gps_str << std::endl;
std::cout << "Setting AR_GPS to OFF" << std::endl;
std::cout << "WARNING: Bad specification of GPS ambiguity resolution method.\n";
std::cout << "AR_GPS possible values: OFF / Continuous / Instantaneous / Fix-and-Hold / PPP-AR\n";
std::cout << "AR_GPS specified value: " << integer_ambiguity_resolution_gps_str << '\n';
std::cout << "Setting AR_GPS to OFF\n";
integer_ambiguity_resolution_gps = ARMODE_OFF;
}

View File

@ -179,7 +179,7 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels,
// create directory
if (!gnss_sdr_create_directory(dump_path))
{
std::cerr << "GNSS-SDR cannot create dump file for the PVT block. Wrong permissions?" << std::endl;
std::cerr << "GNSS-SDR cannot create dump file for the PVT block. Wrong permissions?\n";
d_dump = false;
}
}
@ -382,7 +382,7 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels,
{
if (!fs::create_directory(new_folder, ec))
{
std::cout << "Could not create the " << new_folder << " folder." << std::endl;
std::cout << "Could not create the " << new_folder << " folder.\n";
d_xml_base_path = full_path.string();
}
}
@ -395,7 +395,7 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels,
}
if (d_xml_base_path != ".")
{
std::cout << "XML files will be stored at " << d_xml_base_path << std::endl;
std::cout << "XML files will be stored at " << d_xml_base_path << '\n';
}
d_xml_base_path = d_xml_base_path + fs::path::preferred_separator;
@ -426,8 +426,8 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels,
int msgflg = IPC_CREAT | 0666;
if ((d_sysv_msqid = msgget(d_sysv_msg_key, msgflg)) == -1)
{
std::cout << "GNSS-SDR cannot create System V message queues." << std::endl;
LOG(WARNING) << "The System V message queue is not available. Error: " << errno << " - " << strerror(errno) << std::endl;
std::cout << "GNSS-SDR cannot create System V message queues.\n";
LOG(WARNING) << "The System V message queue is not available. Error: " << errno << " - " << strerror(errno);
}
// Display time in local time zone
@ -1749,7 +1749,7 @@ bool rtklib_pvt_gs::load_gnss_synchro_map_xml(const std::string& file_name)
boost::archive::xml_iarchive xml(ifs);
d_gnss_observables_map.clear();
xml >> boost::serialization::make_nvp("GNSS-SDR_gnss_synchro_map", d_gnss_observables_map);
// std::cout << "Loaded gnss_synchro map data with " << gnss_synchro_map.size() << " pseudoranges" << std::endl;
// std::cout << "Loaded gnss_synchro map data with " << gnss_synchro_map.size() << " pseudoranges\n";
}
catch (const std::exception& e)
{
@ -2088,12 +2088,12 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
}
catch (const boost::exception& ex)
{
std::cout << "RTCM boost exception: " << boost::diagnostic_information(ex) << std::endl;
std::cout << "RTCM boost exception: " << boost::diagnostic_information(ex) << '\n';
LOG(ERROR) << "RTCM boost exception: " << boost::diagnostic_information(ex);
}
catch (const std::exception& ex)
{
std::cout << "RTCM std exception: " << ex.what() << std::endl;
std::cout << "RTCM std exception: " << ex.what() << '\n';
LOG(ERROR) << "RTCM std exception: " << ex.what();
}
}
@ -2145,14 +2145,14 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
d_rx_time = static_cast<double>(current_RX_time_ms) / 1000.0;
// std::cout << " obs time t0: " << d_gnss_observables_map_t0.cbegin()->second.RX_time
// << " t1: " << d_gnss_observables_map_t1.cbegin()->second.RX_time
// << " interp time: " << d_rx_time << std::endl;
// << " interp time: " << d_rx_time << '\n';
d_gnss_observables_map = interpolate_observables(d_gnss_observables_map_t0,
d_gnss_observables_map_t1,
d_rx_time);
flag_compute_pvt_output = true;
// d_rx_time = current_RX_time;
// std::cout.precision(17);
// std::cout << "current_RX_time: " << current_RX_time << " map time: " << d_gnss_observables_map.begin()->second.RX_time << std::endl;
// std::cout << "current_RX_time: " << current_RX_time << " map time: " << d_gnss_observables_map.begin()->second.RX_time << '\n';
}
}
}
@ -2164,7 +2164,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
{
flag_compute_pvt_output = true;
// std::cout.precision(17);
// std::cout << "current_RX_time: " << current_RX_time << " map time: " << d_gnss_observables_map.begin()->second.RX_time << std::endl;
// std::cout << "current_RX_time: " << current_RX_time << " map time: " << d_gnss_observables_map.begin()->second.RX_time << '\n';
}
flag_pvt_valid = true;
}
@ -2199,7 +2199,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
DLOG(INFO) << "Rx clock offset at interpolated RX time: " << Rx_clock_offset_s * 1000.0 << "[s]"
<< " at RX time: " << static_cast<uint32_t>(d_rx_time * 1000.0) << " [ms]";
// Optional debug code: export observables snapshot for rtklib unit testing
// std::cout << "step 1: save gnss_synchro map" << std::endl;
// std::cout << "step 1: save gnss_synchro map\n";
// save_gnss_synchro_map_xml("./gnss_synchro_map.xml");
// getchar(); // stop the execution
// end debug
@ -2271,7 +2271,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
std::cout << "First position fix at " << d_user_pvt_solver->get_position_UTC_time() << " UTC";
}
std::cout << " is Lat = " << d_user_pvt_solver->get_latitude() << " [deg], Long = " << d_user_pvt_solver->get_longitude()
<< " [deg], Height= " << d_user_pvt_solver->get_height() << " [m]" << std::endl;
<< " [deg], Height= " << d_user_pvt_solver->get_height() << " [m]\n";
d_ttff_msgbuf ttff;
ttff.mtype = 1;
d_end = std::chrono::system_clock::now();
@ -4211,12 +4211,12 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
}
catch (const boost::exception& ex)
{
std::cout << "RTCM boost exception: " << boost::diagnostic_information(ex) << std::endl;
std::cout << "RTCM boost exception: " << boost::diagnostic_information(ex) << '\n';
LOG(ERROR) << "RTCM boost exception: " << boost::diagnostic_information(ex);
}
catch (const std::exception& ex)
{
std::cout << "RTCM std exception: " << ex.what() << std::endl;
std::cout << "RTCM std exception: " << ex.what() << '\n';
LOG(ERROR) << "RTCM std exception: " << ex.what();
}
}
@ -4248,7 +4248,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
<< std::fixed << std::setprecision(9)
<< " observations is Lat = " << d_user_pvt_solver->get_latitude() << " [deg], Long = " << d_user_pvt_solver->get_longitude()
<< std::fixed << std::setprecision(3)
<< " [deg], Height = " << d_user_pvt_solver->get_height() << " [m]" << TEXT_RESET << std::endl;
<< " [deg], Height = " << d_user_pvt_solver->get_height() << " [m]" << TEXT_RESET << '\n';
std::cout << std::setprecision(ss);
DLOG(INFO) << "RX clock offset: " << d_user_pvt_solver->get_time_offset_s() << "[s]";
@ -4257,7 +4257,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
<< TEXT_BOLD_GREEN
<< "Velocity: " << std::fixed << std::setprecision(3)
<< "East: " << d_user_pvt_solver->get_rx_vel()[0] << " [m/s], North: " << d_user_pvt_solver->get_rx_vel()[1]
<< " [m/s], Up = " << d_user_pvt_solver->get_rx_vel()[2] << " [m/s]" << TEXT_RESET << std::endl;
<< " [m/s], Up = " << d_user_pvt_solver->get_rx_vel()[2] << " [m/s]" << TEXT_RESET << '\n';
std::cout << std::setprecision(ss);
DLOG(INFO) << "RX clock drift: " << d_user_pvt_solver->get_clock_drift_ppm() << " [ppm]";
@ -4266,7 +4266,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
// gtime_t rtklib_utc_time = gpst2time(adjgpsweek(d_user_pvt_solver->gps_ephemeris_map.cbegin()->second.i_GPS_week), d_rx_time);
// p_time = boost::posix_time::from_time_t(rtklib_utc_time.time);
// p_time += boost::posix_time::microseconds(round(rtklib_utc_time.sec * 1e6));
// std::cout << TEXT_MAGENTA << "Observable RX time (GPST) " << boost::posix_time::to_simple_string(p_time) << TEXT_RESET << std::endl;
// std::cout << TEXT_MAGENTA << "Observable RX time (GPST) " << boost::posix_time::to_simple_string(p_time) << TEXT_RESET << '\n';
DLOG(INFO) << "Position at " << boost::posix_time::to_simple_string(d_user_pvt_solver->get_position_UTC_time())
<< " UTC using " << d_user_pvt_solver->get_num_valid_observations() << " observations is Lat = " << d_user_pvt_solver->get_latitude() << " [deg], Long = " << d_user_pvt_solver->get_longitude()
@ -4275,7 +4275,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
/* std::cout << "Dilution of Precision at " << boost::posix_time::to_simple_string(d_user_pvt_solver->get_position_UTC_time())
<< " UTC using "<< d_user_pvt_solver->get_num_valid_observations() <<" observations is HDOP = " << d_user_pvt_solver->get_hdop() << " VDOP = "
<< d_user_pvt_solver->get_vdop()
<< " GDOP = " << d_user_pvt_solver->get_gdop() << std::endl; */
<< " GDOP = " << d_user_pvt_solver->get_gdop() << '\n'; */
}
// PVT MONITOR

View File

@ -65,7 +65,7 @@ GeoJSON_Printer::GeoJSON_Printer(const std::string& base_path)
{
if (!fs::create_directory(new_folder, ec))
{
std::cout << "Could not create the " << new_folder << " folder." << std::endl;
std::cout << "Could not create the " << new_folder << " folder.\n";
geojson_base_path = full_path.string();
}
}
@ -78,7 +78,7 @@ GeoJSON_Printer::GeoJSON_Printer(const std::string& base_path)
}
if (geojson_base_path != ".")
{
std::cout << "GeoJSON files will be stored at " << geojson_base_path << std::endl;
std::cout << "GeoJSON files will be stored at " << geojson_base_path << '\n';
}
geojson_base_path = geojson_base_path + fs::path::preferred_separator;
@ -160,19 +160,19 @@ bool GeoJSON_Printer::set_headers(const std::string& filename, bool time_tag_nam
geojson_file << std::setprecision(14);
// Writing the header
geojson_file << "{" << std::endl;
geojson_file << R"( "type": "Feature",)" << std::endl;
geojson_file << " \"properties\": {" << std::endl;
geojson_file << R"( "name": "Locations generated by GNSS-SDR" )" << std::endl;
geojson_file << " }," << std::endl;
geojson_file << " \"geometry\": {" << std::endl;
geojson_file << R"( "type": "MultiPoint",)" << std::endl;
geojson_file << " \"coordinates\": [" << std::endl;
geojson_file << "{\n";
geojson_file << R"( "type": "Feature",)" << '\n';
geojson_file << " \"properties\": {\n";
geojson_file << R"( "name": "Locations generated by GNSS-SDR" )" << '\n';
geojson_file << " },\n";
geojson_file << " \"geometry\": {\n";
geojson_file << R"( "type": "MultiPoint",)" << '\n';
geojson_file << " \"coordinates\": [\n";
return true;
}
std::cout << "File " << filename_ << " cannot be saved. Wrong permissions?" << std::endl;
std::cout << "File " << filename_ << " cannot be saved. Wrong permissions?\n";
return false;
}
@ -205,7 +205,7 @@ bool GeoJSON_Printer::print_position(const Pvt_Solution* position, bool print_av
}
else
{
geojson_file << "," << std::endl;
geojson_file << ",\n";
geojson_file << " [" << longitude << ", " << latitude << ", " << height << "]";
}
return true;
@ -218,10 +218,10 @@ bool GeoJSON_Printer::close_file()
{
if (geojson_file.is_open())
{
geojson_file << std::endl;
geojson_file << " ]" << std::endl;
geojson_file << " }" << std::endl;
geojson_file << "}" << std::endl;
geojson_file << '\n';
geojson_file << " ]\n";
geojson_file << " }\n";
geojson_file << "}\n";
geojson_file.close();
// if nothing is written, erase the file

View File

@ -67,7 +67,7 @@ Gpx_Printer::Gpx_Printer(const std::string& base_path)
{
if (!fs::create_directory(new_folder, ec))
{
std::cout << "Could not create the " << new_folder << " folder." << std::endl;
std::cout << "Could not create the " << new_folder << " folder.\n";
gpx_base_path = full_path.string();
}
}
@ -80,7 +80,7 @@ Gpx_Printer::Gpx_Printer(const std::string& base_path)
}
if (gpx_base_path != ".")
{
std::cout << "GPX files will be stored at " << gpx_base_path << std::endl;
std::cout << "GPX files will be stored at " << gpx_base_path << '\n';
}
gpx_base_path = gpx_base_path + fs::path::preferred_separator;
@ -144,20 +144,20 @@ bool Gpx_Printer::set_headers(const std::string& filename, bool time_tag_name)
// Set iostream numeric format and precision
gpx_file.setf(gpx_file.std::ofstream::fixed, gpx_file.std::ofstream::floatfield);
gpx_file << std::setprecision(14);
gpx_file << R"(<?xml version="1.0" encoding="UTF-8"?>)" << std::endl
<< R"(<gpx version="1.1" creator="GNSS-SDR")" << std::endl
<< indent << "xsi:schemaLocation=\"http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd http://www.garmin.com/xmlschemas/GpxExtensions/v3 http://www.garmin.com/xmlschemas/GpxExtensionsv3.xsd http://www.garmin.com/xmlschemas/TrackPointExtension/v2 http://www.garmin.com/xmlschemas/TrackPointExtensionv2.xsd\"" << std::endl
<< indent << "xmlns=\"http://www.topografix.com/GPX/1/1\"" << std::endl
<< indent << "xmlns:gpxx=\"http://www.garmin.com/xmlschemas/GpxExtensions/v3\"" << std::endl
<< indent << "xmlns:gpxtpx=\"http://www.garmin.com/xmlschemas/TrackPointExtension/v2\"" << std::endl
<< indent << "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">" << std::endl
<< indent << "<trk>" << std::endl
<< indent << indent << "<name>Position fixes computed by GNSS-SDR v" << GNSS_SDR_VERSION << "</name>" << std::endl
<< indent << indent << "<desc>GNSS-SDR position log generated at " << pt << " (local time)</desc>" << std::endl
<< indent << indent << "<trkseg>" << std::endl;
gpx_file << R"(<?xml version="1.0" encoding="UTF-8"?>)" << '\n'
<< R"(<gpx version="1.1" creator="GNSS-SDR")" << '\n'
<< indent << "xsi:schemaLocation=\"http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd http://www.garmin.com/xmlschemas/GpxExtensions/v3 http://www.garmin.com/xmlschemas/GpxExtensionsv3.xsd http://www.garmin.com/xmlschemas/TrackPointExtension/v2 http://www.garmin.com/xmlschemas/TrackPointExtensionv2.xsd\"" << '\n'
<< indent << "xmlns=\"http://www.topografix.com/GPX/1/1\"" << '\n'
<< indent << "xmlns:gpxx=\"http://www.garmin.com/xmlschemas/GpxExtensions/v3\"" << '\n'
<< indent << "xmlns:gpxtpx=\"http://www.garmin.com/xmlschemas/TrackPointExtension/v2\"" << '\n'
<< indent << "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">" << '\n'
<< indent << "<trk>" << '\n'
<< indent << indent << "<name>Position fixes computed by GNSS-SDR v" << GNSS_SDR_VERSION << "</name>" << '\n'
<< indent << indent << "<desc>GNSS-SDR position log generated at " << pt << " (local time)</desc>" << '\n'
<< indent << indent << "<trkseg>\n";
return true;
}
std::cout << "File " << gpx_filename << " cannot be saved. Wrong permissions?" << std::endl;
std::cout << "File " << gpx_filename << " cannot be saved. Wrong permissions?\n";
return false;
}
@ -205,7 +205,7 @@ bool Gpx_Printer::print_position(const Pvt_Solution* position, bool print_averag
<< "<extensions><gpxtpx:TrackPointExtension>"
<< "<gpxtpx:speed>" << speed_over_ground << "</gpxtpx:speed>"
<< "<gpxtpx:course>" << course_over_ground << "</gpxtpx:course>"
<< "</gpxtpx:TrackPointExtension></extensions></trkpt>" << std::endl;
<< "</gpxtpx:TrackPointExtension></extensions></trkpt>\n";
return true;
}
return false;
@ -216,8 +216,8 @@ bool Gpx_Printer::close_file()
{
if (gpx_file.is_open())
{
gpx_file << indent << indent << "</trkseg>" << std::endl
<< indent << "</trk>" << std::endl
gpx_file << indent << indent << "</trkseg>" << '\n'
<< indent << "</trk>" << '\n'
<< "</gpx>";
gpx_file.close();
return true;

View File

@ -236,7 +236,7 @@ bool Hybrid_Ls_Pvt::get_PVT(std::map<int, Gnss_Synchro> gnss_observables_map, do
// 3- compute the current ECEF position for this SV using corrected TX time
TX_time_corrected_s = Tx_time - SV_clock_bias_s;
// std::cout<<"TX time["<<gps_cnav_ephemeris_iter->second.i_satellite_PRN<<"]="<<TX_time_corrected_s<<std::endl;
// std::cout<<"TX time["<<gps_cnav_ephemeris_iter->second.i_satellite_PRN<<"]="<<TX_time_corrected_s<< '\n';
double dtr = gps_cnav_ephemeris_iter->second.satellitePosition(TX_time_corrected_s);
// store satellite positions in a matrix
@ -296,14 +296,14 @@ bool Hybrid_Ls_Pvt::get_PVT(std::map<int, Gnss_Synchro> gnss_observables_map, do
// execute Bancroft's algorithm to estimate initial receiver position and time
DLOG(INFO) << " Executing Bancroft algorithm...";
rx_position_and_time = bancroftPos(satpos.t(), obs);
this->set_rx_pos(rx_position_and_time.rows(0, 2)); // save ECEF position for the next iteration
this->set_rx_pos(rx_position_and_time.rows(0, 2)); // save ECEF position for the next iteration
this->set_time_offset_s(rx_position_and_time(3) / SPEED_OF_LIGHT_M_S); // save time for the next iteration [meters]->[seconds]
}
// Execute WLS using previous position as the initialization point
rx_position_and_time = leastSquarePos(satpos, obs, W);
this->set_rx_pos(rx_position_and_time.rows(0, 2)); // save ECEF position for the next iteration
this->set_rx_pos(rx_position_and_time.rows(0, 2)); // save ECEF position for the next iteration
this->set_time_offset_s(this->get_time_offset_s() + rx_position_and_time(3) / SPEED_OF_LIGHT_M_S); // accumulate the rx time error for the next iteration [meters]->[seconds]
DLOG(INFO) << "Hybrid Position at TOW=" << hybrid_current_time << " in ECEF (X,Y,Z,t[meters]) = " << rx_position_and_time;

View File

@ -69,7 +69,7 @@ Kml_Printer::Kml_Printer(const std::string& base_path)
{
if (!fs::create_directory(new_folder, ec))
{
std::cout << "Could not create the " << new_folder << " folder." << std::endl;
std::cout << "Could not create the " << new_folder << " folder.\n";
kml_base_path = full_path.string();
}
}
@ -82,7 +82,7 @@ Kml_Printer::Kml_Printer(const std::string& base_path)
}
if (kml_base_path != ".")
{
std::cout << "KML files will be stored at " << kml_base_path << std::endl;
std::cout << "KML files will be stored at " << kml_base_path << '\n';
}
kml_base_path = kml_base_path + fs::path::preferred_separator;
@ -92,7 +92,7 @@ Kml_Printer::Kml_Printer(const std::string& base_path)
int fd = mkstemp(tmp_filename_);
if (fd == -1)
{
std::cerr << "Error in KML printer: failed to create temporary file" << std::endl;
std::cerr << "Error in KML printer: failed to create temporary file\n";
}
else
{
@ -169,64 +169,64 @@ bool Kml_Printer::set_headers(const std::string& filename, bool time_tag_name)
tmp_file.setf(tmp_file.std::ofstream::fixed, tmp_file.std::ofstream::floatfield);
tmp_file << std::setprecision(14);
kml_file << R"(<?xml version="1.0" encoding="UTF-8"?>)" << std::endl
<< R"(<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2">)" << std::endl
<< indent << "<Document>" << std::endl
<< indent << indent << "<name>GNSS Track</name>" << std::endl
<< indent << indent << "<description><![CDATA[" << std::endl
<< indent << indent << indent << "<table>" << std::endl
<< indent << indent << indent << indent << "<tr><td>GNSS-SDR Receiver position log file created at " << pt << "</td></tr>" << std::endl
<< indent << indent << indent << indent << "<tr><td>https://gnss-sdr.org/</td></tr>" << std::endl
<< indent << indent << indent << "</table>" << std::endl
<< indent << indent << "]]></description>" << std::endl
<< indent << indent << "<!-- Normal track style -->" << std::endl
<< indent << indent << "<Style id=\"track_n\">" << std::endl
<< indent << indent << indent << "<IconStyle>" << std::endl
<< indent << indent << indent << indent << "<color>ff00ffff</color>" << std::endl
<< indent << indent << indent << indent << "<scale>0.3</scale>" << std::endl
<< indent << indent << indent << indent << "<Icon>" << std::endl
<< indent << indent << indent << indent << indent << "<href>http://maps.google.com/mapfiles/kml/shapes/shaded_dot.png</href>" << std::endl
<< indent << indent << indent << indent << "</Icon>" << std::endl
<< indent << indent << indent << "</IconStyle>" << std::endl
<< indent << indent << indent << "<LabelStyle>" << std::endl
<< indent << indent << indent << indent << "<scale>0</scale>" << std::endl
<< indent << indent << indent << "</LabelStyle>" << std::endl
<< indent << indent << "</Style>" << std::endl
<< indent << indent << "<!-- Highlighted track style -->" << std::endl
<< indent << indent << "<Style id=\"track_h\">" << std::endl
<< indent << indent << indent << "<IconStyle>" << std::endl
<< indent << indent << indent << indent << "<color>ff00ffff</color>" << std::endl
<< indent << indent << indent << indent << "<scale>1</scale>" << std::endl
<< indent << indent << indent << indent << "<Icon>" << std::endl
<< indent << indent << indent << indent << indent << "<href>http://maps.google.com/mapfiles/kml/shapes/shaded_dot.png</href>" << std::endl
<< indent << indent << indent << indent << "</Icon>" << std::endl
<< indent << indent << indent << "</IconStyle>" << std::endl
<< indent << indent << "</Style>" << std::endl
<< indent << indent << "<StyleMap id=\"track\">" << std::endl
<< indent << indent << indent << "<Pair>" << std::endl
<< indent << indent << indent << indent << "<key>normal</key>" << std::endl
<< indent << indent << indent << indent << "<styleUrl>#track_n</styleUrl>" << std::endl
<< indent << indent << indent << "</Pair>" << std::endl
<< indent << indent << indent << "<Pair>" << std::endl
<< indent << indent << indent << indent << "<key>highlight</key>" << std::endl
<< indent << indent << indent << indent << "<styleUrl>#track_h</styleUrl>" << std::endl
<< indent << indent << indent << "</Pair>" << std::endl
<< indent << indent << "</StyleMap>" << std::endl
<< indent << indent << "<Style id=\"yellowLineGreenPoly\">" << std::endl
<< indent << indent << indent << "<LineStyle>" << std::endl
<< indent << indent << indent << indent << "<color>7f00ffff</color>" << std::endl
<< indent << indent << indent << indent << "<width>1</width>" << std::endl
<< indent << indent << indent << "</LineStyle>" << std::endl
<< indent << indent << indent << "<PolyStyle>" << std::endl
<< indent << indent << indent << indent << "<color>7f00ff00</color>" << std::endl
<< indent << indent << indent << "</PolyStyle>" << std::endl
<< indent << indent << "</Style>" << std::endl
<< indent << indent << "<Folder>" << std::endl
<< indent << indent << indent << "<name>Points</name>" << std::endl;
kml_file << R"(<?xml version="1.0" encoding="UTF-8"?>)" << '\n'
<< R"(<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2">)" << '\n'
<< indent << "<Document>" << '\n'
<< indent << indent << "<name>GNSS Track</name>" << '\n'
<< indent << indent << "<description><![CDATA[" << '\n'
<< indent << indent << indent << "<table>" << '\n'
<< indent << indent << indent << indent << "<tr><td>GNSS-SDR Receiver position log file created at " << pt << "</td></tr>" << '\n'
<< indent << indent << indent << indent << "<tr><td>https://gnss-sdr.org/</td></tr>" << '\n'
<< indent << indent << indent << "</table>" << '\n'
<< indent << indent << "]]></description>" << '\n'
<< indent << indent << "<!-- Normal track style -->" << '\n'
<< indent << indent << "<Style id=\"track_n\">" << '\n'
<< indent << indent << indent << "<IconStyle>" << '\n'
<< indent << indent << indent << indent << "<color>ff00ffff</color>" << '\n'
<< indent << indent << indent << indent << "<scale>0.3</scale>" << '\n'
<< indent << indent << indent << indent << "<Icon>" << '\n'
<< indent << indent << indent << indent << indent << "<href>http://maps.google.com/mapfiles/kml/shapes/shaded_dot.png</href>" << '\n'
<< indent << indent << indent << indent << "</Icon>" << '\n'
<< indent << indent << indent << "</IconStyle>" << '\n'
<< indent << indent << indent << "<LabelStyle>" << '\n'
<< indent << indent << indent << indent << "<scale>0</scale>" << '\n'
<< indent << indent << indent << "</LabelStyle>" << '\n'
<< indent << indent << "</Style>" << '\n'
<< indent << indent << "<!-- Highlighted track style -->" << '\n'
<< indent << indent << "<Style id=\"track_h\">" << '\n'
<< indent << indent << indent << "<IconStyle>" << '\n'
<< indent << indent << indent << indent << "<color>ff00ffff</color>" << '\n'
<< indent << indent << indent << indent << "<scale>1</scale>" << '\n'
<< indent << indent << indent << indent << "<Icon>" << '\n'
<< indent << indent << indent << indent << indent << "<href>http://maps.google.com/mapfiles/kml/shapes/shaded_dot.png</href>" << '\n'
<< indent << indent << indent << indent << "</Icon>" << '\n'
<< indent << indent << indent << "</IconStyle>" << '\n'
<< indent << indent << "</Style>" << '\n'
<< indent << indent << "<StyleMap id=\"track\">" << '\n'
<< indent << indent << indent << "<Pair>" << '\n'
<< indent << indent << indent << indent << "<key>normal</key>" << '\n'
<< indent << indent << indent << indent << "<styleUrl>#track_n</styleUrl>" << '\n'
<< indent << indent << indent << "</Pair>" << '\n'
<< indent << indent << indent << "<Pair>" << '\n'
<< indent << indent << indent << indent << "<key>highlight</key>" << '\n'
<< indent << indent << indent << indent << "<styleUrl>#track_h</styleUrl>" << '\n'
<< indent << indent << indent << "</Pair>" << '\n'
<< indent << indent << "</StyleMap>" << '\n'
<< indent << indent << "<Style id=\"yellowLineGreenPoly\">" << '\n'
<< indent << indent << indent << "<LineStyle>" << '\n'
<< indent << indent << indent << indent << "<color>7f00ffff</color>" << '\n'
<< indent << indent << indent << indent << "<width>1</width>" << '\n'
<< indent << indent << indent << "</LineStyle>" << '\n'
<< indent << indent << indent << "<PolyStyle>" << '\n'
<< indent << indent << indent << indent << "<color>7f00ff00</color>" << '\n'
<< indent << indent << indent << "</PolyStyle>" << '\n'
<< indent << indent << "</Style>" << '\n'
<< indent << indent << "<Folder>" << '\n'
<< indent << indent << indent << "<name>Points</name>\n";
return true;
}
std::cout << "File " << kml_filename << " cannot be saved. Wrong permissions?" << std::endl;
std::cout << "File " << kml_filename << " cannot be saved. Wrong permissions?\n";
return false;
}
@ -269,34 +269,34 @@ bool Kml_Printer::print_position(const Pvt_Solution* position, bool print_averag
if (kml_file.is_open() && tmp_file.is_open())
{
point_id++;
kml_file << indent << indent << indent << "<Placemark>" << std::endl
<< indent << indent << indent << indent << "<name>" << point_id << "</name>" << std::endl
<< indent << indent << indent << indent << "<snippet/>" << std::endl
<< indent << indent << indent << indent << "<description><![CDATA[" << std::endl
<< indent << indent << indent << indent << indent << "<table>" << std::endl
<< indent << indent << indent << indent << indent << indent << "<tr><td>Time:</td><td>" << utc_time << "</td></tr>" << std::endl
<< indent << indent << indent << indent << indent << indent << "<tr><td>Longitude:</td><td>" << longitude << "</td><td>deg</td></tr>" << std::endl
<< indent << indent << indent << indent << indent << indent << "<tr><td>Latitude:</td><td>" << latitude << "</td><td>deg</td></tr>" << std::endl
<< indent << indent << indent << indent << indent << indent << "<tr><td>Altitude:</td><td>" << height << "</td><td>m</td></tr>" << std::endl
<< indent << indent << indent << indent << indent << indent << "<tr><td>Speed:</td><td>" << speed_over_ground << "</td><td>m/s</td></tr>" << std::endl
<< indent << indent << indent << indent << indent << indent << "<tr><td>Course:</td><td>" << course_over_ground << "</td><td>deg</td></tr>" << std::endl
<< indent << indent << indent << indent << indent << indent << "<tr><td>HDOP:</td><td>" << hdop << "</td></tr>" << std::endl
<< indent << indent << indent << indent << indent << indent << "<tr><td>VDOP:</td><td>" << vdop << "</td></tr>" << std::endl
<< indent << indent << indent << indent << indent << indent << "<tr><td>PDOP:</td><td>" << pdop << "</td></tr>" << std::endl
<< indent << indent << indent << indent << indent << "</table>" << std::endl
<< indent << indent << indent << indent << "]]></description>" << std::endl
<< indent << indent << indent << indent << "<TimeStamp>" << std::endl
<< indent << indent << indent << indent << indent << "<when>" << utc_time << "</when>" << std::endl
<< indent << indent << indent << indent << "</TimeStamp>" << std::endl
<< indent << indent << indent << indent << "<styleUrl>#track</styleUrl>" << std::endl
<< indent << indent << indent << indent << "<Point>" << std::endl
<< indent << indent << indent << indent << indent << "<altitudeMode>absolute</altitudeMode>" << std::endl
<< indent << indent << indent << indent << indent << "<coordinates>" << longitude << "," << latitude << "," << height << "</coordinates>" << std::endl
<< indent << indent << indent << indent << "</Point>" << std::endl
<< indent << indent << indent << "</Placemark>" << std::endl;
kml_file << indent << indent << indent << "<Placemark>" << '\n'
<< indent << indent << indent << indent << "<name>" << point_id << "</name>" << '\n'
<< indent << indent << indent << indent << "<snippet/>" << '\n'
<< indent << indent << indent << indent << "<description><![CDATA[" << '\n'
<< indent << indent << indent << indent << indent << "<table>" << '\n'
<< indent << indent << indent << indent << indent << indent << "<tr><td>Time:</td><td>" << utc_time << "</td></tr>" << '\n'
<< indent << indent << indent << indent << indent << indent << "<tr><td>Longitude:</td><td>" << longitude << "</td><td>deg</td></tr>" << '\n'
<< indent << indent << indent << indent << indent << indent << "<tr><td>Latitude:</td><td>" << latitude << "</td><td>deg</td></tr>" << '\n'
<< indent << indent << indent << indent << indent << indent << "<tr><td>Altitude:</td><td>" << height << "</td><td>m</td></tr>" << '\n'
<< indent << indent << indent << indent << indent << indent << "<tr><td>Speed:</td><td>" << speed_over_ground << "</td><td>m/s</td></tr>" << '\n'
<< indent << indent << indent << indent << indent << indent << "<tr><td>Course:</td><td>" << course_over_ground << "</td><td>deg</td></tr>" << '\n'
<< indent << indent << indent << indent << indent << indent << "<tr><td>HDOP:</td><td>" << hdop << "</td></tr>" << '\n'
<< indent << indent << indent << indent << indent << indent << "<tr><td>VDOP:</td><td>" << vdop << "</td></tr>" << '\n'
<< indent << indent << indent << indent << indent << indent << "<tr><td>PDOP:</td><td>" << pdop << "</td></tr>" << '\n'
<< indent << indent << indent << indent << indent << "</table>" << '\n'
<< indent << indent << indent << indent << "]]></description>" << '\n'
<< indent << indent << indent << indent << "<TimeStamp>" << '\n'
<< indent << indent << indent << indent << indent << "<when>" << utc_time << "</when>" << '\n'
<< indent << indent << indent << indent << "</TimeStamp>" << '\n'
<< indent << indent << indent << indent << "<styleUrl>#track</styleUrl>" << '\n'
<< indent << indent << indent << indent << "<Point>" << '\n'
<< indent << indent << indent << indent << indent << "<altitudeMode>absolute</altitudeMode>" << '\n'
<< indent << indent << indent << indent << indent << "<coordinates>" << longitude << "," << latitude << "," << height << "</coordinates>" << '\n'
<< indent << indent << indent << indent << "</Point>" << '\n'
<< indent << indent << indent << "</Placemark>\n";
tmp_file << indent << indent << indent << indent << indent
<< longitude << "," << latitude << "," << height << std::endl;
<< longitude << "," << latitude << "," << height << '\n';
return true;
}
@ -311,23 +311,23 @@ bool Kml_Printer::close_file()
tmp_file.close();
kml_file << indent << indent << "</Folder>"
<< indent << indent << "<Placemark>" << std::endl
<< indent << indent << indent << "<name>Path</name>" << std::endl
<< indent << indent << indent << "<styleUrl>#yellowLineGreenPoly</styleUrl>" << std::endl
<< indent << indent << indent << "<LineString>" << std::endl
<< indent << indent << indent << indent << "<extrude>0</extrude>" << std::endl
<< indent << indent << indent << indent << "<tessellate>1</tessellate>" << std::endl
<< indent << indent << indent << indent << "<altitudeMode>absolute</altitudeMode>" << std::endl
<< indent << indent << indent << indent << "<coordinates>" << std::endl;
<< indent << indent << "<Placemark>" << '\n'
<< indent << indent << indent << "<name>Path</name>" << '\n'
<< indent << indent << indent << "<styleUrl>#yellowLineGreenPoly</styleUrl>" << '\n'
<< indent << indent << indent << "<LineString>" << '\n'
<< indent << indent << indent << indent << "<extrude>0</extrude>" << '\n'
<< indent << indent << indent << indent << "<tessellate>1</tessellate>" << '\n'
<< indent << indent << indent << indent << "<altitudeMode>absolute</altitudeMode>" << '\n'
<< indent << indent << indent << indent << "<coordinates>\n";
// Copy the contents of tmp_file into kml_file
std::ifstream src(tmp_file_str, std::ios::binary);
kml_file << src.rdbuf();
kml_file << indent << indent << indent << indent << "</coordinates>" << std::endl
<< indent << indent << indent << "</LineString>" << std::endl
<< indent << indent << "</Placemark>" << std::endl
<< indent << "</Document>" << std::endl
kml_file << indent << indent << indent << indent << "</coordinates>" << '\n'
<< indent << indent << indent << "</LineString>" << '\n'
<< indent << indent << "</Placemark>" << '\n'
<< indent << "</Document>" << '\n'
<< "</kml>";
kml_file.close();

View File

@ -73,7 +73,7 @@ Nmea_Printer::Nmea_Printer(const std::string& filename, bool flag_nmea_output_fi
{
if (!fs::create_directory(new_folder, ec))
{
std::cout << "Could not create the " << new_folder << " folder." << std::endl;
std::cout << "Could not create the " << new_folder << " folder.\n";
nmea_base_path = full_path.string();
}
}
@ -87,7 +87,7 @@ Nmea_Printer::Nmea_Printer(const std::string& filename, bool flag_nmea_output_fi
if ((nmea_base_path != ".") and (d_flag_nmea_output_file == true))
{
std::cout << "NMEA files will be stored at " << nmea_base_path << std::endl;
std::cout << "NMEA files will be stored at " << nmea_base_path << '\n';
}
nmea_base_path = nmea_base_path + fs::path::preferred_separator;
@ -101,7 +101,7 @@ Nmea_Printer::Nmea_Printer(const std::string& filename, bool flag_nmea_output_fi
}
else
{
std::cout << "File " << nmea_filename << " cannot be saved. Wrong permissions?" << std::endl;
std::cout << "File " << nmea_filename << " cannot be saved. Wrong permissions?\n";
}
}

File diff suppressed because it is too large Load Diff

View File

@ -75,7 +75,7 @@ Rtcm::~Rtcm()
// *****************************************************************************************************
void Rtcm::run_server()
{
std::cout << "Starting a TCP/IP server of RTCM messages on port " << RTCM_port << std::endl;
std::cout << "Starting a TCP/IP server of RTCM messages on port " << RTCM_port << '\n';
try
{
tq = std::thread([&] { std::make_shared<Queue_Reader>(io_context, rtcm_message_queue, RTCM_port)->do_read_queue(); });
@ -97,7 +97,7 @@ void Rtcm::stop_service()
void Rtcm::stop_server()
{
std::cout << "Stopping TCP/IP server on port " << RTCM_port << std::endl;
std::cout << "Stopping TCP/IP server on port " << RTCM_port << '\n';
Rtcm::stop_service();
servers.front().close_server();
rtcm_message_queue->push("Goodbye"); // this terminates tq
@ -3439,7 +3439,7 @@ uint32_t Rtcm::lock_time(const Gps_Ephemeris& eph, double obs_time, const Gnss_S
boost::posix_time::time_duration lock_duration = current_time - Rtcm::gps_L1_last_lock_time[65 - gnss_synchro.PRN];
lock_time_in_seconds = static_cast<uint32_t>(lock_duration.total_seconds());
// Debug:
// std::cout << "lock time PRN " << gnss_synchro.PRN << ": " << lock_time_in_seconds << " current time: " << current_time << std::endl;
// std::cout << "lock time PRN " << gnss_synchro.PRN << ": " << lock_time_in_seconds << " current time: " << current_time << '\n';
return lock_time_in_seconds;
}

View File

@ -688,7 +688,7 @@ private:
}
else
{
std::cout << "Closing connection with RTCM client" << std::endl;
std::cout << "Closing connection with RTCM client\n";
room_.leave(shared_from_this());
}
});
@ -705,12 +705,12 @@ private:
room_.deliver(read_msg_);
// std::cout << "Delivered message (session): ";
// std::cout.write(read_msg_.body(), read_msg_.body_length());
// std::cout << std::endl;
// std::cout << '\n';
do_read_message_header();
}
else
{
std::cout << "Closing connection with RTCM client" << std::endl;
std::cout << "Closing connection with RTCM client\n";
room_.leave(shared_from_this());
}
});
@ -732,7 +732,7 @@ private:
}
else
{
std::cout << "Closing connection with RTCM client" << std::endl;
std::cout << "Closing connection with RTCM client\n";
room_.leave(shared_from_this());
}
});
@ -786,7 +786,7 @@ private:
}
else
{
std::cout << "Server is down." << std::endl;
std::cout << "Server is down.\n";
}
});
}
@ -802,7 +802,7 @@ private:
}
else
{
std::cout << "Error in client" << std::endl;
std::cout << "Error in client\n";
socket_.close();
}
});
@ -900,25 +900,25 @@ private:
{
if (first_client)
{
std::cout << "The TCP/IP server of RTCM messages is up and running. Accepting connections ..." << std::endl;
std::cout << "The TCP/IP server of RTCM messages is up and running. Accepting connections ...\n";
first_client = false;
}
else
{
std::cout << "Starting RTCM TCP/IP server session..." << std::endl;
std::cout << "Starting RTCM TCP/IP server session...\n";
boost::system::error_code ec2;
boost::asio::ip::tcp::endpoint endpoint = socket_.remote_endpoint(ec2);
if (ec2)
{
// Error creating remote_endpoint
std::cout << "Error getting remote IP address, closing session." << std::endl;
std::cout << "Error getting remote IP address, closing session.\n";
LOG(INFO) << "Error getting remote IP address";
start_session = false;
}
else
{
std::string remote_addr = endpoint.address().to_string();
std::cout << "Serving client from " << remote_addr << std::endl;
std::cout << "Serving client from " << remote_addr << '\n';
LOG(INFO) << "Serving client from " << remote_addr;
}
}
@ -929,7 +929,7 @@ private:
}
else
{
std::cout << "Error when invoking a RTCM session. " << ec << std::endl;
std::cout << "Error when invoking a RTCM session. " << ec << '\n';
}
start_session = true;
do_accept();

View File

@ -79,7 +79,7 @@ Rtcm_Printer::Rtcm_Printer(const std::string& filename, bool flag_rtcm_file_dump
{
if (!fs::create_directory(new_folder, ec))
{
std::cout << "Could not create the " << new_folder << " folder." << std::endl;
std::cout << "Could not create the " << new_folder << " folder.\n";
rtcm_base_path = full_path.string();
}
}
@ -92,7 +92,7 @@ Rtcm_Printer::Rtcm_Printer(const std::string& filename, bool flag_rtcm_file_dump
}
if (rtcm_base_path != ".")
{
std::cout << "RTCM binary file will be stored at " << rtcm_base_path << std::endl;
std::cout << "RTCM binary file will be stored at " << rtcm_base_path << '\n';
}
rtcm_base_path = rtcm_base_path + fs::path::preferred_separator;
@ -150,7 +150,7 @@ Rtcm_Printer::Rtcm_Printer(const std::string& filename, bool flag_rtcm_file_dump
}
else
{
std::cout << "File " << rtcm_filename << "cannot be saved. Wrong permissions?" << std::endl;
std::cout << "File " << rtcm_filename << "cannot be saved. Wrong permissions?\n";
}
}
@ -430,7 +430,7 @@ bool Rtcm_Printer::Print_Message(const std::string& message)
{
try
{
rtcm_file_descriptor << message << std::endl;
rtcm_file_descriptor << message << '\n';
}
catch (const std::exception& ex)
{
@ -445,7 +445,7 @@ bool Rtcm_Printer::Print_Message(const std::string& message)
if (write(rtcm_dev_descriptor, message.c_str(), message.length()) == -1)
{
DLOG(INFO) << "RTCM printer cannot write on serial device " << rtcm_devname.c_str();
std::cout << "RTCM printer cannot write on serial device " << rtcm_devname.c_str() << std::endl;
std::cout << "RTCM printer cannot write on serial device " << rtcm_devname.c_str() << '\n';
return false;
}
}

View File

@ -155,14 +155,14 @@ bool Rtklib_Solver::save_matfile()
}
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 false;
}
// count number of epochs and rewind
int64_t num_epoch = 0LL;
if (dump_file.is_open())
{
std::cout << "Generating .mat file for " << dump_filename << std::endl;
std::cout << "Generating .mat file for " << dump_filename << '\n';
size = dump_file.tellg();
num_epoch = static_cast<int64_t>(size) / static_cast<int64_t>(epoch_size_bytes);
dump_file.seekg(0, std::ios::beg);
@ -241,7 +241,7 @@ bool Rtklib_Solver::save_matfile()
}
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 false;
}

View File

@ -72,13 +72,13 @@ GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf(
{
sampled_ms_ = 3;
DLOG(INFO) << "Coherent integration time should be 3 ms or less. Changing to 3ms ";
std::cout << "Too high coherent integration time. Changing to 3ms" << std::endl;
std::cout << "Too high coherent integration time. Changing to 3ms\n";
}
if (Zero_padding > 0)
{
sampled_ms_ = 2;
DLOG(INFO) << "Zero padding activated. Changing to 1ms code + 1ms zero padding ";
std::cout << "Zero padding activated. Changing to 1ms code + 1ms zero padding" << std::endl;
std::cout << "Zero padding activated. Changing to 1ms code + 1ms zero padding\n";
}
max_dwells_ = configuration_->property(role + ".max_dwells", 1);

View File

@ -597,7 +597,7 @@ int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items
d_dump_file.close();
}
}
// std::cout << "d_mag " << d_mag << ".d_sample_counter " << d_sample_counter << ". acq delay " << d_gnss_synchro->Acq_delay_samples<< " indext "<< indext << std::endl;
// std::cout << "d_mag " << d_mag << ".d_sample_counter " << d_sample_counter << ". acq delay " << d_gnss_synchro->Acq_delay_samples<< " indext "<< indext << '\n';
// 6 OPTIONAL: CAF filter to avoid Doppler ambiguity in bit transition.
if (d_CAF_window_hz > 0)
{
@ -607,7 +607,7 @@ int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items
float weighting_factor;
weighting_factor = 0.5 / static_cast<float>(CAF_bins_half);
// weighting_factor = 0;
// std::cout << "weighting_factor " << weighting_factor << std::endl;
// std::cout << "weighting_factor " << weighting_factor << '\n';
// Initialize first iterations
for (int doppler_index = 0; doppler_index < CAF_bins_half; doppler_index++)
{

View File

@ -182,7 +182,7 @@ pcps_acquisition::pcps_acquisition(const Acq_Conf& conf_) : gr::block("pcps_acqu
// create directory
if (!gnss_sdr_create_directory(dump_path))
{
std::cerr << "GNSS-SDR cannot create dump file for the Acquisition block. Wrong permissions?" << std::endl;
std::cerr << "GNSS-SDR cannot create dump file for the Acquisition block. Wrong permissions?\n";
d_dump = false;
}
}
@ -240,13 +240,13 @@ bool pcps_acquisition::is_fdma()
if (strcmp(d_gnss_synchro->Signal, "1G") == 0)
{
d_doppler_bias = static_cast<int32_t>(DFRQ1_GLO * GLONASS_PRN.at(d_gnss_synchro->PRN));
DLOG(INFO) << "Trying to acquire SV PRN " << d_gnss_synchro->PRN << " with freq " << d_doppler_bias << " in Glonass Channel " << GLONASS_PRN.at(d_gnss_synchro->PRN) << std::endl;
DLOG(INFO) << "Trying to acquire SV PRN " << d_gnss_synchro->PRN << " with freq " << d_doppler_bias << " in Glonass Channel " << GLONASS_PRN.at(d_gnss_synchro->PRN) << '\n';
return true;
}
if (strcmp(d_gnss_synchro->Signal, "2G") == 0)
{
d_doppler_bias += static_cast<int32_t>(DFRQ2_GLO * GLONASS_PRN.at(d_gnss_synchro->PRN));
DLOG(INFO) << "Trying to acquire SV PRN " << d_gnss_synchro->PRN << " with freq " << d_doppler_bias << " in Glonass Channel " << GLONASS_PRN.at(d_gnss_synchro->PRN) << std::endl;
DLOG(INFO) << "Trying to acquire SV PRN " << d_gnss_synchro->PRN << " with freq " << d_doppler_bias << " in Glonass Channel " << GLONASS_PRN.at(d_gnss_synchro->PRN) << '\n';
return true;
}
return false;
@ -426,7 +426,7 @@ void pcps_acquisition::dump_results(int32_t effective_fft_size)
mat_t* matfp = Mat_CreateVer(filename.c_str(), nullptr, MAT_FT_MAT73);
if (matfp == nullptr)
{
std::cout << "Unable to create or open Acquisition dump file" << std::endl;
std::cout << "Unable to create or open Acquisition dump file\n";
// d_acq_parameters.dump = false;
}
else

View File

@ -117,7 +117,7 @@ pcps_acquisition_fine_doppler_cc::pcps_acquisition_fine_doppler_cc(const Acq_Con
// create directory
if (!gnss_sdr_create_directory(dump_path))
{
std::cerr << "GNSS-SDR cannot create dump file for the Acquisition block. Wrong permissions?" << std::endl;
std::cerr << "GNSS-SDR cannot create dump file for the Acquisition block. Wrong permissions?\n";
d_dump = false;
}
}
@ -434,7 +434,7 @@ int pcps_acquisition_fine_doppler_cc::estimate_Doppler()
if (std::abs(fftFreqBins[tmp_index_freq] - d_gnss_synchro->Acq_doppler_hz) < 1000)
{
d_gnss_synchro->Acq_doppler_hz = static_cast<double>(fftFreqBins[tmp_index_freq]);
// std::cout << "FFT maximum present at " << fftFreqBins[tmp_index_freq] << " [Hz]" << std::endl;
// std::cout << "FFT maximum present at " << fftFreqBins[tmp_index_freq] << " [Hz]\n";
}
else
{
@ -642,7 +642,7 @@ void pcps_acquisition_fine_doppler_cc::dump_results(int effective_fft_size)
mat_t *matfp = Mat_CreateVer(filename.c_str(), nullptr, MAT_FT_MAT73);
if (matfp == nullptr)
{
std::cout << "Unable to create or open Acquisition dump file" << std::endl;
std::cout << "Unable to create or open Acquisition dump file\n";
d_dump = false;
}
else

View File

@ -177,12 +177,12 @@ void pcps_assisted_acquisition_cc::get_assistance()
}
this->d_disable_assist = false;
std::cout << "Acq assist ENABLED for GPS SV " << this->d_gnss_synchro->PRN << " (Doppler max,Doppler min)=("
<< d_doppler_max << "," << d_doppler_min << ")" << std::endl;
<< d_doppler_max << "," << d_doppler_min << ")\n";
}
else
{
this->d_disable_assist = true;
std::cout << "Acq assist DISABLED for GPS SV " << this->d_gnss_synchro->PRN << std::endl;
std::cout << "Acq assist DISABLED for GPS SV " << this->d_gnss_synchro->PRN << '\n';
}
}
@ -394,7 +394,7 @@ int pcps_assisted_acquisition_cc::general_work(int noutput_items,
if (d_disable_assist == false)
{
d_disable_assist = true;
std::cout << "Acq assist DISABLED for GPS SV " << this->d_gnss_synchro->PRN << std::endl;
std::cout << "Acq assist DISABLED for GPS SV " << this->d_gnss_synchro->PRN << '\n';
d_state = 4;
}
else

View File

@ -169,13 +169,13 @@ int pcps_opencl_acquisition_cc::init_opencl_environment(const std::string &kerne
if (all_platforms.empty())
{
std::cout << "No OpenCL platforms found. Check OpenCL installation!" << std::endl;
std::cout << "No OpenCL platforms found. Check OpenCL installation!\n";
return 1;
}
d_cl_platform = all_platforms[0]; // get default platform
std::cout << "Using platform: " << d_cl_platform.getInfo<CL_PLATFORM_NAME>()
<< std::endl;
<< '\n';
// get default GPU device of the default platform
std::vector<cl::Device> gpu_devices;
@ -183,7 +183,7 @@ int pcps_opencl_acquisition_cc::init_opencl_environment(const std::string &kerne
if (gpu_devices.empty())
{
std::cout << "No GPU devices found. Check OpenCL installation!" << std::endl;
std::cout << "No GPU devices found. Check OpenCL installation!\n";
return 2;
}
@ -191,7 +191,7 @@ int pcps_opencl_acquisition_cc::init_opencl_environment(const std::string &kerne
std::vector<cl::Device> device;
device.push_back(d_cl_device);
std::cout << "Using device: " << d_cl_device.getInfo<CL_DEVICE_NAME>() << std::endl;
std::cout << "Using device: " << d_cl_device.getInfo<CL_DEVICE_NAME>() << '\n';
cl::Context context(device);
d_cl_context = context;
@ -211,7 +211,7 @@ int pcps_opencl_acquisition_cc::init_opencl_environment(const std::string &kerne
{
std::cout << " Error building: "
<< program.getBuildInfo<CL_PROGRAM_BUILD_LOG>(device[0])
<< std::endl;
<< '\n';
return 3;
}
d_cl_program = program;
@ -242,7 +242,7 @@ int pcps_opencl_acquisition_cc::init_opencl_environment(const std::string &kerne
delete d_cl_buffer_magnitude;
delete d_cl_buffer_fft_codes;
std::cout << "Error creating OpenCL FFT plan." << std::endl;
std::cout << "Error creating OpenCL FFT plan.\n";
return 4;
}
@ -598,7 +598,7 @@ void pcps_opencl_acquisition_cc::acquisition_core_opencl()
// gettimeofday(&tv, NULL);
// end = tv.tv_sec *1e6 + tv.tv_usec;
// std::cout << "Acq time = " << (end-begin) << " us" << std::endl;
// std::cout << "Acq time = " << (end-begin) << " us\n";
if (!d_bit_transition_flag)
{

View File

@ -105,7 +105,7 @@ void Fpga_Acquisition::open_device()
if ((d_fd = open(d_device_name.c_str(), O_RDWR | O_SYNC)) == -1)
{
LOG(WARNING) << "Cannot open deviceio" << d_device_name;
std::cout << "Acq: cannot open deviceio" << d_device_name << std::endl;
std::cout << "Acq: cannot open deviceio" << d_device_name << '\n';
}
d_map_base = reinterpret_cast<volatile uint32_t *>(mmap(nullptr, PAGE_SIZE_DEFAULT,
PROT_READ | PROT_WRITE, MAP_SHARED, d_fd, 0));
@ -113,7 +113,7 @@ void Fpga_Acquisition::open_device()
if (d_map_base == reinterpret_cast<void *>(-1))
{
LOG(WARNING) << "Cannot map the FPGA acquisition module into user memory";
std::cout << "Acq: cannot map deviceio" << d_device_name << std::endl;
std::cout << "Acq: cannot map deviceio" << d_device_name << '\n';
}
}
@ -148,7 +148,7 @@ void Fpga_Acquisition::run_acquisition()
ssize_t nbytes = TEMP_FAILURE_RETRY(write(d_fd, reinterpret_cast<void *>(&reenable), sizeof(int32_t)));
if (nbytes != sizeof(int32_t))
{
std::cerr << "Error enabling run in the FPGA." << std::endl;
std::cerr << "Error enabling run in the FPGA.\n";
}
// launch the acquisition process
@ -160,8 +160,8 @@ void Fpga_Acquisition::run_acquisition()
nb = read(d_fd, &irq_count, sizeof(irq_count));
if (nb != sizeof(irq_count))
{
std::cout << "acquisition module Read failed to retrieve 4 bytes!" << std::endl;
std::cout << "acquisition module Interrupt number " << irq_count << std::endl;
std::cout << "acquisition module Read failed to retrieve 4 bytes!\n";
std::cout << "acquisition module Interrupt number " << irq_count << '\n';
}
}
@ -245,7 +245,7 @@ void Fpga_Acquisition::close_device()
auto *aux = const_cast<uint32_t *>(d_map_base);
if (munmap(static_cast<void *>(aux), PAGE_SIZE_DEFAULT) == -1)
{
std::cout << "Failed to unmap memory uio" << std::endl;
std::cout << "Failed to unmap memory uio\n";
}
close(d_fd);
}

View File

@ -59,8 +59,8 @@ Channel::Channel(const ConfigurationInterface* configuration, uint32_t channel,
int64_t deprecation_warning = configuration->property("GNSS-SDR.internal_fs_hz", 0);
if (deprecation_warning != 0)
{
std::cout << "WARNING: The global parameter name GNSS-SDR.internal_fs_hz has been DEPRECATED." << std::endl;
std::cout << "WARNING: Please replace it by GNSS-SDR.internal_fs_sps in your configuration file." << std::endl;
std::cout << "WARNING: The global parameter name GNSS-SDR.internal_fs_hz has been DEPRECATED.\n";
std::cout << "WARNING: Please replace it by GNSS-SDR.internal_fs_sps in your configuration file.\n";
}
}

View File

@ -170,7 +170,7 @@ FreqXlatingFirFilter::FreqXlatingFirFilter(const ConfigurationInterface* configu
if (dump_)
{
DLOG(INFO) << "Dumping output into file " << dump_filename_;
std::cout << "Dumping output into file " << dump_filename_ << std::endl;
std::cout << "Dumping output into file " << dump_filename_ << '\n';
file_sink_ = gr::blocks::file_sink::make(item_size, dump_filename_.c_str());
}
if (in_streams_ > 1)

View File

@ -80,7 +80,7 @@ PulseBlankingFilter::PulseBlankingFilter(const ConfigurationInterface* configura
if (dump_)
{
DLOG(INFO) << "Dumping output into file " << dump_filename_;
std::cout << "Dumping output into file " << dump_filename_ << std::endl;
std::cout << "Dumping output into file " << dump_filename_ << '\n';
file_sink_ = gr::blocks::file_sink::make(item_size, dump_filename_.c_str());
}
if (in_streams_ > 1)

View File

@ -547,7 +547,7 @@ void cart2utm(const arma::vec &r_eb_e, int zone, arma::vec &r_enu)
iterations = iterations + 1;
if (iterations > 100)
{
std::cout << "Failed to approximate U with desired precision. U-oldU:" << U - oldU << std::endl;
std::cout << "Failed to approximate U with desired precision. U - oldU: " << U - oldU << '\n';
break;
}
}

View File

@ -82,8 +82,8 @@ static bool ValidateC(const char* flagname, const std::string& value)
{ // value is ok
return true;
}
std::cout << "Invalid value for flag -" << flagname << ". The file '" << value << "' does not exist." << std::endl;
std::cout << "GNSS-SDR program ended." << std::endl;
std::cout << "Invalid value for flag -" << flagname << ". The file '" << value << "' does not exist.\n";
std::cout << "GNSS-SDR program ended.\n";
return false;
}
@ -93,8 +93,8 @@ static bool ValidateConfigFile(const char* flagname, const std::string& value)
{ // value is ok
return true;
}
std::cout << "Invalid value for flag -" << flagname << ". The file '" << value << "' does not exist." << std::endl;
std::cout << "GNSS-SDR program ended." << std::endl;
std::cout << "Invalid value for flag -" << flagname << ". The file '" << value << "' does not exist.\n";
std::cout << "GNSS-SDR program ended.\n";
return false;
}
@ -104,8 +104,8 @@ static bool ValidateS(const char* flagname, const std::string& value)
{ // value is ok
return true;
}
std::cout << "Invalid value for flag -" << flagname << ". The file '" << value << "' does not exist." << std::endl;
std::cout << "GNSS-SDR program ended." << std::endl;
std::cout << "Invalid value for flag -" << flagname << ". The file '" << value << "' does not exist.\n";
std::cout << "GNSS-SDR program ended.\n";
return false;
}
@ -115,8 +115,8 @@ static bool ValidateSignalSource(const char* flagname, const std::string& value)
{ // value is ok
return true;
}
std::cout << "Invalid value for flag -" << flagname << ". The file '" << value << "' does not exist." << std::endl;
std::cout << "GNSS-SDR program ended." << std::endl;
std::cout << "Invalid value for flag -" << flagname << ". The file '" << value << "' does not exist.\n";
std::cout << "GNSS-SDR program ended.\n";
return false;
}
@ -127,8 +127,8 @@ static bool ValidateDopplerMax(const char* flagname, int32_t value)
{ // value is ok
return true;
}
std::cout << "Invalid value for flag -" << flagname << ": " << value << ". Allowed range is 0 < " << flagname << " < " << max_value << " Hz." << std::endl;
std::cout << "GNSS-SDR program ended." << std::endl;
std::cout << "Invalid value for flag -" << flagname << ": " << value << ". Allowed range is 0 < " << flagname << " < " << max_value << " Hz.\n";
std::cout << "GNSS-SDR program ended.\n";
return false;
}
@ -139,8 +139,8 @@ static bool ValidateDopplerStep(const char* flagname, int32_t value)
{ // value is ok
return true;
}
std::cout << "Invalid value for flag -" << flagname << ": " << value << ". Allowed range is 0 < " << flagname << " < " << max_value << " Hz." << std::endl;
std::cout << "GNSS-SDR program ended." << std::endl;
std::cout << "Invalid value for flag -" << flagname << ": " << value << ". Allowed range is 0 < " << flagname << " < " << max_value << " Hz.\n";
std::cout << "GNSS-SDR program ended.\n";
return false;
}
@ -151,8 +151,8 @@ static bool ValidateCn0Samples(const char* flagname, int32_t value)
{ // value is ok
return true;
}
std::cout << "Invalid value for flag -" << flagname << ": " << value << ". Allowed range is 0 < " << flagname << " < " << max_value << " samples." << std::endl;
std::cout << "GNSS-SDR program ended." << std::endl;
std::cout << "Invalid value for flag -" << flagname << ": " << value << ". Allowed range is 0 < " << flagname << " < " << max_value << " samples.\n";
std::cout << "GNSS-SDR program ended.\n";
return false;
}
@ -163,8 +163,8 @@ static bool ValidateCn0Min(const char* flagname, int32_t value)
{ // value is ok
return true;
}
std::cout << "Invalid value for flag -" << flagname << ": " << value << ". Allowed range is 0 < " << flagname << " < " << max_value << " dB-Hz." << std::endl;
std::cout << "GNSS-SDR program ended." << std::endl;
std::cout << "Invalid value for flag -" << flagname << ": " << value << ". Allowed range is 0 < " << flagname << " < " << max_value << " dB-Hz.\n";
std::cout << "GNSS-SDR program ended.\n";
return false;
}
@ -175,8 +175,8 @@ static bool ValidateMaxLockFail(const char* flagname, int32_t value)
{ // value is ok
return true;
}
std::cout << "Invalid value for flag -" << flagname << ": " << value << ". Allowed range is 0 < " << flagname << " < " << max_value << " fails." << std::endl;
std::cout << "GNSS-SDR program ended." << std::endl;
std::cout << "Invalid value for flag -" << flagname << ": " << value << ". Allowed range is 0 < " << flagname << " < " << max_value << " fails.\n";
std::cout << "GNSS-SDR program ended.\n";
return false;
}
@ -187,8 +187,8 @@ static bool ValidateCarrierLockTh(const char* flagname, double value)
{ // value is ok
return true;
}
std::cout << "Invalid value for flag -" << flagname << ": " << value << ". Allowed range is 0 < " << flagname << " < " << max_value << " rad." << std::endl;
std::cout << "GNSS-SDR program ended." << std::endl;
std::cout << "Invalid value for flag -" << flagname << ": " << value << ". Allowed range is 0 < " << flagname << " < " << max_value << " rad.\n";
std::cout << "GNSS-SDR program ended.\n";
return false;
}
@ -199,8 +199,8 @@ static bool ValidateDllBw(const char* flagname, double value)
{ // value is ok
return true;
}
std::cout << "Invalid value for flag -" << flagname << ": " << value << ". Allowed range is 0 < " << flagname << " < " << max_value << " Hz." << std::endl;
std::cout << "GNSS-SDR program ended." << std::endl;
std::cout << "Invalid value for flag -" << flagname << ": " << value << ". Allowed range is 0 < " << flagname << " < " << max_value << " Hz.\n";
std::cout << "GNSS-SDR program ended.\n";
return false;
}
@ -211,8 +211,8 @@ static bool ValidatePllBw(const char* flagname, double value)
{ // value is ok
return true;
}
std::cout << "Invalid value for flag -" << flagname << ": " << value << ". Allowed range is 0 < " << flagname << " < " << max_value << " Hz." << std::endl;
std::cout << "GNSS-SDR program ended." << std::endl;
std::cout << "Invalid value for flag -" << flagname << ": " << value << ". Allowed range is 0 < " << flagname << " < " << max_value << " Hz.\n";
std::cout << "GNSS-SDR program ended.\n";
return false;
}
@ -223,8 +223,8 @@ static bool ValidateCarrierSmoothingFactor(const char* flagname, int32_t value)
{ // value is ok
return true;
}
std::cout << "Invalid value for flag -" << flagname << ": " << value << ". Allowed range is 1 <= " << flagname << "." << std::endl;
std::cout << "GNSS-SDR program ended." << std::endl;
std::cout << "Invalid value for flag -" << flagname << ": " << value << ". Allowed range is 1 <= " << flagname << ".\n";
std::cout << "GNSS-SDR program ended.\n";
return false;
}

View File

@ -116,7 +116,7 @@
* << "("
* << err.err()
* << ")"
* << std::endl;
* << '\n';
* }
*
* return EXIT_SUCCESS;

View File

@ -14,12 +14,12 @@
#include "volk_gnsssdr/volk_gnsssdr.h" // for volk_gnsssdr_get_alignment, volk_gnsssdr_get_machine
#include "volk_gnsssdr_option_helpers.h" // for option_list, option_t
#include <volk_gnsssdr/constants.h> // for volk_gnsssdr_available_machines, volk_gnsssdr_c_compiler ...
#include <iostream> // for operator<<, endl, cout, ostream
#include <iostream> // for operator<<, cout, ostream
#include <string> // for string
void print_alignment()
{
std::cout << "Alignment in bytes: " << volk_gnsssdr_get_alignment() << std::endl;
std::cout << "Alignment in bytes: " << volk_gnsssdr_get_alignment() << '\n';
}
@ -29,11 +29,11 @@ void print_malloc()
// structure from there and give an explanation for the implementations
std::cout << "Used malloc implementation: ";
#if HAVE_POSIX_MEMALIGN
std::cout << "posix_memalign" << std::endl;
std::cout << "posix_memalign\n";
#elif defined(_MSC_VER)
std::cout << "_aligned_malloc" << std::endl;
std::cout << "_aligned_malloc\n";
#else
std::cout << "C11 aligned_alloc." << std::endl;
std::cout << "C11 aligned_alloc.\n";
#endif
}

View File

@ -12,7 +12,7 @@
#include <cstdlib> // IWYU pragma: keep
#include <cstring> // IWYU pragma: keep
#include <exception> // for exception
#include <iostream> // for operator<<, endl, basic_ostream, cout, ostream
#include <iostream> // for operator<<, basic_ostream, cout, ostream
#include <utility> // for pair
@ -93,7 +93,7 @@ void option_list::parse(int argc, char **argv)
}
catch (std::exception &exc)
{
std::cout << "An int option can only receive a number" << std::endl;
std::cout << "An int option can only receive a number\n";
throw std::exception();
};
break;
@ -105,7 +105,7 @@ void option_list::parse(int argc, char **argv)
}
catch (std::exception &exc)
{
std::cout << "A float option can only receive a number" << std::endl;
std::cout << "A float option can only receive a number\n";
throw std::exception();
};
break;
@ -117,7 +117,7 @@ void option_list::parse(int argc, char **argv)
}
catch (std::exception &exc)
{
std::cout << "A bool option can only receive 0 or 1" << std::endl;
std::cout << "A bool option can only receive 0 or 1\n";
throw std::exception();
};
break;
@ -132,7 +132,7 @@ void option_list::parse(int argc, char **argv)
};
break;
case STRING:
std::cout << this_option->printval << std::endl;
std::cout << this_option->printval << '\n';
break;
default:
this_option->callback();
@ -150,8 +150,8 @@ void option_list::parse(int argc, char **argv)
void option_list::help()
{
std::cout << program_name << std::endl;
std::cout << " -h [ --help ] \t\tDisplay this help message" << std::endl;
std::cout << program_name << '\n';
std::cout << " -h [ --help ] \t\tDisplay this help message\n";
for (std::vector<option_t>::iterator this_option = internal_list.begin();
this_option != internal_list.end();
this_option++)
@ -184,6 +184,6 @@ void option_list::help()
break;
}
help_line += this_option->msg;
std::cout << help_line << std::endl;
std::cout << help_line << '\n';
}
}

View File

@ -154,7 +154,7 @@ int main(int argc, char *argv[])
}
catch (std::string &error)
{
std::cerr << "Caught Exception in 'run_volk_gnsssdr_tests': " << error << std::endl;
std::cerr << "Caught Exception in 'run_volk_gnsssdr_tests': " << error << '\n';
}
}
}
@ -176,7 +176,7 @@ int main(int argc, char *argv[])
}
else
{
std::cout << "Warning: this was a dry-run. Config not generated" << std::endl;
std::cout << "Warning: this was a dry-run. Config not generated\n";
}
return 0;
@ -261,22 +261,22 @@ void write_results(const std::vector<volk_gnsssdr_test_results_t> *results, bool
{
try
{
std::cout << "Creating " << config_path.parent_path() << " ..." << std::endl;
std::cout << "Creating " << config_path.parent_path() << " ...\n";
try
{
fs::create_directories(config_path.parent_path());
}
catch (const fs::filesystem_error &e)
{
std::cerr << "ERROR: Could not create folder " << config_path.parent_path() << std::endl;
std::cerr << "Reason: " << e.what() << std::endl;
std::cerr << "ERROR: Could not create folder " << config_path.parent_path() << '\n';
std::cerr << "Reason: " << e.what() << '\n';
return;
}
}
catch (...)
{
// Catch exception when using std::experimental
std::cerr << "ERROR: Could not create folder" << std::endl;
std::cerr << "ERROR: Could not create folder\n";
return;
}
}
@ -284,20 +284,20 @@ void write_results(const std::vector<volk_gnsssdr_test_results_t> *results, bool
std::ofstream config;
if (update_result)
{
std::cout << "Updating " << path << " ..." << std::endl;
std::cout << "Updating " << path << " ...\n";
config.open(path.c_str(), std::ofstream::app);
if (!config.is_open())
{ // either we don't have write access or we don't have the dir yet
std::cout << "Error opening file " << path << std::endl;
std::cout << "Error opening file " << path << '\n';
}
}
else
{
std::cout << "Writing " << path << " ..." << std::endl;
std::cout << "Writing " << path << " ...\n";
config.open(path.c_str());
if (!config.is_open())
{ // either we don't have write access or we don't have the dir yet
std::cout << "Error opening file " << path << std::endl;
std::cout << "Error opening file " << path << '\n';
}
config << "\
@ -311,29 +311,29 @@ void write_results(const std::vector<volk_gnsssdr_test_results_t> *results, bool
{
config << profile_results->config_name << " "
<< profile_results->best_arch_a << " "
<< profile_results->best_arch_u << std::endl;
<< profile_results->best_arch_u << '\n';
}
config.close();
}
void write_json(std::ofstream &json_file, std::vector<volk_gnsssdr_test_results_t> results)
{
json_file << "{" << std::endl;
json_file << " \"volk_gnsssdr_tests\": [" << std::endl;
json_file << "{\n";
json_file << " \"volk_gnsssdr_tests\": [\n";
size_t len = results.size();
size_t i = 0;
std::vector<volk_gnsssdr_test_results_t>::iterator result;
for (result = results.begin(); result != results.end(); ++result)
{
json_file << " {" << std::endl;
json_file << " \"name\": \"" << result->name << "\"," << std::endl;
json_file << " \"vlen\": " << (int)(result->vlen) << "," << std::endl;
json_file << " \"iter\": " << result->iter << "," << std::endl;
json_file << " {\n";
json_file << " \"name\": \"" << result->name << "\",\n";
json_file << " \"vlen\": " << (int)(result->vlen) << ",\n";
json_file << " \"iter\": " << result->iter << ",\n";
json_file << " \"best_arch_a\": \"" << result->best_arch_a
<< "\"," << std::endl;
<< "\",\n";
json_file << " \"best_arch_u\": \"" << result->best_arch_u
<< "\"," << std::endl;
json_file << " \"results\": {" << std::endl;
<< "\",\n";
json_file << " \"results\": {\n";
size_t results_len = result->results.size();
size_t ri = 0;
@ -341,27 +341,27 @@ void write_json(std::ofstream &json_file, std::vector<volk_gnsssdr_test_results_
for (kernel_time_pair = result->results.begin(); kernel_time_pair != result->results.end(); ++kernel_time_pair)
{
volk_gnsssdr_test_time_t time = kernel_time_pair->second;
json_file << " \"" << time.name << "\": {" << std::endl;
json_file << " \"name\": \"" << time.name << "\"," << std::endl;
json_file << " \"time\": " << time.time << "," << std::endl;
json_file << " \"units\": \"" << time.units << "\"" << std::endl;
json_file << " \"" << time.name << "\": {\n";
json_file << " \"name\": \"" << time.name << "\",\n";
json_file << " \"time\": " << time.time << ",\n";
json_file << " \"units\": \"" << time.units << "\"\n";
json_file << " }";
if (ri + 1 != results_len)
{
json_file << ",";
}
json_file << std::endl;
json_file << '\n';
ri++;
}
json_file << " }" << std::endl;
json_file << " }\n";
json_file << " }";
if (i + 1 != len)
{
json_file << ",";
}
json_file << std::endl;
json_file << '\n';
i++;
}
json_file << " ]" << std::endl;
json_file << "}" << std::endl;
json_file << " ]\n";
json_file << "}\n";
}

View File

@ -383,7 +383,7 @@ bool fcompare(t *in1, t *in2, unsigned int vlen, float tol)
if (print_max_errs-- > 0)
{
std::cout << "offset " << i << " in1: " << t(((t *)(in1))[i]) << " in2: " << t(((t *)(in2))[i]);
std::cout << " tolerance was: " << tol << std::endl;
std::cout << " tolerance was: " << tol << '\n';
}
}
}
@ -394,7 +394,7 @@ bool fcompare(t *in1, t *in2, unsigned int vlen, float tol)
if (print_max_errs-- > 0)
{
std::cout << "offset " << i << " in1: " << t(((t *)(in1))[i]) << " in2: " << t(((t *)(in2))[i]);
std::cout << " tolerance was: " << tol << std::endl;
std::cout << " tolerance was: " << tol << '\n';
}
}
}
@ -423,7 +423,7 @@ bool ccompare(t *in1, t *in2, unsigned int vlen, float tol)
if (print_max_errs-- > 0)
{
std::cout << "offset " << i / 2 << " in1: " << in1[i] << " + " << in1[i + 1] << "j in2: " << in2[i] << " + " << in2[i + 1] << "j";
std::cout << " tolerance was: " << tol << std::endl;
std::cout << " tolerance was: " << tol << '\n';
}
}
}
@ -434,7 +434,7 @@ bool ccompare(t *in1, t *in2, unsigned int vlen, float tol)
if (print_max_errs-- > 0)
{
std::cout << "offset " << i / 2 << " in1: " << in1[i] << " + " << in1[i + 1] << "j in2: " << in2[i] << " + " << in2[i + 1] << "j";
std::cout << " tolerance was: " << tol << std::endl;
std::cout << " tolerance was: " << tol << '\n';
}
}
}
@ -455,7 +455,7 @@ bool icompare(t *in1, t *in2, unsigned int vlen, unsigned int tol)
if (print_max_errs-- > 0)
{
std::cout << "offset " << i << " in1: " << static_cast<int>(t(((t *)(in1))[i])) << " in2: " << static_cast<int>(t(((t *)(in2))[i]));
std::cout << " tolerance was: " << tol << std::endl;
std::cout << " tolerance was: " << tol << '\n';
}
}
}
@ -514,7 +514,7 @@ bool run_volk_gnsssdr_tests(volk_gnsssdr_func_desc_t desc,
results->back().name = name;
results->back().vlen = vlen;
results->back().iter = iter;
std::cout << "RUN_VOLK_GNSSSDR_TESTS: " << name << "(" << vlen << "," << iter << ")" << std::endl;
std::cout << "RUN_VOLK_GNSSSDR_TESTS: " << name << "(" << vlen << "," << iter << ")\n";
// vlen_twiddle will increase vlen for malloc and data generation
// but kernels will still be called with the user provided vlen.
@ -530,7 +530,7 @@ bool run_volk_gnsssdr_tests(volk_gnsssdr_func_desc_t desc,
if ((!benchmark_mode) && (arch_list.size() < 2))
{
std::cout << "no architectures to test" << std::endl;
std::cout << "no architectures to test\n";
return false;
}
@ -545,13 +545,13 @@ bool run_volk_gnsssdr_tests(volk_gnsssdr_func_desc_t desc,
}
catch (std::exception &error)
{
std::cerr << "Error: unable to get function signature from kernel name" << std::endl;
std::cerr << " - " << name << std::endl;
std::cerr << "Error: unable to get function signature from kernel name\n";
std::cerr << " - " << name << '\n';
return false;
}
catch (std::string s)
{
std::cerr << "Error: " << s << std::endl;
std::cerr << "Error: " << s << '\n';
return false;
}
@ -740,7 +740,7 @@ bool run_volk_gnsssdr_tests(volk_gnsssdr_func_desc_t desc,
end = std::chrono::system_clock::now();
std::chrono::duration<double> elapsed_seconds = end - start;
double arch_time = 1000.0 * elapsed_seconds.count();
std::cout << arch_list[i] << " completed in " << arch_time << " ms" << std::endl;
std::cout << arch_list[i] << " completed in " << arch_time << " ms\n";
volk_gnsssdr_test_time_t result;
result.name = arch_list[i];
result.time = arch_time;
@ -881,7 +881,7 @@ bool run_volk_gnsssdr_tests(volk_gnsssdr_func_desc_t desc,
volk_gnsssdr_test_time_t *result = &results->back().results[arch_list[i]];
result->pass = false;
fail_global = true;
std::cout << name << ": fail on arch " << arch_list[i] << std::endl;
std::cout << name << ": fail on arch " << arch_list[i] << '\n';
}
}
}
@ -906,8 +906,8 @@ bool run_volk_gnsssdr_tests(volk_gnsssdr_func_desc_t desc,
}
}
std::cout << "Best aligned arch: " << best_arch_a << std::endl;
std::cout << "Best unaligned arch: " << best_arch_u << std::endl;
std::cout << "Best aligned arch: " << best_arch_a << '\n';
std::cout << "Best unaligned arch: " << best_arch_u << '\n';
if (puppet_master_name == "NULL")
{

View File

@ -13,7 +13,7 @@
#include "qa_utils.h" // for volk_gnsssdr_test_case_t, volk_gnsssdr_test_results_t
#include "volk_gnsssdr/volk_gnsssdr_complex.h" // for lv_32fc_t
#include <fstream> // IWYU pragma: keep
#include <iostream> // for operator<<, basic_ostream, endl, char...
#include <iostream> // for operator<<, basic_ostream, char...
#include <map> // for map, map<>::iterator, _Rb_tree_iterator
#include <sstream> // for stringstream
#include <string> // for string, operator<<
@ -43,7 +43,7 @@ int main(int argc, char* argv[])
ss << argv[1];
if (ss.fail())
{
std::cerr << "Test name not correctly set." << std::endl;
std::cerr << "Test name not correctly set.\n";
return 0;
}
for (unsigned int ii = 0; ii < test_cases.size(); ++ii)
@ -64,7 +64,7 @@ int main(int argc, char* argv[])
}
}
}
std::cerr << "Did not run a test for kernel: " << std::string(argv[1]) << " !" << std::endl;
std::cerr << "Did not run a test for kernel: " << std::string(argv[1]) << " !\n";
return 0;
}
else
@ -83,13 +83,13 @@ int main(int argc, char* argv[])
catch (...)
{
// TODO: what exceptions might we need to catch and how do we handle them?
std::cerr << "Exception found on kernel: " << test_case.name() << std::endl;
std::cerr << "Exception found on kernel: " << test_case.name() << '\n';
qa_result = false;
}
if (qa_result)
{
std::cerr << "Failure on " << test_case.name() << std::endl;
std::cerr << "Failure on " << test_case.name() << '\n';
qa_failures.push_back(test_case.name());
}
}
@ -99,13 +99,13 @@ int main(int argc, char* argv[])
// Summarize QA results
std::cerr << "Kernel QA finished: " << qa_failures.size() << " failures out of "
<< test_cases.size() << " tests." << std::endl;
<< test_cases.size() << " tests.\n";
if (qa_failures.size() > 0)
{
std::cerr << "The following kernels failed QA:" << std::endl;
std::cerr << "The following kernels failed QA:\n";
for (unsigned int ii = 0; ii < qa_failures.size(); ++ii)
{
std::cerr << " " << qa_failures[ii] << std::endl;
std::cerr << " " << qa_failures[ii] << '\n';
}
qa_ret_val = 1;
}
@ -123,17 +123,17 @@ void print_qa_xml(std::vector<volk_gnsssdr_test_results_t> results, unsigned int
std::ofstream qa_file;
qa_file.open(".unittest/kernels.xml");
qa_file << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << std::endl;
qa_file << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
qa_file << "<testsuites name=\"kernels\" "
<< "tests=\"" << results.size() << "\" "
<< "failures=\"" << nfails << "\" id=\"1\">" << std::endl;
<< "failures=\"" << nfails << "\" id=\"1\">\n";
// Results are in a vector by kernel. Each element has a result
// map containing time and arch name with test result
for (unsigned int ii = 0; ii < results.size(); ++ii)
{
volk_gnsssdr_test_results_t result = results[ii];
qa_file << " <testsuite name=\"" << result.name << "\">" << std::endl;
qa_file << " <testsuite name=\"" << result.name << "\">\n";
std::map<std::string, volk_gnsssdr_test_time_t>::iterator kernel_time_pair;
for (kernel_time_pair = result.results.begin(); kernel_time_pair != result.results.end(); ++kernel_time_pair)
@ -141,16 +141,16 @@ void print_qa_xml(std::vector<volk_gnsssdr_test_results_t> results, unsigned int
volk_gnsssdr_test_time_t test_time = kernel_time_pair->second;
qa_file << " <testcase name=\"" << test_time.name << "\" "
<< "classname=\"" << result.name << "\" "
<< "time=\"" << test_time.time << "\">" << std::endl;
<< "time=\"" << test_time.time << "\">\n";
if (!test_time.pass)
qa_file << " <failure "
<< "message=\"fail on arch " << test_time.name << "\">"
<< "</failure>" << std::endl;
qa_file << " </testcase>" << std::endl;
<< "</failure>\n";
qa_file << " </testcase>\n";
}
qa_file << " </testsuite>" << std::endl;
qa_file << " </testsuite>\n";
}
qa_file << "</testsuites>" << std::endl;
qa_file << "</testsuites>\n";
qa_file.close();
}

View File

@ -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
{

View File

@ -47,7 +47,7 @@ DirectResamplerConditioner::DirectResamplerConditioner(
{
std::string aux_warn = "CONFIGURATION WARNING: Parameters GNSS-SDR.internal_fs_sps and " + role_ + ".sample_freq_out are not set to the same value!";
LOG(WARNING) << aux_warn;
std::cout << aux_warn << std::endl;
std::cout << aux_warn << '\n';
}
item_type_ = configuration->property(role + ".item_type", default_item_type);
dump_ = configuration->property(role + ".dump", false);

View File

@ -42,7 +42,7 @@ MmseResamplerConditioner::MmseResamplerConditioner(
{
std::string aux_warn = "CONFIGURATION WARNING: Parameters GNSS-SDR.internal_fs_sps and " + role_ + ".sample_freq_out are not set to the same value!";
LOG(WARNING) << aux_warn;
std::cout << aux_warn << std::endl;
std::cout << aux_warn << '\n';
}
item_type_ = configuration->property(role + ".item_type", default_item_type);
dump_ = configuration->property(role + ".dump", false);
@ -59,7 +59,7 @@ MmseResamplerConditioner::MmseResamplerConditioner(
sample_freq_out_ / 2.1,
sample_freq_out_ / 5,
gr::filter::firdes::win_type::WIN_HAMMING);
std::cout << "Enabled fractional resampler low pass filter with " << taps.size() << " taps" << std::endl;
std::cout << "Enabled fractional resampler low pass filter with " << taps.size() << " taps\n";
fir_filter_ccf_ = gr::filter::fir_filter_ccf::make(1, taps);
#ifdef GR_GREATER_38

View File

@ -315,7 +315,7 @@ int signal_generator_c::general_work(int noutput_items __attribute__((unused)),
else if (system_[sat] == "R")
{
phase_step_rad = -static_cast<float>(TWO_PI) * (freq + (DFRQ1_GLO * GLONASS_PRN.at(PRN_[sat])) + doppler_Hz_[sat]) / static_cast<float>(fs_in_);
// std::cout << "sat " << PRN_[sat] << " SG - Freq = " << (freq + (DFRQ1_GLO * GLONASS_PRN.at(PRN_[sat]))) << " Doppler = " << doppler_Hz_[sat] << std::endl;
// std::cout << "sat " << PRN_[sat] << " SG - Freq = " << (freq + (DFRQ1_GLO * GLONASS_PRN.at(PRN_[sat]))) << " Doppler = " << doppler_Hz_[sat] << '\n';
_phase[0] = -start_phase_rad_[sat];
volk_gnsssdr_s32f_sincos_32fc(complex_phase_.data(), -phase_step_rad, _phase.data(), vector_length_);

View File

@ -33,7 +33,7 @@
#include <exception> // for exceptions
#include <fcntl.h> // for open, O_WRONLY
#include <fstream> // for std::ifstream
#include <iostream> // for cout, endl
#include <iostream> // for cout
#include <string> // for string manipulation
#include <thread> // for std::chrono
#include <unistd.h> // for write
@ -93,8 +93,8 @@ Ad9361FpgaSignalSource::Ad9361FpgaSignalSource(const ConfigurationInterface *con
switch_position = configuration->property(role + ".switch_position", 0);
if (switch_position != 0 && switch_position != 2)
{
std::cout << "SignalSource.switch_position configuration parameter must be either 0: read from file(s) via DMA, or 2: read from AD9361" << std::endl;
std::cout << "SignalSource.switch_position configuration parameter set to its default value switch_position=0 - read from file(s)" << std::endl;
std::cout << "SignalSource.switch_position configuration parameter must be either 0: read from file(s) via DMA, or 2: read from AD9361\n";
std::cout << "SignalSource.switch_position configuration parameter set to its default value switch_position=0 - read from file(s)\n";
switch_position = 0;
}
@ -103,7 +103,7 @@ Ad9361FpgaSignalSource::Ad9361FpgaSignalSource(const ConfigurationInterface *con
item_size_ = sizeof(gr_complex);
std::cout << "Sample rate: " << sample_rate_ << " Sps" << std::endl;
std::cout << "Sample rate: " << sample_rate_ << " Sps\n";
if (switch_position == 0) // Inject file(s) via DMA
{
@ -153,30 +153,30 @@ Ad9361FpgaSignalSource::Ad9361FpgaSignalSource(const ConfigurationInterface *con
// some basic checks
if ((rf_port_select_ != "A_BALANCED") and (rf_port_select_ != "B_BALANCED") and (rf_port_select_ != "A_N") and (rf_port_select_ != "B_N") and (rf_port_select_ != "B_P") and (rf_port_select_ != "C_N") and (rf_port_select_ != "C_P") and (rf_port_select_ != "TX_MONITOR1") and (rf_port_select_ != "TX_MONITOR2") and (rf_port_select_ != "TX_MONITOR1_2"))
{
std::cout << "Configuration parameter rf_port_select should take one of these values:" << std::endl;
std::cout << " A_BALANCED, B_BALANCED, A_N, B_N, B_P, C_N, C_P, TX_MONITOR1, TX_MONITOR2, TX_MONITOR1_2" << std::endl;
std::cout << "Error: provided value rf_port_select=" << rf_port_select_ << " is not among valid values" << std::endl;
std::cout << " This parameter has been set to its default value rf_port_select=" << default_rf_port_select << std::endl;
std::cout << "Configuration parameter rf_port_select should take one of these values:\n";
std::cout << " A_BALANCED, B_BALANCED, A_N, B_N, B_P, C_N, C_P, TX_MONITOR1, TX_MONITOR2, TX_MONITOR1_2\n";
std::cout << "Error: provided value rf_port_select=" << rf_port_select_ << " is not among valid values\n";
std::cout << " This parameter has been set to its default value rf_port_select=" << default_rf_port_select << '\n';
rf_port_select_ = default_rf_port_select;
LOG(WARNING) << "Invalid configuration value for rf_port_select parameter. Set to rf_port_select=" << default_rf_port_select;
}
if ((gain_mode_rx1_ != "manual") and (gain_mode_rx1_ != "slow_attack") and (gain_mode_rx1_ != "fast_attack") and (gain_mode_rx1_ != "hybrid"))
{
std::cout << "Configuration parameter gain_mode_rx1 should take one of these values:" << std::endl;
std::cout << " manual, slow_attack, fast_attack, hybrid" << std::endl;
std::cout << "Error: provided value gain_mode_rx1=" << gain_mode_rx1_ << " is not among valid values" << std::endl;
std::cout << " This parameter has been set to its default value gain_mode_rx1=" << default_gain_mode << std::endl;
std::cout << "Configuration parameter gain_mode_rx1 should take one of these values:\n";
std::cout << " manual, slow_attack, fast_attack, hybrid\n";
std::cout << "Error: provided value gain_mode_rx1=" << gain_mode_rx1_ << " is not among valid values\n";
std::cout << " This parameter has been set to its default value gain_mode_rx1=" << default_gain_mode << '\n';
gain_mode_rx1_ = default_gain_mode;
LOG(WARNING) << "Invalid configuration value for gain_mode_rx1 parameter. Set to gain_mode_rx1=" << default_gain_mode;
}
if ((gain_mode_rx2_ != "manual") and (gain_mode_rx2_ != "slow_attack") and (gain_mode_rx2_ != "fast_attack") and (gain_mode_rx2_ != "hybrid"))
{
std::cout << "Configuration parameter gain_mode_rx2 should take one of these values:" << std::endl;
std::cout << " manual, slow_attack, fast_attack, hybrid" << std::endl;
std::cout << "Error: provided value gain_mode_rx2=" << gain_mode_rx2_ << " is not among valid values" << std::endl;
std::cout << " This parameter has been set to its default value gain_mode_rx2=" << default_gain_mode << std::endl;
std::cout << "Configuration parameter gain_mode_rx2 should take one of these values:\n";
std::cout << " manual, slow_attack, fast_attack, hybrid\n";
std::cout << "Error: provided value gain_mode_rx2=" << gain_mode_rx2_ << " is not among valid values\n";
std::cout << " This parameter has been set to its default value gain_mode_rx2=" << default_gain_mode << '\n';
gain_mode_rx2_ = default_gain_mode;
LOG(WARNING) << "Invalid configuration value for gain_mode_rx2 parameter. Set to gain_mode_rx2=" << default_gain_mode;
}
@ -185,9 +185,9 @@ Ad9361FpgaSignalSource::Ad9361FpgaSignalSource(const ConfigurationInterface *con
{
if (rf_gain_rx1_ > 73.0 or rf_gain_rx1_ < -1.0)
{
std::cout << "Configuration parameter rf_gain_rx1 should take values between -1.0 and 73 dB" << std::endl;
std::cout << "Error: provided value rf_gain_rx1=" << rf_gain_rx1_ << " is not among valid values" << std::endl;
std::cout << " This parameter has been set to its default value rf_gain_rx1=" << default_manual_gain_rx1 << std::endl;
std::cout << "Configuration parameter rf_gain_rx1 should take values between -1.0 and 73 dB\n";
std::cout << "Error: provided value rf_gain_rx1=" << rf_gain_rx1_ << " is not among valid values\n";
std::cout << " This parameter has been set to its default value rf_gain_rx1=" << default_manual_gain_rx1 << '\n';
rf_gain_rx1_ = default_manual_gain_rx1;
LOG(WARNING) << "Invalid configuration value for rf_gain_rx1 parameter. Set to rf_gain_rx1=" << default_manual_gain_rx1;
}
@ -197,9 +197,9 @@ Ad9361FpgaSignalSource::Ad9361FpgaSignalSource(const ConfigurationInterface *con
{
if (rf_gain_rx2_ > 73.0 or rf_gain_rx2_ < -1.0)
{
std::cout << "Configuration parameter rf_gain_rx2 should take values between -1.0 and 73 dB" << std::endl;
std::cout << "Error: provided value rf_gain_rx2=" << rf_gain_rx2_ << " is not among valid values" << std::endl;
std::cout << " This parameter has been set to its default value rf_gain_rx2=" << default_manual_gain_rx2 << std::endl;
std::cout << "Configuration parameter rf_gain_rx2 should take values between -1.0 and 73 dB\n";
std::cout << "Error: provided value rf_gain_rx2=" << rf_gain_rx2_ << " is not among valid values\n";
std::cout << " This parameter has been set to its default value rf_gain_rx2=" << default_manual_gain_rx2 << '\n';
rf_gain_rx2_ = default_manual_gain_rx2;
LOG(WARNING) << "Invalid configuration value for rf_gain_rx2 parameter. Set to rf_gain_rx2=" << default_manual_gain_rx2;
}
@ -207,27 +207,27 @@ Ad9361FpgaSignalSource::Ad9361FpgaSignalSource(const ConfigurationInterface *con
if ((filter_source_ != "Off") and (filter_source_ != "Auto") and (filter_source_ != "File") and (filter_source_ != "Design"))
{
std::cout << "Configuration parameter filter_source should take one of these values:" << std::endl;
std::cout << " Off: Disable filter" << std::endl;
std::cout << " Auto: Use auto-generated filters" << std::endl;
std::cout << " File: User-provided filter in filter_filename parameter" << std::endl;
std::cout << " Design: Create filter from Fpass, Fstop, sampling_frequency and bandwidth parameters" << std::endl;
std::cout << "Error: provided value filter_source=" << filter_source_ << " is not among valid values" << std::endl;
std::cout << " This parameter has been set to its default value filter_source=Off" << std::endl;
std::cout << "Configuration parameter filter_source should take one of these values:\n";
std::cout << " Off: Disable filter\n";
std::cout << " Auto: Use auto-generated filters\n";
std::cout << " File: User-provided filter in filter_filename parameter\n";
std::cout << " Design: Create filter from Fpass, Fstop, sampling_frequency and bandwidth parameters\n";
std::cout << "Error: provided value filter_source=" << filter_source_ << " is not among valid values\n";
std::cout << " This parameter has been set to its default value filter_source=Off\n";
filter_source_ = std::string("Off");
LOG(WARNING) << "Invalid configuration value for filter_source parameter. Set to filter_source=Off";
}
if (bandwidth_ < 200000 or bandwidth_ > 56000000)
{
std::cout << "Configuration parameter bandwidth should take values between 200000 and 56000000 Hz" << std::endl;
std::cout << "Error: provided value bandwidth=" << bandwidth_ << " is not among valid values" << std::endl;
std::cout << " This parameter has been set to its default value bandwidth=" << default_bandwidth << std::endl;
std::cout << "Configuration parameter bandwidth should take values between 200000 and 56000000 Hz\n";
std::cout << "Error: provided value bandwidth=" << bandwidth_ << " is not among valid values\n";
std::cout << " This parameter has been set to its default value bandwidth=" << default_bandwidth << '\n';
bandwidth_ = default_bandwidth;
LOG(WARNING) << "Invalid configuration value for bandwidth parameter. Set to bandwidth=" << default_bandwidth;
}
std::cout << "LO frequency : " << freq_ << " Hz" << std::endl;
std::cout << "LO frequency : " << freq_ << " Hz\n";
try
{
config_ad9361_rx_local(bandwidth_,
@ -250,24 +250,24 @@ Ad9361FpgaSignalSource::Ad9361FpgaSignalSource(const ConfigurationInterface *con
}
catch (const std::runtime_error &e)
{
std::cout << "Exception cached when configuring the RX chain: " << e.what() << std::endl;
std::cout << "Exception cached when configuring the RX chain: " << e.what() << '\n';
}
// LOCAL OSCILLATOR DDS GENERATOR FOR DUAL FREQUENCY OPERATION
if (enable_dds_lo_ == true)
{
if (tx_bandwidth_ < static_cast<uint64_t>(std::floor(static_cast<float>(freq_dds_tx_hz_) * 1.1)) or (tx_bandwidth_ < 200000) or (tx_bandwidth_ > 1000000))
{
std::cout << "Configuration parameter tx_bandwidth value should be between " << std::max(static_cast<float>(freq_dds_tx_hz_) * 1.1, 200000.0) << " and 1000000 Hz" << std::endl;
std::cout << "Error: provided value tx_bandwidth=" << tx_bandwidth_ << " is not among valid values" << std::endl;
std::cout << " This parameter has been set to its default value tx_bandwidth=500000" << std::endl;
std::cout << "Configuration parameter tx_bandwidth value should be between " << std::max(static_cast<float>(freq_dds_tx_hz_) * 1.1, 200000.0) << " and 1000000 Hz\n";
std::cout << "Error: provided value tx_bandwidth=" << tx_bandwidth_ << " is not among valid values\n";
std::cout << " This parameter has been set to its default value tx_bandwidth=500000\n";
tx_bandwidth_ = 500000;
LOG(WARNING) << "Invalid configuration value for tx_bandwidth parameter. Set to tx_bandwidth=500000";
}
if (tx_attenuation_db_ > 0.0 or tx_attenuation_db_ < -89.75)
{
std::cout << "Configuration parameter tx_attenuation_db should take values between 0.0 and -89.95 in 0.25 dB steps" << std::endl;
std::cout << "Error: provided value tx_attenuation_db=" << tx_attenuation_db_ << " is not among valid values" << std::endl;
std::cout << " This parameter has been set to its default value tx_attenuation_db=" << default_tx_attenuation_db << std::endl;
std::cout << "Configuration parameter tx_attenuation_db should take values between 0.0 and -89.95 in 0.25 dB steps\n";
std::cout << "Error: provided value tx_attenuation_db=" << tx_attenuation_db_ << " is not among valid values\n";
std::cout << " This parameter has been set to its default value tx_attenuation_db=" << default_tx_attenuation_db << '\n';
tx_attenuation_db_ = default_tx_attenuation_db;
LOG(WARNING) << "Invalid configuration value for tx_attenuation_db parameter. Set to tx_attenuation_db=" << default_tx_attenuation_db;
}
@ -283,7 +283,7 @@ Ad9361FpgaSignalSource::Ad9361FpgaSignalSource(const ConfigurationInterface *con
}
catch (const std::runtime_error &e)
{
std::cout << "Exception cached when configuring the TX carrier: " << e.what() << std::endl;
std::cout << "Exception cached when configuring the TX carrier: " << e.what() << '\n';
}
}
}
@ -352,7 +352,7 @@ void Ad9361FpgaSignalSource::run_DMA_process(const std::string &FreqBand, const
}
catch (const std::ifstream::failure &e)
{
std::cerr << "Exception opening file " << Filename1 << std::endl;
std::cerr << "Exception opening file " << Filename1 << '\n';
return;
}
@ -383,7 +383,7 @@ void Ad9361FpgaSignalSource::run_DMA_process(const std::string &FreqBand, const
tx_fd = open("/dev/loop_tx", O_WRONLY);
if (tx_fd < 0)
{
std::cout << "Cannot open loop device" << std::endl;
std::cout << "Cannot open loop device\n";
return;
}
@ -404,7 +404,7 @@ void Ad9361FpgaSignalSource::run_DMA_process(const std::string &FreqBand, const
}
catch (const std::ifstream::failure &e)
{
std::cerr << "Exception reading file " << Filename1 << std::endl;
std::cerr << "Exception reading file " << Filename1 << '\n';
}
if (infile1)
{
@ -436,7 +436,7 @@ void Ad9361FpgaSignalSource::run_DMA_process(const std::string &FreqBand, const
}
catch (const std::ifstream::failure &e)
{
std::cerr << "Exception reading file " << Filename1 << std::endl;
std::cerr << "Exception reading file " << Filename1 << '\n';
}
if (infile1)
{
@ -468,7 +468,7 @@ void Ad9361FpgaSignalSource::run_DMA_process(const std::string &FreqBand, const
}
catch (const std::ifstream::failure &e)
{
std::cerr << "Exception reading file " << Filename1 << std::endl;
std::cerr << "Exception reading file " << Filename1 << '\n';
}
if (infile1)
{
@ -484,7 +484,7 @@ void Ad9361FpgaSignalSource::run_DMA_process(const std::string &FreqBand, const
}
catch (const std::ifstream::failure &e)
{
std::cerr << "Exception reading file " << Filename1 << std::endl;
std::cerr << "Exception reading file " << Filename1 << '\n';
}
if (infile2)
{
@ -542,7 +542,7 @@ void Ad9361FpgaSignalSource::run_DMA_process(const std::string &FreqBand, const
int num_bytes_sent = write(tx_fd, input_samples_dma.data(), nread_elements * 2);
if (num_bytes_sent != num_transferred_bytes)
{
std::cerr << "Error: DMA could not send all the required samples " << std::endl;
std::cerr << "Error: DMA could not send all the required samples \n";
}
// Throttle the DMA
@ -572,7 +572,7 @@ void Ad9361FpgaSignalSource::run_DMA_process(const std::string &FreqBand, const
}
catch (const std::ifstream::failure &e)
{
std::cerr << "Exception closing files " << Filename1 << " and " << Filename2 << std::endl;
std::cerr << "Exception closing files " << Filename1 << " and " << Filename2 << '\n';
}
}

View File

@ -75,7 +75,7 @@ CustomUDPSignalSource::CustomUDPSignalSource(const ConfigurationInterface* confi
}
else
{
std::cout << "Configuration error: RF_channels<channels_in_use" << std::endl;
std::cout << "Configuration error: RF_channels<channels_in_use\n";
exit(0);
}
@ -105,7 +105,7 @@ void CustomUDPSignalSource::connect(gr::top_block_sptr top_block)
{
top_block->connect(udp_gnss_rx_source_, n, null_sinks_.at(n), 0);
}
DLOG(INFO) << "connected udp_source to null_sinks to enable the use of spare channels" << std::endl;
DLOG(INFO) << "connected udp_source to null_sinks to enable the use of spare channels\n";
if (dump_)
{
@ -133,7 +133,7 @@ void CustomUDPSignalSource::disconnect(gr::top_block_sptr top_block)
DLOG(INFO) << "disconnected source to file sink";
}
}
DLOG(INFO) << "disconnected udp_source" << std::endl;
DLOG(INFO) << "disconnected udp_source\n";
}

View File

@ -132,31 +132,31 @@ FileSignalSource::FileSignalSource(const ConfigurationInterface* configuration,
{
std::cerr
<< "The configuration file has not been found."
<< std::endl
<< '\n'
<< "Please create a configuration file based on the examples at the 'conf/' folder "
<< std::endl
<< '\n'
<< "and then generate your own GNSS Software Defined Receiver by doing:"
<< std::endl
<< '\n'
<< "$ gnss-sdr --config_file=/path/to/my_GNSS_SDR_configuration.conf"
<< std::endl;
<< '\n';
}
else
{
std::cerr
<< "The receiver was configured to work with a file signal source "
<< std::endl
<< '\n'
<< "but the specified file is unreachable by GNSS-SDR."
<< std::endl
<< '\n'
<< "Please modify your configuration file"
<< std::endl
<< '\n'
<< "and point SignalSource.filename to a valid raw data file. Then:"
<< std::endl
<< '\n'
<< "$ gnss-sdr --config_file=/path/to/my_GNSS_SDR_configuration.conf"
<< std::endl
<< '\n'
<< "Examples of configuration files available at:"
<< std::endl
<< '\n'
<< GNSSSDR_INSTALL_DIR "/share/gnss-sdr/conf/"
<< std::endl;
<< '\n';
}
LOG(INFO) << "file_signal_source: Unable to open the samples file "
@ -183,12 +183,12 @@ FileSignalSource::FileSignalSource(const ConfigurationInterface* configuration,
}
else
{
std::cout << "file_signal_source: Unable to open the samples file " << filename_.c_str() << std::endl;
std::cout << "file_signal_source: Unable to open the samples file " << filename_.c_str() << '\n';
LOG(ERROR) << "file_signal_source: Unable to open the samples file " << filename_.c_str();
}
std::streamsize ss = std::cout.precision();
std::cout << std::setprecision(16);
std::cout << "Processing file " << filename_ << ", which contains " << static_cast<double>(size) << " [bytes]" << std::endl;
std::cout << "Processing file " << filename_ << ", which contains " << static_cast<double>(size) << " [bytes]\n";
std::cout.precision(ss);
if (size > 0)
@ -209,7 +209,7 @@ FileSignalSource::FileSignalSource(const ConfigurationInterface* configuration,
}
DLOG(INFO) << "Total number samples to be processed= " << samples_ << " GNSS signal duration= " << signal_duration_s << " [s]";
std::cout << "GNSS signal recorded time to be processed: " << signal_duration_s << " [s]" << std::endl;
std::cout << "GNSS signal recorded time to be processed: " << signal_duration_s << " [s]\n";
valve_ = gnss_sdr_make_valve(item_size_, samples_, queue);
DLOG(INFO) << "valve(" << valve_->unique_id() << ")";

View File

@ -92,45 +92,45 @@ Fmcomms2SignalSource::Fmcomms2SignalSource(const ConfigurationInterface *configu
// some basic checks
if ((rf_port_select_ != "A_BALANCED") and (rf_port_select_ != "B_BALANCED") and (rf_port_select_ != "A_N") and (rf_port_select_ != "B_N") and (rf_port_select_ != "B_P") and (rf_port_select_ != "C_N") and (rf_port_select_ != "C_P") and (rf_port_select_ != "TX_MONITOR1") and (rf_port_select_ != "TX_MONITOR2") and (rf_port_select_ != "TX_MONITOR1_2"))
{
std::cout << "Configuration parameter rf_port_select should take one of these values:" << std::endl;
std::cout << " A_BALANCED, B_BALANCED, A_N, B_N, B_P, C_N, C_P, TX_MONITOR1, TX_MONITOR2, TX_MONITOR1_2" << std::endl;
std::cout << "Error: provided value rf_port_select=" << rf_port_select_ << " is not among valid values" << std::endl;
std::cout << " This parameter has been set to its default value rf_port_select=A_BALANCED" << std::endl;
std::cout << "Configuration parameter rf_port_select should take one of these values:\n";
std::cout << " A_BALANCED, B_BALANCED, A_N, B_N, B_P, C_N, C_P, TX_MONITOR1, TX_MONITOR2, TX_MONITOR1_2\n";
std::cout << "Error: provided value rf_port_select=" << rf_port_select_ << " is not among valid values\n";
std::cout << " This parameter has been set to its default value rf_port_select=A_BALANCED\n";
rf_port_select_ = std::string("A_BALANCED");
LOG(WARNING) << "Invalid configuration value for rf_port_select parameter. Set to rf_port_select=A_BALANCED";
}
if ((gain_mode_rx1_ != "manual") and (gain_mode_rx1_ != "slow_attack") and (gain_mode_rx1_ != "fast_attack") and (gain_mode_rx1_ != "hybrid"))
{
std::cout << "Configuration parameter gain_mode_rx1 should take one of these values:" << std::endl;
std::cout << " manual, slow_attack, fast_attack, hybrid" << std::endl;
std::cout << "Error: provided value gain_mode_rx1=" << gain_mode_rx1_ << " is not among valid values" << std::endl;
std::cout << " This parameter has been set to its default value gain_mode_rx1=" << default_gain_mode << std::endl;
std::cout << "Configuration parameter gain_mode_rx1 should take one of these values:\n";
std::cout << " manual, slow_attack, fast_attack, hybrid\n";
std::cout << "Error: provided value gain_mode_rx1=" << gain_mode_rx1_ << " is not among valid values\n";
std::cout << " This parameter has been set to its default value gain_mode_rx1=" << default_gain_mode << '\n';
gain_mode_rx1_ = default_gain_mode;
LOG(WARNING) << "Invalid configuration value for gain_mode_rx1 parameter. Set to gain_mode_rx1=" << default_gain_mode;
}
if ((gain_mode_rx2_ != "manual") and (gain_mode_rx2_ != "slow_attack") and (gain_mode_rx2_ != "fast_attack") and (gain_mode_rx2_ != "hybrid"))
{
std::cout << "Configuration parameter gain_mode_rx2 should take one of these values:" << std::endl;
std::cout << " manual, slow_attack, fast_attack, hybrid" << std::endl;
std::cout << "Error: provided value gain_mode_rx2=" << gain_mode_rx2_ << " is not among valid values" << std::endl;
std::cout << " This parameter has been set to its default value gain_mode_rx2=" << default_gain_mode << std::endl;
std::cout << "Configuration parameter gain_mode_rx2 should take one of these values:\n";
std::cout << " manual, slow_attack, fast_attack, hybrid\n";
std::cout << "Error: provided value gain_mode_rx2=" << gain_mode_rx2_ << " is not among valid values\n";
std::cout << " This parameter has been set to its default value gain_mode_rx2=" << default_gain_mode << '\n';
gain_mode_rx2_ = default_gain_mode;
LOG(WARNING) << "Invalid configuration value for gain_mode_rx1 parameter. Set to gain_mode_rx2=" << default_gain_mode;
}
if ((filter_source_ != "Off") and (filter_source_ != "Auto") and (filter_source_ != "File") and (filter_source_ != "Design"))
{
std::cout << "Configuration parameter filter_source should take one of these values:" << std::endl;
std::cout << " Off: Disable filter" << std::endl;
std::cout << " Auto: Use auto-generated filters" << std::endl;
std::cout << " File: User-provided filter in filter_filename parameter" << std::endl;
std::cout << "Configuration parameter filter_source should take one of these values:\n";
std::cout << " Off: Disable filter\n";
std::cout << " Auto: Use auto-generated filters\n";
std::cout << " File: User-provided filter in filter_filename parameter\n";
#if LIBAD9361_VERSION_GREATER_THAN_01
std::cout << " Design: Create filter from Fpass, Fstop, sampling_frequency and bandwidth parameters" << std::endl;
std::cout << " Design: Create filter from Fpass, Fstop, sampling_frequency and bandwidth parameters\n";
#endif
std::cout << "Error: provided value filter_source=" << filter_source_ << " is not among valid values" << std::endl;
std::cout << " This parameter has been set to its default value filter_source=Off" << std::endl;
std::cout << "Error: provided value filter_source=" << filter_source_ << " is not among valid values\n";
std::cout << " This parameter has been set to its default value filter_source=Off\n";
filter_source_ = std::string("Off");
LOG(WARNING) << "Invalid configuration value for filter_source parameter. Set to filter_source=Off";
}
@ -139,9 +139,9 @@ Fmcomms2SignalSource::Fmcomms2SignalSource(const ConfigurationInterface *configu
{
if (rf_gain_rx1_ > 73.0 or rf_gain_rx1_ < -1.0)
{
std::cout << "Configuration parameter rf_gain_rx1 should take values between -1.0 and 73 dB" << std::endl;
std::cout << "Error: provided value rf_gain_rx1=" << rf_gain_rx1_ << " is not among valid values" << std::endl;
std::cout << " This parameter has been set to its default value rf_gain_rx1=64.0" << std::endl;
std::cout << "Configuration parameter rf_gain_rx1 should take values between -1.0 and 73 dB\n";
std::cout << "Error: provided value rf_gain_rx1=" << rf_gain_rx1_ << " is not among valid values\n";
std::cout << " This parameter has been set to its default value rf_gain_rx1=64.0\n";
rf_gain_rx1_ = 64.0;
LOG(WARNING) << "Invalid configuration value for rf_gain_rx1 parameter. Set to rf_gain_rx1=64.0";
}
@ -151,9 +151,9 @@ Fmcomms2SignalSource::Fmcomms2SignalSource(const ConfigurationInterface *configu
{
if (rf_gain_rx2_ > 73.0 or rf_gain_rx2_ < -1.0)
{
std::cout << "Configuration parameter rf_gain_rx2 should take values between -1.0 and 73 dB" << std::endl;
std::cout << "Error: provided value rf_gain_rx2=" << rf_gain_rx2_ << " is not among valid values" << std::endl;
std::cout << " This parameter has been set to its default value rf_gain_rx2=64.0" << std::endl;
std::cout << "Configuration parameter rf_gain_rx2 should take values between -1.0 and 73 dB\n";
std::cout << "Error: provided value rf_gain_rx2=" << rf_gain_rx2_ << " is not among valid values\n";
std::cout << " This parameter has been set to its default value rf_gain_rx2=64.0\n";
rf_gain_rx2_ = 64.0;
LOG(WARNING) << "Invalid configuration value for rf_gain_rx2 parameter. Set to rf_gain_rx2=64.0";
}
@ -161,16 +161,16 @@ Fmcomms2SignalSource::Fmcomms2SignalSource(const ConfigurationInterface *configu
if (bandwidth_ < 200000 or bandwidth_ > 56000000)
{
std::cout << "Configuration parameter bandwidth should take values between 200000 and 56000000 Hz" << std::endl;
std::cout << "Error: provided value bandwidth=" << bandwidth_ << " is not among valid values" << std::endl;
std::cout << " This parameter has been set to its default value bandwidth=2000000" << std::endl;
std::cout << "Configuration parameter bandwidth should take values between 200000 and 56000000 Hz\n";
std::cout << "Error: provided value bandwidth=" << bandwidth_ << " is not among valid values\n";
std::cout << " This parameter has been set to its default value bandwidth=2000000\n";
bandwidth_ = 2000000;
LOG(WARNING) << "Invalid configuration value for bandwidth parameter. Set to bandwidth=2000000";
}
std::cout << "device address: " << uri_ << std::endl;
std::cout << "LO frequency : " << freq_ << " Hz" << std::endl;
std::cout << "sample rate: " << sample_rate_ << " Hz" << std::endl;
std::cout << "device address: " << uri_ << '\n';
std::cout << "LO frequency : " << freq_ << " Hz\n";
std::cout << "sample rate: " << sample_rate_ << " Hz\n";
if (item_type_ == "gr_complex")
{
@ -208,17 +208,17 @@ Fmcomms2SignalSource::Fmcomms2SignalSource(const ConfigurationInterface *configu
{
if (tx_bandwidth_ < static_cast<uint64_t>(std::floor(static_cast<float>(freq_dds_tx_hz_) * 1.1)) or (tx_bandwidth_ < 200000) or (tx_bandwidth_ > 1000000))
{
std::cout << "Configuration parameter tx_bandwidth value should be between " << std::max(static_cast<float>(freq_dds_tx_hz_) * 1.1, 200000.0) << " and 1000000 Hz" << std::endl;
std::cout << "Error: provided value tx_bandwidth=" << tx_bandwidth_ << " is not among valid values" << std::endl;
std::cout << " This parameter has been set to its default value tx_bandwidth=500000" << std::endl;
std::cout << "Configuration parameter tx_bandwidth value should be between " << std::max(static_cast<float>(freq_dds_tx_hz_) * 1.1, 200000.0) << " and 1000000 Hz\n";
std::cout << "Error: provided value tx_bandwidth=" << tx_bandwidth_ << " is not among valid values\n";
std::cout << " This parameter has been set to its default value tx_bandwidth=500000\n";
tx_bandwidth_ = 500000;
LOG(WARNING) << "Invalid configuration value for tx_bandwidth parameter. Set to tx_bandwidth=500000";
}
if (tx_attenuation_db_ > 0.0 or tx_attenuation_db_ < -89.75)
{
std::cout << "Configuration parameter tx_attenuation_db should take values between 0.0 and -89.95 in 0.25 dB steps" << std::endl;
std::cout << "Error: provided value tx_attenuation_db=" << tx_attenuation_db_ << " is not among valid values" << std::endl;
std::cout << " This parameter has been set to its default value tx_attenuation_db=" << default_tx_attenuation_db << std::endl;
std::cout << "Configuration parameter tx_attenuation_db should take values between 0.0 and -89.95 in 0.25 dB steps\n";
std::cout << "Error: provided value tx_attenuation_db=" << tx_attenuation_db_ << " is not among valid values\n";
std::cout << " This parameter has been set to its default value tx_attenuation_db=" << default_tx_attenuation_db << '\n';
tx_attenuation_db_ = default_tx_attenuation_db;
LOG(WARNING) << "Invalid configuration value for tx_attenuation_db parameter. Set to tx_attenuation_db=" << default_tx_attenuation_db;
}
@ -236,7 +236,7 @@ Fmcomms2SignalSource::Fmcomms2SignalSource(const ConfigurationInterface *configu
}
catch (const std::runtime_error &e)
{
std::cout << "Exception cached when configuring the TX carrier: " << e.what() << std::endl;
std::cout << "Exception cached when configuring the TX carrier: " << e.what() << '\n';
}
}
}
@ -275,17 +275,17 @@ Fmcomms2SignalSource::Fmcomms2SignalSource(const ConfigurationInterface *configu
{
if (tx_bandwidth_ < static_cast<uint64_t>(std::floor(static_cast<float>(freq_dds_tx_hz_) * 1.1)) or (tx_bandwidth_ < 200000) or (tx_bandwidth_ > 1000000))
{
std::cout << "Configuration parameter tx_bandwidth value should be between " << std::max(static_cast<float>(freq_dds_tx_hz_) * 1.1, 200000.0) << " and 1000000 Hz" << std::endl;
std::cout << "Error: provided value tx_bandwidth=" << tx_bandwidth_ << " is not among valid values" << std::endl;
std::cout << " This parameter has been set to its default value tx_bandwidth=500000" << std::endl;
std::cout << "Configuration parameter tx_bandwidth value should be between " << std::max(static_cast<float>(freq_dds_tx_hz_) * 1.1, 200000.0) << " and 1000000 Hz\n";
std::cout << "Error: provided value tx_bandwidth=" << tx_bandwidth_ << " is not among valid values\n";
std::cout << " This parameter has been set to its default value tx_bandwidth=500000\n";
tx_bandwidth_ = 500000;
LOG(WARNING) << "Invalid configuration value for tx_bandwidth parameter. Set to tx_bandwidth=500000";
}
if (tx_attenuation_db_ > 0.0 or tx_attenuation_db_ < -89.75)
{
std::cout << "Configuration parameter tx_attenuation_db should take values between 0.0 and -89.95 in 0.25 dB steps" << std::endl;
std::cout << "Error: provided value tx_attenuation_db=" << tx_attenuation_db_ << " is not among valid values" << std::endl;
std::cout << " This parameter has been set to its default value tx_attenuation_db=" << default_tx_attenuation_db << std::endl;
std::cout << "Configuration parameter tx_attenuation_db should take values between 0.0 and -89.95 in 0.25 dB steps\n";
std::cout << "Error: provided value tx_attenuation_db=" << tx_attenuation_db_ << " is not among valid values\n";
std::cout << " This parameter has been set to its default value tx_attenuation_db=" << default_tx_attenuation_db << '\n';
tx_attenuation_db_ = default_tx_attenuation_db;
LOG(WARNING) << "Invalid configuration value for tx_attenuation_db parameter. Set to tx_attenuation_db=" << default_tx_attenuation_db;
}
@ -303,7 +303,7 @@ Fmcomms2SignalSource::Fmcomms2SignalSource(const ConfigurationInterface *configu
}
catch (const std::runtime_error &e)
{
std::cout << "Exception cached when configuring the TX carrier: " << e.what() << std::endl;
std::cout << "Exception cached when configuring the TX carrier: " << e.what() << '\n';
}
}
}

View File

@ -127,31 +127,31 @@ MultichannelFileSignalSource::MultichannelFileSignalSource(const ConfigurationIn
{
std::cerr
<< "The configuration file has not been found."
<< std::endl
<< '\n'
<< "Please create a configuration file based on the examples at the 'conf/' folder "
<< std::endl
<< '\n'
<< "and then generate your own GNSS Software Defined Receiver by doing:"
<< std::endl
<< '\n'
<< "$ gnss-sdr --config_file=/path/to/my_GNSS_SDR_configuration.conf"
<< std::endl;
<< '\n';
}
else
{
std::cerr
<< "The receiver was configured to work with a file signal source "
<< std::endl
<< '\n'
<< "but the specified file is unreachable by GNSS-SDR."
<< std::endl
<< '\n'
<< "Please modify your configuration file"
<< std::endl
<< '\n'
<< "and point SignalSource.filename to a valid raw data file. Then:"
<< std::endl
<< '\n'
<< "$ gnss-sdr --config_file=/path/to/my_GNSS_SDR_configuration.conf"
<< std::endl
<< '\n'
<< "Examples of configuration files available at:"
<< std::endl
<< '\n'
<< GNSSSDR_INSTALL_DIR "/share/gnss-sdr/conf/"
<< std::endl;
<< '\n';
}
LOG(INFO) << "file_signal_source: Unable to open the samples file "
@ -177,12 +177,12 @@ MultichannelFileSignalSource::MultichannelFileSignalSource(const ConfigurationIn
}
else
{
std::cout << "file_signal_source: Unable to open the samples file " << filename_vec_.at(0).c_str() << std::endl;
std::cout << "file_signal_source: Unable to open the samples file " << filename_vec_.at(0).c_str() << '\n';
LOG(ERROR) << "file_signal_source: Unable to open the samples file " << filename_vec_.at(0).c_str();
}
std::streamsize ss = std::cout.precision();
std::cout << std::setprecision(16);
std::cout << "Processing file " << filename_vec_.at(0) << ", which contains " << static_cast<double>(size) << " [bytes]" << std::endl;
std::cout << "Processing file " << filename_vec_.at(0) << ", which contains " << static_cast<double>(size) << " [bytes]\n";
std::cout.precision(ss);
if (size > 0)
@ -203,7 +203,7 @@ MultichannelFileSignalSource::MultichannelFileSignalSource(const ConfigurationIn
}
DLOG(INFO) << "Total number samples to be processed= " << samples_ << " GNSS signal duration= " << signal_duration_s << " [s]";
std::cout << "GNSS signal recorded time to be processed: " << signal_duration_s << " [s]" << std::endl;
std::cout << "GNSS signal recorded time to be processed: " << signal_duration_s << " [s]\n";
valve_ = gnss_sdr_make_valve(item_size_, samples_, queue);
DLOG(INFO) << "valve(" << valve_->unique_id() << ")";

View File

@ -77,19 +77,19 @@ NsrFileSignalSource::NsrFileSignalSource(const ConfigurationInterface* configura
{
std::cerr
<< "The receiver was configured to work with a file signal source "
<< std::endl
<< '\n'
<< "but the specified file is unreachable by GNSS-SDR."
<< std::endl
<< '\n'
<< "Please modify your configuration file"
<< std::endl
<< '\n'
<< "and point SignalSource.filename to a valid raw data file. Then:"
<< std::endl
<< '\n'
<< "$ gnss-sdr --config_file=/path/to/my_GNSS_SDR_configuration.conf"
<< std::endl
<< '\n'
<< "Examples of configuration files available at:"
<< std::endl
<< '\n'
<< GNSSSDR_INSTALL_DIR "/share/gnss-sdr/conf/"
<< std::endl;
<< '\n';
LOG(WARNING) << "file_signal_source: Unable to open the samples file "
<< filename_.c_str() << ", exiting the program.";
@ -115,12 +115,12 @@ NsrFileSignalSource::NsrFileSignalSource(const ConfigurationInterface* configura
}
else
{
std::cout << "file_signal_source: Unable to open the samples file " << filename_.c_str() << std::endl;
std::cout << "file_signal_source: Unable to open the samples file " << filename_.c_str() << '\n';
LOG(ERROR) << "file_signal_source: Unable to open the samples file " << filename_.c_str();
}
std::streamsize ss = std::cout.precision();
std::cout << std::setprecision(16);
std::cout << "Processing file " << filename_ << ", which contains " << size << " [bytes]" << std::endl;
std::cout << "Processing file " << filename_ << ", which contains " << size << " [bytes]\n";
std::cout.precision(ss);
if (size > 0)
@ -135,7 +135,7 @@ NsrFileSignalSource::NsrFileSignalSource(const ConfigurationInterface* configura
double signal_duration_s;
signal_duration_s = static_cast<double>(samples_) * (1 / static_cast<double>(sampling_frequency_));
LOG(INFO) << "Total number samples to be processed= " << samples_ << " GNSS signal duration= " << signal_duration_s << " [s]";
std::cout << "GNSS signal recorded time to be processed: " << signal_duration_s << " [s]" << std::endl;
std::cout << "GNSS signal recorded time to be processed: " << signal_duration_s << " [s]\n";
valve_ = gnss_sdr_make_valve(sizeof(float), samples_, queue);
DLOG(INFO) << "valve(" << valve_->unique_id() << ")";

View File

@ -67,29 +67,29 @@ OsmosdrSignalSource::OsmosdrSignalSource(const ConfigurationInterface* configura
if (!antenna_.empty())
{
osmosdr_source_->set_antenna(antenna_, 0);
std::cout << boost::format("Set RX Antenna : %s") % (osmosdr_source_->get_antenna(0)) << std::endl;
std::cout << boost::format("Set RX Antenna : %s") % (osmosdr_source_->get_antenna(0)) << '\n';
LOG(INFO) << boost::format("Set RX Antenna : %s") % (osmosdr_source_->get_antenna(0));
}
// 2 set sampling rate
osmosdr_source_->set_sample_rate(sample_rate_);
std::cout << boost::format("Actual RX Rate: %f [SPS]...") % (osmosdr_source_->get_sample_rate()) << std::endl;
std::cout << boost::format("Actual RX Rate: %f [SPS]...") % (osmosdr_source_->get_sample_rate()) << '\n';
LOG(INFO) << boost::format("Actual RX Rate: %f [SPS]...") % (osmosdr_source_->get_sample_rate());
// 3. set rx frequency
osmosdr_source_->set_center_freq(freq_);
std::cout << boost::format("Actual RX Freq: %f [Hz]...") % (osmosdr_source_->get_center_freq()) << std::endl;
std::cout << boost::format("Actual RX Freq: %f [Hz]...") % (osmosdr_source_->get_center_freq()) << '\n';
LOG(INFO) << boost::format("Actual RX Freq: %f [Hz]...") % (osmosdr_source_->get_center_freq());
// TODO: Assign the remnant IF from the PLL tune error
std::cout << boost::format("PLL Frequency tune error %f [Hz]...") % (osmosdr_source_->get_center_freq() - freq_) << std::endl;
std::cout << boost::format("PLL Frequency tune error %f [Hz]...") % (osmosdr_source_->get_center_freq() - freq_) << '\n';
LOG(INFO) << boost::format("PLL Frequency tune error %f [Hz]...") % (osmosdr_source_->get_center_freq() - freq_);
// 4. set rx gain
if (this->AGC_enabled_ == true)
{
osmosdr_source_->set_gain_mode(true);
std::cout << "AGC enabled" << std::endl;
std::cout << "AGC enabled\n";
LOG(INFO) << "AGC enabled";
}
else
@ -100,19 +100,19 @@ OsmosdrSignalSource::OsmosdrSignalSource(const ConfigurationInterface* configura
osmosdr_source_->set_bb_gain(if_gain_, 0);
if (!osmosdr_args_.empty() && (osmosdr_args_.find("bladerf") != std::string::npos))
{
std::cout << boost::format("Actual LNA Gain: %f dB...") % osmosdr_source_->get_gain("LNA", 0) << std::endl;
std::cout << boost::format("Actual VGA1 Gain: %f dB...") % osmosdr_source_->get_gain("VGA1", 0) << std::endl;
std::cout << boost::format("Actual VGA2 Gain: %f dB...") % osmosdr_source_->get_gain("VGA2", 0) << std::endl;
std::cout << boost::format("Actual LNA Gain: %f dB...") % osmosdr_source_->get_gain("LNA", 0) << '\n';
std::cout << boost::format("Actual VGA1 Gain: %f dB...") % osmosdr_source_->get_gain("VGA1", 0) << '\n';
std::cout << boost::format("Actual VGA2 Gain: %f dB...") % osmosdr_source_->get_gain("VGA2", 0) << '\n';
}
else
{
std::cout << boost::format("Actual RX Gain: %f dB...") % osmosdr_source_->get_gain() << std::endl;
std::cout << boost::format("Actual RX Gain: %f dB...") % osmosdr_source_->get_gain() << '\n';
LOG(INFO) << boost::format("Actual RX Gain: %f dB...") % osmosdr_source_->get_gain();
}
}
// Get actual bandwidth
std::cout << boost::format("Actual Bandwidth: %f [Hz]...") % osmosdr_source_->get_bandwidth(0) << std::endl;
std::cout << boost::format("Actual Bandwidth: %f [Hz]...") % osmosdr_source_->get_bandwidth(0) << '\n';
}
else
{
@ -150,7 +150,7 @@ void OsmosdrSignalSource::driver_instance()
{
if (!osmosdr_args_.empty())
{
std::cout << "OsmoSdr arguments: " << osmosdr_args_ << std::endl;
std::cout << "OsmoSdr arguments: " << osmosdr_args_ << '\n';
LOG(INFO) << "OsmoSdr arguments: " << osmosdr_args_;
}
osmosdr_source_ = osmosdr::source::make(osmosdr_args_);

View File

@ -64,17 +64,17 @@ PlutosdrSignalSource::PlutosdrSignalSource(const ConfigurationInterface* configu
if (item_type_ != "gr_complex")
{
std::cout << "Configuration error: item_type must be gr_complex" << std::endl;
std::cout << "Configuration error: item_type must be gr_complex\n";
LOG(FATAL) << "Configuration error: item_type must be gr_complex!";
}
// basic check
if ((gain_mode_ != "manual") and (gain_mode_ != "slow_attack") and (gain_mode_ != "fast_attack") and (gain_mode_ != "hybrid"))
{
std::cout << "Configuration parameter gain_mode should take one of these values:" << std::endl;
std::cout << " manual, slow_attack, fast_attack, hybrid" << std::endl;
std::cout << "Error: provided value gain_mode=" << gain_mode_ << " is not among valid values" << std::endl;
std::cout << " This parameter has been set to its default value gain_mode=" << default_gain_mode << std::endl;
std::cout << "Configuration parameter gain_mode should take one of these values:\n";
std::cout << " manual, slow_attack, fast_attack, hybrid\n";
std::cout << "Error: provided value gain_mode=" << gain_mode_ << " is not among valid values\n";
std::cout << " This parameter has been set to its default value gain_mode=" << default_gain_mode << '\n';
gain_mode_ = default_gain_mode;
LOG(WARNING) << "Invalid configuration value for gain_mode parameter. Set to gain_mode=" << default_gain_mode;
}
@ -83,9 +83,9 @@ PlutosdrSignalSource::PlutosdrSignalSource(const ConfigurationInterface* configu
{
if (rf_gain_ > 73.0 or rf_gain_ < -1.0)
{
std::cout << "Configuration parameter rf_gain should take values between -1.0 and 73 dB" << std::endl;
std::cout << "Error: provided value rf_gain=" << rf_gain_ << " is not among valid values" << std::endl;
std::cout << " This parameter has been set to its default value rf_gain=64.0" << std::endl;
std::cout << "Configuration parameter rf_gain should take values between -1.0 and 73 dB\n";
std::cout << "Error: provided value rf_gain=" << rf_gain_ << " is not among valid values\n";
std::cout << " This parameter has been set to its default value rf_gain=64.0\n";
rf_gain_ = 64.0;
LOG(WARNING) << "Invalid configuration value for rf_gain parameter. Set to rf_gain=64.0";
}
@ -93,35 +93,35 @@ PlutosdrSignalSource::PlutosdrSignalSource(const ConfigurationInterface* configu
if ((filter_source_ != "Off") and (filter_source_ != "Auto") and (filter_source_ != "File") and (filter_source_ != "Design"))
{
std::cout << "Configuration parameter filter_source should take one of these values:" << std::endl;
std::cout << " Off: Disable filter" << std::endl;
std::cout << " Auto: Use auto-generated filters" << std::endl;
std::cout << " File: User-provided filter in filter_filename parameter" << std::endl;
std::cout << "Configuration parameter filter_source should take one of these values:\n";
std::cout << " Off: Disable filter\n";
std::cout << " Auto: Use auto-generated filters\n";
std::cout << " File: User-provided filter in filter_filename parameter\n";
#if LIBAD9361_VERSION_GREATER_THAN_01
std::cout << " Design: Create filter from Fpass, Fstop, sampling_frequency and bandwidth parameters" << std::endl;
std::cout << " Design: Create filter from Fpass, Fstop, sampling_frequency and bandwidth parameters\n";
#endif
std::cout << "Error: provided value filter_source=" << filter_source_ << " is not among valid values" << std::endl;
std::cout << " This parameter has been set to its default value filter_source=Off" << std::endl;
std::cout << "Error: provided value filter_source=" << filter_source_ << " is not among valid values\n";
std::cout << " This parameter has been set to its default value filter_source=Off\n";
filter_source_ = std::string("Off");
LOG(WARNING) << "Invalid configuration value for filter_source parameter. Set to filter_source=Off";
}
if (bandwidth_ < 200000 or bandwidth_ > 56000000)
{
std::cout << "Configuration parameter bandwidth should take values between 200000 and 56000000 Hz" << std::endl;
std::cout << "Error: provided value bandwidth=" << bandwidth_ << " is not among valid values" << std::endl;
std::cout << " This parameter has been set to its default value bandwidth=2000000" << std::endl;
std::cout << "Configuration parameter bandwidth should take values between 200000 and 56000000 Hz\n";
std::cout << "Error: provided value bandwidth=" << bandwidth_ << " is not among valid values\n";
std::cout << " This parameter has been set to its default value bandwidth=2000000\n";
bandwidth_ = 2000000;
LOG(WARNING) << "Invalid configuration value for bandwidth parameter. Set to bandwidth=2000000";
}
item_size_ = sizeof(gr_complex);
std::cout << "device address: " << uri_ << std::endl;
std::cout << "frequency : " << freq_ << " Hz" << std::endl;
std::cout << "sample rate: " << sample_rate_ << " Hz" << std::endl;
std::cout << "gain mode: " << gain_mode_ << std::endl;
std::cout << "item type: " << item_type_ << std::endl;
std::cout << "device address: " << uri_ << '\n';
std::cout << "frequency : " << freq_ << " Hz\n";
std::cout << "sample rate: " << sample_rate_ << " Hz\n";
std::cout << "gain mode: " << gain_mode_ << '\n';
std::cout << "item type: " << item_type_ << '\n';
#if GNURADIO_API_IIO
plutosdr_source_ = gr::iio::pluto_source::make(uri_, freq_, sample_rate_,

View File

@ -82,21 +82,21 @@ RtlTcpSignalSource::RtlTcpSignalSource(const ConfigurationInterface* configurati
if (this->AGC_enabled_ == true)
{
std::cout << "AGC enabled" << std::endl;
std::cout << "AGC enabled\n";
LOG(INFO) << "AGC enabled";
signal_source_->set_agc_mode(true);
}
else
{
std::cout << "AGC disabled" << std::endl;
std::cout << "AGC disabled\n";
LOG(INFO) << "AGC disabled";
signal_source_->set_agc_mode(false);
std::cout << "Setting gain to " << gain_ << std::endl;
std::cout << "Setting gain to " << gain_ << '\n';
LOG(INFO) << "Setting gain to " << gain_;
signal_source_->set_gain(gain_);
std::cout << "Setting IF gain to " << if_gain_ << std::endl;
std::cout << "Setting IF gain to " << if_gain_ << '\n';
LOG(INFO) << "Setting IF gain to " << if_gain_;
signal_source_->set_if_gain(if_gain_);
}
@ -135,7 +135,7 @@ void RtlTcpSignalSource::MakeBlock()
{
try
{
std::cout << "Connecting to " << address_ << ":" << port_ << std::endl;
std::cout << "Connecting to " << address_ << ":" << port_ << '\n';
LOG(INFO) << "Connecting to " << address_ << ":" << port_;
signal_source_ = rtl_tcp_make_signal_source_c(address_, port_, flip_iq_);
}

View File

@ -76,19 +76,19 @@ SpirFileSignalSource::SpirFileSignalSource(const ConfigurationInterface* configu
{
std::cerr
<< "The receiver was configured to work with a file signal source "
<< std::endl
<< '\n'
<< "but the specified file is unreachable by GNSS-SDR."
<< std::endl
<< '\n'
<< "Please modify your configuration file"
<< std::endl
<< '\n'
<< "and point SignalSource.filename to a valid raw data file. Then:"
<< std::endl
<< '\n'
<< "$ gnss-sdr --config_file=/path/to/my_GNSS_SDR_configuration.conf"
<< std::endl
<< '\n'
<< "Examples of configuration files available at:"
<< std::endl
<< '\n'
<< GNSSSDR_INSTALL_DIR "/share/gnss-sdr/conf/"
<< std::endl;
<< '\n';
LOG(WARNING) << "file_signal_source: Unable to open the samples file "
<< filename_.c_str() << ", exiting the program.";
@ -114,12 +114,12 @@ SpirFileSignalSource::SpirFileSignalSource(const ConfigurationInterface* configu
}
else
{
std::cout << "file_signal_source: Unable to open the samples file " << filename_.c_str() << std::endl;
std::cout << "file_signal_source: Unable to open the samples file " << filename_.c_str() << '\n';
LOG(ERROR) << "file_signal_source: Unable to open the samples file " << filename_.c_str();
}
std::streamsize ss = std::cout.precision();
std::cout << std::setprecision(16);
std::cout << "Processing file " << filename_ << ", which contains " << size << " [bytes]" << std::endl;
std::cout << "Processing file " << filename_ << ", which contains " << size << " [bytes]\n";
std::cout.precision(ss);
if (size > 0)
@ -134,7 +134,7 @@ SpirFileSignalSource::SpirFileSignalSource(const ConfigurationInterface* configu
double signal_duration_s;
signal_duration_s = static_cast<double>(samples_) * (1 / static_cast<double>(sampling_frequency_));
LOG(INFO) << "Total number samples to be processed= " << samples_ << " GNSS signal duration= " << signal_duration_s << " [s]";
std::cout << "GNSS signal recorded time to be processed: " << signal_duration_s << " [s]" << std::endl;
std::cout << "GNSS signal recorded time to be processed: " << signal_duration_s << " [s]\n";
valve_ = gnss_sdr_make_valve(sizeof(float), samples_, queue);
DLOG(INFO) << "valve(" << valve_->unique_id() << ")";

View File

@ -78,19 +78,19 @@ SpirGSS6450FileSignalSource::SpirGSS6450FileSignalSource(const ConfigurationInte
{
std::cerr
<< "The receiver was configured to work with a file signal source "
<< std::endl
<< '\n'
<< "but the specified file is unreachable by GNSS-SDR."
<< std::endl
<< '\n'
<< "Please modify your configuration file"
<< std::endl
<< '\n'
<< "and point SignalSource.filename to a valid raw data file. Then:"
<< std::endl
<< '\n'
<< "$ gnss-sdr --config_file=/path/to/my_GNSS_SDR_configuration.conf"
<< std::endl
<< '\n'
<< "Examples of configuration files available at:"
<< std::endl
<< '\n'
<< GNSSSDR_INSTALL_DIR "/share/gnss-sdr/conf/"
<< std::endl;
<< '\n';
LOG(WARNING) << "file_signal_source: Unable to open the samples file "
<< filename_.c_str() << ", exiting the program.";
@ -115,12 +115,12 @@ SpirGSS6450FileSignalSource::SpirGSS6450FileSignalSource(const ConfigurationInte
}
else
{
std::cout << "file_signal_source: Unable to open the samples file " << filename_.c_str() << std::endl;
std::cout << "file_signal_source: Unable to open the samples file " << filename_.c_str() << '\n';
LOG(ERROR) << "file_signal_source: Unable to open the samples file " << filename_.c_str();
}
std::streamsize ss = std::cout.precision();
std::cout << std::setprecision(16);
std::cout << "Processing file " << filename_ << ", which contains " << size << " [bytes]" << std::endl;
std::cout << "Processing file " << filename_ << ", which contains " << size << " [bytes]\n";
std::cout.precision(ss);
if (size > 0)
@ -133,7 +133,7 @@ SpirGSS6450FileSignalSource::SpirGSS6450FileSignalSource(const ConfigurationInte
CHECK(samples_ > 0) << "File does not contain enough samples to process.";
double signal_duration_s = static_cast<double>(samples_) / sampling_frequency_;
LOG(INFO) << "Total number samples to be processed= " << samples_ << " GNSS signal duration= " << signal_duration_s << " [s]";
std::cout << "GNSS signal recorded time to be processed: " << signal_duration_s << " [s]" << std::endl;
std::cout << "GNSS signal recorded time to be processed: " << signal_duration_s << " [s]\n";
for (uint32_t i = 0; i < (n_channels_); i++)
{

View File

@ -82,19 +82,19 @@ TwoBitCpxFileSignalSource::TwoBitCpxFileSignalSource(
{
std::cerr
<< "The receiver was configured to work with a file signal source "
<< std::endl
<< '\n'
<< "but the specified file is unreachable by GNSS-SDR."
<< std::endl
<< '\n'
<< "Please modify your configuration file"
<< std::endl
<< '\n'
<< "and point SignalSource.filename to a valid raw data file. Then:"
<< std::endl
<< '\n'
<< "$ gnss-sdr --config_file=/path/to/my_GNSS_SDR_configuration.conf"
<< std::endl
<< '\n'
<< "Examples of configuration files available at:"
<< std::endl
<< '\n'
<< GNSSSDR_INSTALL_DIR "/share/gnss-sdr/conf/"
<< std::endl;
<< '\n';
LOG(WARNING) << "file_signal_source: Unable to open the samples file "
<< filename_.c_str() << ", exiting the program.";
@ -120,12 +120,12 @@ TwoBitCpxFileSignalSource::TwoBitCpxFileSignalSource(
}
else
{
std::cout << "file_signal_source: Unable to open the samples file " << filename_.c_str() << std::endl;
std::cout << "file_signal_source: Unable to open the samples file " << filename_.c_str() << '\n';
LOG(ERROR) << "file_signal_source: Unable to open the samples file " << filename_.c_str();
}
std::streamsize ss = std::cout.precision();
std::cout << std::setprecision(16);
std::cout << "Processing file " << filename_ << ", which contains " << size << " [bytes]" << std::endl;
std::cout << "Processing file " << filename_ << ", which contains " << size << " [bytes]\n";
std::cout.precision(ss);
if (size > 0)
@ -140,7 +140,7 @@ TwoBitCpxFileSignalSource::TwoBitCpxFileSignalSource(
double signal_duration_s;
signal_duration_s = static_cast<double>(samples_) * (1 / static_cast<double>(sampling_frequency_));
LOG(INFO) << "Total number samples to be processed= " << samples_ << " GNSS signal duration= " << signal_duration_s << " [s]";
std::cout << "GNSS signal recorded time to be processed: " << signal_duration_s << " [s]" << std::endl;
std::cout << "GNSS signal recorded time to be processed: " << signal_duration_s << " [s]\n";
valve_ = gnss_sdr_make_valve(sizeof(gr_complex), samples_, queue);
DLOG(INFO) << "valve(" << valve_->unique_id() << ")";

View File

@ -146,19 +146,19 @@ TwoBitPackedFileSignalSource::TwoBitPackedFileSignalSource(
{
std::cerr
<< "The receiver was configured to work with a file signal source "
<< std::endl
<< '\n'
<< "but the specified file is unreachable by GNSS-SDR."
<< std::endl
<< '\n'
<< "Please modify your configuration file"
<< std::endl
<< '\n'
<< "and point SignalSource.filename to a valid raw data file. Then:"
<< std::endl
<< '\n'
<< "$ gnss-sdr --config_file=/path/to/my_GNSS_SDR_configuration.conf"
<< std::endl
<< '\n'
<< "Examples of configuration files available at:"
<< std::endl
<< '\n'
<< GNSSSDR_INSTALL_DIR "/share/gnss-sdr/conf/"
<< std::endl;
<< '\n';
LOG(WARNING) << "file_signal_source: Unable to open the samples file "
<< filename_.c_str() << ", exiting the program.";
@ -191,12 +191,12 @@ TwoBitPackedFileSignalSource::TwoBitPackedFileSignalSource(
}
else
{
std::cout << "file_signal_source: Unable to open the samples file " << filename_.c_str() << std::endl;
std::cout << "file_signal_source: Unable to open the samples file " << filename_.c_str() << '\n';
LOG(ERROR) << "file_signal_source: Unable to open the samples file " << filename_.c_str();
}
std::streamsize ss = std::cout.precision();
std::cout << std::setprecision(16);
std::cout << "Processing file " << filename_ << ", which contains " << size << " [bytes]" << std::endl;
std::cout << "Processing file " << filename_ << ", which contains " << size << " [bytes]\n";
std::cout.precision(ss);
}
@ -204,7 +204,7 @@ TwoBitPackedFileSignalSource::TwoBitPackedFileSignalSource(
double signal_duration_s;
signal_duration_s = static_cast<double>(samples_) * (1 / static_cast<double>(sampling_frequency_));
LOG(INFO) << "Total number samples to be processed= " << samples_ << " GNSS signal duration= " << signal_duration_s << " [s]";
std::cout << "GNSS signal recorded time to be processed: " << signal_duration_s << " [s]" << std::endl;
std::cout << "GNSS signal recorded time to be processed: " << signal_duration_s << " [s]\n";
valve_ = gnss_sdr_make_valve(output_item_size, samples_, queue);
DLOG(INFO) << "valve(" << valve_->unique_id() << ")";

View File

@ -149,30 +149,30 @@ UhdSignalSource::UhdSignalSource(const ConfigurationInterface* configuration,
// 2.2 set the sample rate for the usrp device
uhd_source_->set_samp_rate(sample_rate_);
// the actual sample rate may differ from the rate set
std::cout << boost::format("Sampling Rate for the USRP device: %f [sps]...") % (uhd_source_->get_samp_rate()) << std::endl;
std::cout << boost::format("Sampling Rate for the USRP device: %f [sps]...") % (uhd_source_->get_samp_rate()) << '\n';
LOG(INFO) << boost::format("Sampling Rate for the USRP device: %f [sps]...") % (uhd_source_->get_samp_rate());
std::vector<std::string> sensor_names;
for (int i = 0; i < RF_channels_; i++)
{
std::cout << "UHD RF CHANNEL #" << i << " SETTINGS" << std::endl;
std::cout << "UHD RF CHANNEL #" << i << " SETTINGS\n";
// 3. Tune the usrp device to the desired center frequency
uhd_source_->set_center_freq(freq_.at(i), i);
std::cout << boost::format("Actual USRP center freq.: %f [Hz]...") % (uhd_source_->get_center_freq(i)) << std::endl;
std::cout << boost::format("Actual USRP center freq.: %f [Hz]...") % (uhd_source_->get_center_freq(i)) << '\n';
LOG(INFO) << boost::format("Actual USRP center freq. set to: %f [Hz]...") % (uhd_source_->get_center_freq(i));
// TODO: Assign the remnant IF from the PLL tune error
std::cout << boost::format("PLL Frequency tune error %f [Hz]...") % (uhd_source_->get_center_freq(i) - freq_.at(i)) << std::endl;
std::cout << boost::format("PLL Frequency tune error %f [Hz]...") % (uhd_source_->get_center_freq(i) - freq_.at(i)) << '\n';
LOG(INFO) << boost::format("PLL Frequency tune error %f [Hz]...") % (uhd_source_->get_center_freq(i) - freq_.at(i));
// 4. set the gain for the daughterboard
uhd_source_->set_gain(gain_.at(i), i);
std::cout << boost::format("Actual daughterboard gain set to: %f dB...") % uhd_source_->get_gain(i) << std::endl;
std::cout << boost::format("Actual daughterboard gain set to: %f dB...") % uhd_source_->get_gain(i) << '\n';
LOG(INFO) << boost::format("Actual daughterboard gain set to: %f dB...") % uhd_source_->get_gain(i);
// 5. Set the bandpass filter on the RF frontend
std::cout << boost::format("Setting RF bandpass filter bandwidth to: %f [Hz]...") % IF_bandwidth_hz_.at(i) << std::endl;
std::cout << boost::format("Setting RF bandpass filter bandwidth to: %f [Hz]...") % IF_bandwidth_hz_.at(i) << '\n';
uhd_source_->set_bandwidth(IF_bandwidth_hz_.at(i), i);
// set the antenna (optional)
@ -189,11 +189,11 @@ UhdSignalSource::UhdSignalSource(const ConfigurationInterface* configuration,
std::cout << boost::format("Check for front-end %s ...") % lo_locked.to_pp_string() << " is ";
if (lo_locked.to_bool() == true)
{
std::cout << "Locked" << std::endl;
std::cout << "Locked\n";
}
else
{
std::cout << "UNLOCKED!" << std::endl;
std::cout << "UNLOCKED!\n";
}
// UHD_ASSERT_THROW(lo_locked.to_bool());
}

View File

@ -123,7 +123,7 @@ Gr_Complex_Ip_Packet_Source::Gr_Complex_Ip_Packet_Source(std::string src_device,
std::cout << "Unknown wire sample type\n";
exit(0);
}
std::cout << "d_wire_sample_type:" << d_wire_sample_type << std::endl;
std::cout << "d_wire_sample_type:" << d_wire_sample_type << '\n';
d_src_device = std::move(src_device);
d_udp_port = udp_port;
d_udp_payload_size = udp_packet_size;
@ -186,15 +186,15 @@ bool Gr_Complex_Ip_Packet_Source::open()
descr = pcap_open_live(d_src_device.c_str(), 1500, 1, 1000, errbuf.data());
if (descr == nullptr)
{
std::cout << "Error opening Ethernet device " << d_src_device << std::endl;
std::cout << "Fatal Error in pcap_open_live(): " << std::string(errbuf.data()) << std::endl;
std::cout << "Error opening Ethernet device " << d_src_device << '\n';
std::cout << "Fatal Error in pcap_open_live(): " << std::string(errbuf.data()) << '\n';
return false;
}
// bind UDP port to avoid automatic reply with ICMP port unreachable packets from kernel
d_sock_raw = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
if (d_sock_raw == -1)
{
std::cout << "Error opening UDP socket" << std::endl;
std::cout << "Error opening UDP socket\n";
return false;
}
@ -208,7 +208,7 @@ bool Gr_Complex_Ip_Packet_Source::open()
// bind socket to port
if (bind(d_sock_raw, reinterpret_cast<struct sockaddr *>(&si_me), sizeof(si_me)) == -1)
{
std::cout << "Error opening UDP socket" << std::endl;
std::cout << "Error opening UDP socket\n";
return false;
}
return true;
@ -273,7 +273,7 @@ void Gr_Complex_Ip_Packet_Source::pcap_callback(__attribute__((unused)) u_char *
// ih->daddr.byte3,
// ih->daddr.byte4,
// dport);
// std::cout<<"uh->len:"<<ntohs(uh->len)<<std::endl;
// std::cout<<"uh->len:"<<ntohs(uh->len)<< '\n';
int payload_length_bytes = ntohs(uh->len) - 8; // total udp packet length minus the header length
// read the payload bytes and insert them into the shared circular buffer

View File

@ -45,7 +45,7 @@ labsat23_source::labsat23_source(const char *signal_file_basename,
{
if (channel_selector < 1 or channel_selector > 2)
{
std::cout << "Labsat source config error: channel selection out of bounds, check gnss-sdr config file" << std::endl;
std::cout << "Labsat source config error: channel selection out of bounds, check gnss-sdr config file\n";
exit(1);
}
d_channel_selector_config = channel_selector;
@ -64,11 +64,11 @@ labsat23_source::labsat23_source(const char *signal_file_basename,
if (binary_input_file.is_open())
{
std::cout << "Labsat file source is reading samples from " << signal_file << std::endl;
std::cout << "Labsat file source is reading samples from " << signal_file << '\n';
}
else
{
std::cout << "Labsat file " << signal_file << " could not be opened!" << std::endl;
std::cout << "Labsat file " << signal_file << " could not be opened!\n";
exit(1);
}
}
@ -219,7 +219,7 @@ int labsat23_source::general_work(int noutput_items,
if (preamble_ok == false)
{
std::cout << "Labsat source do not detect the preamble in the selected file" << std::endl;
std::cout << "Labsat source do not detect the preamble in the selected file\n";
return -1;
}
@ -227,18 +227,18 @@ int labsat23_source::general_work(int noutput_items,
if (memblock[byte_counter] == 0x4C and memblock[byte_counter + 1] == 0x53 and memblock[byte_counter + 2] == 0x32)
{
d_labsat_version = 2;
std::cout << "Labsat file version 2 detected" << std::endl;
std::cout << "Labsat file version 2 detected\n";
}
if (memblock[byte_counter] == 0x4C and memblock[byte_counter + 1] == 0x53 and memblock[byte_counter + 2] == 0x33)
{
d_labsat_version = 3;
std::cout << "Labsat file version 3 detected" << std::endl;
std::cout << "Labsat file version 3 detected\n";
}
if (d_labsat_version == 0)
{
std::cout << "Labsat source do not detect the labsat version in file header" << std::endl;
std::cout << "Labsat source do not detect the labsat version in file header\n";
return -1;
}
@ -246,7 +246,7 @@ int labsat23_source::general_work(int noutput_items,
int sub_version = static_cast<int>(memblock[byte_counter]);
std::cout << "Labsat file sub version " << sub_version << std::endl;
std::cout << "Labsat file sub version " << sub_version << '\n';
byte_counter++;
@ -270,32 +270,32 @@ int labsat23_source::general_work(int noutput_items,
switch (d_ref_clock)
{
case 0:
std::cout << "Labsat reference clock: internal OCXO" << std::endl;
std::cout << "Labsat reference clock: internal OCXO\n";
break;
case 1:
std::cout << "Labsat reference clock: internal TCXO" << std::endl;
std::cout << "Labsat reference clock: internal TCXO\n";
break;
case 2:
std::cout << "Labsat reference clock: external 10 MHz" << std::endl;
std::cout << "Labsat reference clock: external 10 MHz\n";
break;
case 3:
std::cout << "Labsat reference clock: external 16.386 MHz" << std::endl;
std::cout << "Labsat reference clock: external 16.386 MHz\n";
break;
default:
std::cout << "Labsat Unknown reference clock ID " << static_cast<int>(d_ref_clock) << std::endl;
std::cout << "Labsat Unknown reference clock ID " << static_cast<int>(d_ref_clock) << '\n';
}
byte_counter++;
d_bits_per_sample = static_cast<uint8_t>(memblock[byte_counter]);
switch (d_bits_per_sample)
{
case 2:
std::cout << "Labsat is using 2 bits per sample" << std::endl;
std::cout << "Labsat is using 2 bits per sample\n";
break;
case 4:
std::cout << "Labsat is using 4 bits per sample" << std::endl;
std::cout << "Labsat is using 4 bits per sample\n";
break;
default:
std::cout << "Labsat Unknown bits per sample ID " << static_cast<int>(d_bits_per_sample) << std::endl;
std::cout << "Labsat Unknown bits per sample ID " << static_cast<int>(d_bits_per_sample) << '\n';
return -1;
}
@ -304,36 +304,36 @@ int labsat23_source::general_work(int noutput_items,
switch (d_channel_selector)
{
case 0:
std::cout << "Available channels: Channel A + B, 1 bit quantisation (I & Q)" << std::endl;
std::cout << "Available channels: Channel A + B, 1 bit quantisation (I & Q)\n";
break;
case 1:
std::cout << "Available channels: Channel A, 1 bit quantisation (I & Q)" << std::endl;
std::cout << "Available channels: Channel A, 1 bit quantisation (I & Q)\n";
break;
case 2:
std::cout << "Available channels: Channel B, 1 bit quantisation (I & Q)" << std::endl;
std::cout << "Available channels: Channel B, 1 bit quantisation (I & Q)\n";
break;
case 3:
std::cout << "Available channels: Channel A, 2 bit quantisation (I & Q)" << std::endl;
std::cout << "Available channels: Channel A, 2 bit quantisation (I & Q)\n";
break;
case 4:
std::cout << "Available channels: Channel B, 2 bit quantisation (I & Q)" << std::endl;
std::cout << "Available channels: Channel B, 2 bit quantisation (I & Q)\n";
break;
default:
std::cout << "Unknown channel selection ID " << static_cast<int>(d_channel_selector) << std::endl;
std::cout << "Unknown channel selection ID " << static_cast<int>(d_channel_selector) << '\n';
return -1;
}
// check if the selected channel in config file match the file encoding
if (d_channel_selector_config == 2 and d_channel_selector != 0)
{
std::cout << "Labsat source channel config inconsistency: channel 2 is selected but the file has only one channel" << std::endl;
std::cout << "Labsat source channel config inconsistency: channel 2 is selected but the file has only one channel\n";
return -1;
}
// todo: Add support for dual channel files
if (d_channel_selector == 0)
{
std::cout << "ERROR: Labsat file contains more than one channel and it is not currently supported by Labsat signal source." << std::endl;
std::cout << "ERROR: Labsat file contains more than one channel and it is not currently supported by Labsat signal source.\n";
return -1;
}
byte_counter++;
@ -343,48 +343,48 @@ int labsat23_source::general_work(int noutput_items,
case 0:
break;
case 1:
std::cout << "1 bit per sample" << std::endl;
std::cout << "1 bit per sample\n";
break;
case 2:
std::cout << "2 bit per sample" << std::endl;
std::cout << "2 bit per sample\n";
break;
default:
std::cout << "Unknown quantization ID " << static_cast<int>(quantization) << std::endl;
std::cout << "Unknown quantization ID " << static_cast<int>(quantization) << '\n';
}
byte_counter++;
auto channel_a_constellation = static_cast<uint8_t>(memblock[byte_counter]);
switch (channel_a_constellation)
{
case 0:
std::cout << "Labsat Channel A is GPS" << std::endl;
std::cout << "Labsat Channel A is GPS\n";
break;
case 1:
std::cout << "Labsat Channel A is GLONASS" << std::endl;
std::cout << "Labsat Channel A is GLONASS\n";
break;
case 2:
std::cout << "Labsat Channel A is BDS" << std::endl;
std::cout << "Labsat Channel A is BDS\n";
break;
default:
std::cout << "Unknown channel A constellation ID " << static_cast<int>(channel_a_constellation) << std::endl;
std::cout << "Unknown channel A constellation ID " << static_cast<int>(channel_a_constellation) << '\n';
}
byte_counter++;
auto channel_b_constellation = static_cast<uint8_t>(memblock[byte_counter]);
switch (channel_b_constellation)
{
case 0:
std::cout << "Labsat Channel B is GPS" << std::endl;
std::cout << "Labsat Channel B is GPS\n";
break;
case 1:
std::cout << "Labsat Channel B is GLONASS" << std::endl;
std::cout << "Labsat Channel B is GLONASS\n";
break;
case 2:
std::cout << "Labsat Channel B is BDS" << std::endl;
std::cout << "Labsat Channel B is BDS\n";
break;
case 255:
// No channel B
break;
default:
std::cout << "Unknown channel B constellation ID " << static_cast<int>(channel_b_constellation) << std::endl;
std::cout << "Unknown channel B constellation ID " << static_cast<int>(channel_b_constellation) << '\n';
}
// end of header
@ -394,10 +394,10 @@ int labsat23_source::general_work(int noutput_items,
binary_input_file.seekg(header_bytes, binary_input_file.beg);
return 0;
}
std::cout << "Labsat file header error: section 2 is not available." << std::endl;
std::cout << "Labsat file header error: section 2 is not available.\n";
return -1;
}
std::cout << "Labsat file read error: file is empty." << std::endl;
std::cout << "Labsat file read error: file is empty.\n";
return -1;
}
@ -434,23 +434,23 @@ int labsat23_source::general_work(int noutput_items,
d_current_file_number++;
if (d_labsat_version == 3)
{
std::cout << "End of current file, reading the next Labsat file in sequence: " << generate_filename() << std::endl;
std::cout << "End of current file, reading the next Labsat file in sequence: " << generate_filename() << '\n';
}
binary_input_file.close();
binary_input_file.open(generate_filename().c_str(), std::ios::in | std::ios::binary);
if (binary_input_file.is_open())
{
std::cout << "Labsat file source is reading samples from " << generate_filename() << std::endl;
std::cout << "Labsat file source is reading samples from " << generate_filename() << '\n';
return 0;
}
if (d_labsat_version == 3)
{
std::cout << "Last file reached, LabSat source stop" << std::endl;
std::cout << "Last file reached, LabSat source stop\n";
}
else
{
std::cout << "End of file reached, LabSat source stop" << std::endl;
std::cout << "End of file reached, LabSat source stop\n";
}
d_queue->push(pmt::make_any(command_event_make(200, 0)));
@ -492,23 +492,23 @@ int labsat23_source::general_work(int noutput_items,
d_current_file_number++;
if (d_labsat_version == 3)
{
std::cout << "End of current file, reading the next Labsat file in sequence: " << generate_filename() << std::endl;
std::cout << "End of current file, reading the next Labsat file in sequence: " << generate_filename() << '\n';
}
binary_input_file.close();
binary_input_file.open(generate_filename().c_str(), std::ios::in | std::ios::binary);
if (binary_input_file.is_open())
{
std::cout << "Labsat file source is reading samples from " << generate_filename() << std::endl;
std::cout << "Labsat file source is reading samples from " << generate_filename() << '\n';
return 0;
}
if (d_labsat_version == 3)
{
std::cout << "Last file reached, LabSat source stop" << std::endl;
std::cout << "Last file reached, LabSat source stop\n";
}
else
{
std::cout << "End of file reached, LabSat source stop" << std::endl;
std::cout << "End of file reached, LabSat source stop\n";
}
d_queue->push(pmt::make_any(command_event_make(200, 0)));
return -1;
@ -523,6 +523,6 @@ int labsat23_source::general_work(int noutput_items,
return -1;
}
std::cout << "Warning!!" << std::endl;
std::cout << "Warning!!\n";
return 0;
}

View File

@ -73,7 +73,7 @@ rtl_tcp_signal_source_c::rtl_tcp_signal_source_c(const std::string &address,
ip::address addr = ip::address::from_string(address, ec);
if (ec)
{
std::cout << address << " is not an IP address" << std::endl;
std::cout << address << " is not an IP address\n";
LOG(ERROR) << address << " is not an IP address";
return;
}
@ -81,20 +81,20 @@ rtl_tcp_signal_source_c::rtl_tcp_signal_source_c(const std::string &address,
socket_.open(ep.protocol(), ec);
if (ec)
{
std::cout << "Failed to open socket." << std::endl;
std::cout << "Failed to open socket.\n";
LOG(ERROR) << "Failed to open socket.";
}
socket_.set_option(boost::asio::socket_base::reuse_address(true), ec);
if (ec)
{
std::cout << "Failed to set reuse address option: " << ec << std::endl;
std::cout << "Failed to set reuse address option: " << ec << '\n';
LOG(WARNING) << "Failed to set reuse address option";
}
socket_.set_option(boost::asio::socket_base::linger(true, 0), ec);
if (ec)
{
std::cout << "Failed to set linger option: " << ec << std::endl;
std::cout << "Failed to set linger option: " << ec << '\n';
LOG(WARNING) << "Failed to set linger option";
}
@ -104,19 +104,19 @@ rtl_tcp_signal_source_c::rtl_tcp_signal_source_c(const std::string &address,
if (ec)
{
std::cout << "Failed to connect to " << addr << ":" << port
<< "(" << ec << ")" << std::endl;
<< "(" << ec << ")\n";
LOG(ERROR) << "Failed to connect to " << addr << ":" << port
<< "(" << ec << ")";
return;
}
std::cout << "Connected to " << addr << ":" << port << std::endl;
std::cout << "Connected to " << addr << ":" << port << '\n';
LOG(INFO) << "Connected to " << addr << ":" << port;
// 4. Set nodelay
socket_.set_option(tcp::no_delay(true), ec);
if (ec)
{
std::cout << "Failed to set no delay option." << std::endl;
std::cout << "Failed to set no delay option.\n";
LOG(WARNING) << "Failed to set no delay option";
}
@ -124,12 +124,12 @@ rtl_tcp_signal_source_c::rtl_tcp_signal_source_c(const std::string &address,
ec = info_.read(socket_);
if (ec)
{
std::cout << "Failed to read dongle info." << std::endl;
std::cout << "Failed to read dongle info.\n";
LOG(WARNING) << "Failed to read dongle info";
}
else if (info_.is_valid())
{
std::cout << "Found " << info_.get_type_name() << " tuner." << std::endl;
std::cout << "Found " << info_.get_type_name() << " tuner.\n";
LOG(INFO) << "Found " << info_.get_type_name() << " tuner.";
}
@ -166,7 +166,7 @@ void rtl_tcp_signal_source_c::set_frequency(int frequency)
rtl_tcp_command(RTL_TCP_SET_FREQUENCY, frequency, socket_);
if (ec)
{
std::cout << "Failed to set frequency" << std::endl;
std::cout << "Failed to set frequency\n";
LOG(WARNING) << "Failed to set frequency";
}
}
@ -178,7 +178,7 @@ void rtl_tcp_signal_source_c::set_sample_rate(int sample_rate)
rtl_tcp_command(RTL_TCP_SET_SAMPLE_RATE, sample_rate, socket_);
if (ec)
{
std::cout << "Failed to set sample rate" << std::endl;
std::cout << "Failed to set sample rate\n";
LOG(WARNING) << "Failed to set sample rate";
}
}
@ -190,13 +190,13 @@ void rtl_tcp_signal_source_c::set_agc_mode(bool agc)
rtl_tcp_command(RTL_TCP_SET_GAIN_MODE, !agc, socket_);
if (ec)
{
std::cout << "Failed to set gain mode" << std::endl;
std::cout << "Failed to set gain mode\n";
LOG(WARNING) << "Failed to set gain mode";
}
ec = rtl_tcp_command(RTL_TCP_SET_AGC_MODE, agc, socket_);
if (ec)
{
std::cout << "Failed to set gain mode" << std::endl;
std::cout << "Failed to set gain mode\n";
LOG(WARNING) << "Failed to set gain mode";
}
}
@ -208,7 +208,7 @@ void rtl_tcp_signal_source_c::set_gain(int gain)
boost::system::error_code ec = rtl_tcp_command(RTL_TCP_SET_GAIN, clipped, socket_);
if (ec)
{
std::cout << "Failed to set gain" << std::endl;
std::cout << "Failed to set gain\n";
LOG(WARNING) << "Failed to set gain";
}
}
@ -275,7 +275,7 @@ void rtl_tcp_signal_source_c::set_if_gain(int gain)
boost::system::error_code ec = rtl_tcp_command(RTL_TCP_SET_IF_GAIN, param, socket_);
if (ec)
{
std::cout << "Failed to set if gain" << std::endl;
std::cout << "Failed to set if gain\n";
LOG(WARNING) << "Failed to set if gain";
}
}
@ -287,7 +287,7 @@ void rtl_tcp_signal_source_c::handle_read(const boost::system::error_code &ec,
{
if (ec)
{
std::cout << "Error during read: " << ec << std::endl;
std::cout << "Error during read: " << ec << '\n';
LOG(WARNING) << "Error during read: " << ec;
boost::mutex::scoped_lock lock(mutex_);
io_context_.stop();

View File

@ -146,7 +146,7 @@ bool cfg_ad9361_streaming_ch(struct iio_context *ctx, struct stream_cfg *cfg, en
// Configure phy and lo channels
// LOG(INFO)<<"* Acquiring AD9361 phy channel"<<chid;
std::cout << "* Acquiring AD9361 phy channel" << chid << std::endl;
std::cout << "* Acquiring AD9361 phy channel" << chid << '\n';
if (!get_phy_chan(ctx, type, chid, &chn))
{
return false;
@ -157,7 +157,7 @@ bool cfg_ad9361_streaming_ch(struct iio_context *ctx, struct stream_cfg *cfg, en
// Configure LO channel
// LOG(INFO)<<"* Acquiring AD9361 "<<type == TX ? "TX" : "RX";
std::cout << "* Acquiring AD9361 " << (type == TX ? "TX" : "RX") << std::endl;
std::cout << "* Acquiring AD9361 " << (type == TX ? "TX" : "RX") << '\n';
if (!get_lo_chan(ctx, type, &chn))
{
return false;
@ -198,7 +198,7 @@ bool config_ad9361_rx_local(uint64_t bandwidth_,
#ifndef LIBAD9361_VERSION_GREATER_THAN_01
if (filter_source_ == "Design")
{
std::cout << "Option filter_source=Design is not available in this version. Set to filter_source=Off" << std::endl;
std::cout << "Option filter_source=Design is not available in this version. Set to filter_source=Off\n";
filter_source_ = std::string("Off");
}
if (Fpass_ != 0.0 or Fstop_ != 0.0)
@ -291,7 +291,7 @@ bool config_ad9361_rx_local(uint64_t bandwidth_,
}
catch (const std::runtime_error &e)
{
std::cout << "Exception cached when configuring the RX FIR filter: " << e.what() << std::endl;
std::cout << "Exception cached when configuring the RX FIR filter: " << e.what() << '\n';
}
ret = iio_device_attr_write(ad9361_phy, "in_voltage0_rf_port_select", rf_port_select_.c_str());
if (ret)
@ -359,52 +359,52 @@ bool config_ad9361_rx_local(uint64_t bandwidth_,
ret = iio_device_attr_write(ad9361_phy, "trx_rate_governor", "nominal");
if (ret < 0)
{
std::cout << "Failed to set trx_rate_governor: " << ret << std::endl;
std::cout << "Failed to set trx_rate_governor: " << ret << '\n';
}
ret = iio_device_attr_write(ad9361_phy, "ensm_mode", "fdd");
if (ret < 0)
{
std::cout << "Failed to set ensm_mode: " << ret << std::endl;
std::cout << "Failed to set ensm_mode: " << ret << '\n';
}
ret = iio_device_attr_write(ad9361_phy, "calib_mode", "auto");
if (ret < 0)
{
std::cout << "Failed to set calib_mode: " << ret << std::endl;
std::cout << "Failed to set calib_mode: " << ret << '\n';
}
ret = iio_device_attr_write_bool(ad9361_phy, "in_voltage_quadrature_tracking_en", quadrature_);
if (ret < 0)
{
std::cout << "Failed to set in_voltage_quadrature_tracking_en: " << ret << std::endl;
std::cout << "Failed to set in_voltage_quadrature_tracking_en: " << ret << '\n';
}
ret = iio_device_attr_write_bool(ad9361_phy, "in_voltage_rf_dc_offset_tracking_en", rfdc_);
if (ret < 0)
{
std::cout << "Failed to set in_voltage_rf_dc_offset_tracking_en: " << ret << std::endl;
std::cout << "Failed to set in_voltage_rf_dc_offset_tracking_en: " << ret << '\n';
}
ret = iio_device_attr_write_bool(ad9361_phy, "in_voltage_bb_dc_offset_tracking_en", bbdc_);
if (ret < 0)
{
std::cout << "Failed to set in_voltage_bb_dc_offset_tracking_en: " << ret << std::endl;
std::cout << "Failed to set in_voltage_bb_dc_offset_tracking_en: " << ret << '\n';
}
ret = iio_device_attr_write(ad9361_phy, "in_voltage0_gain_control_mode", gain_mode_rx1_.c_str());
if (ret < 0)
{
std::cout << "Failed to set in_voltage0_gain_control_mode: " << ret << std::endl;
std::cout << "Failed to set in_voltage0_gain_control_mode: " << ret << '\n';
}
ret = iio_device_attr_write(ad9361_phy, "in_voltage1_gain_control_mode", gain_mode_rx2_.c_str());
if (ret < 0)
{
std::cout << "Failed to set in_voltage1_gain_control_mode: " << ret << std::endl;
std::cout << "Failed to set in_voltage1_gain_control_mode: " << ret << '\n';
}
ret = iio_device_attr_write_double(ad9361_phy, "in_voltage0_hardwaregain", rf_gain_rx1_);
if (ret < 0)
{
std::cout << "Failed to set in_voltage0_hardwaregain: " << ret << std::endl;
std::cout << "Failed to set in_voltage0_hardwaregain: " << ret << '\n';
}
ret = iio_device_attr_write_double(ad9361_phy, "in_voltage1_hardwaregain", rf_gain_rx2_);
if (ret < 0)
{
std::cout << "Failed to set in_voltage1_hardwaregain: " << ret << std::endl;
std::cout << "Failed to set in_voltage1_hardwaregain: " << ret << '\n';
}
std::cout << "End of AD9361 RX configuration.\n";
@ -433,7 +433,7 @@ bool config_ad9361_rx_remote(const std::string &remote_host,
float Fstop_)
{
// RX stream config
std::cout << "AD9361 Acquiring IIO REMOTE context in host " << remote_host << std::endl;
std::cout << "AD9361 Acquiring IIO REMOTE context in host " << remote_host << '\n';
struct iio_context *ctx;
// Streaming devices
struct iio_device *rx;
@ -443,7 +443,7 @@ bool config_ad9361_rx_remote(const std::string &remote_host,
#ifndef LIBAD9361_VERSION_GREATER_THAN_01
if (filter_source_ == "Design")
{
std::cout << "Option filter_source=Design is not available in this version. Set to filter_source=Off" << std::endl;
std::cout << "Option filter_source=Design is not available in this version. Set to filter_source=Off\n";
filter_source_ = std::string("Off");
}
if (Fpass_ != 0.0 or Fstop_ != 0.0)
@ -540,7 +540,7 @@ bool config_ad9361_rx_remote(const std::string &remote_host,
}
catch (const std::runtime_error &e)
{
std::cout << "Exception cached when configuring the RX FIR filter: " << e.what() << std::endl;
std::cout << "Exception cached when configuring the RX FIR filter: " << e.what() << '\n';
}
ret = iio_device_attr_write(ad9361_phy, "in_voltage0_rf_port_select", rf_port_select_.c_str());
if (ret)
@ -608,49 +608,49 @@ bool config_ad9361_rx_remote(const std::string &remote_host,
ret = iio_device_attr_write(ad9361_phy, "trx_rate_governor", "nominal");
if (ret < 0)
{
std::cout << "Failed to set trx_rate_governor: " << ret << std::endl;
std::cout << "Failed to set trx_rate_governor: " << ret << '\n';
}
ret = iio_device_attr_write(ad9361_phy, "ensm_mode", "fdd");
if (ret < 0)
{
std::cout << "Failed to set ensm_mode: " << ret << std::endl;
std::cout << "Failed to set ensm_mode: " << ret << '\n';
}
ret = iio_device_attr_write(ad9361_phy, "calib_mode", "auto");
if (ret < 0)
{
std::cout << "Failed to set calib_mode: " << ret << std::endl;
std::cout << "Failed to set calib_mode: " << ret << '\n';
}
ret = iio_device_attr_write_bool(ad9361_phy, "in_voltage_quadrature_tracking_en", quadrature_);
if (ret < 0)
{
std::cout << "Failed to set in_voltage_quadrature_tracking_en: " << ret << std::endl;
std::cout << "Failed to set in_voltage_quadrature_tracking_en: " << ret << '\n';
}
ret = iio_device_attr_write_bool(ad9361_phy, "in_voltage_rf_dc_offset_tracking_en", rfdc_);
if (ret < 0)
{
std::cout << "Failed to set in_voltage_rf_dc_offset_tracking_en: " << ret << std::endl;
std::cout << "Failed to set in_voltage_rf_dc_offset_tracking_en: " << ret << '\n';
}
ret = iio_device_attr_write_bool(ad9361_phy, "in_voltage_bb_dc_offset_tracking_en", bbdc_);
if (ret < 0)
{
std::cout << "Failed to set in_voltage_bb_dc_offset_tracking_en: " << ret << std::endl;
std::cout << "Failed to set in_voltage_bb_dc_offset_tracking_en: " << ret << '\n';
}
ret = iio_device_attr_write(ad9361_phy, "in_voltage0_gain_control_mode", gain_mode_rx1_.c_str());
if (ret < 0)
{
std::cout << "Failed to set in_voltage0_gain_control_mode: " << ret << std::endl;
std::cout << "Failed to set in_voltage0_gain_control_mode: " << ret << '\n';
}
ret = iio_device_attr_write(ad9361_phy, "in_voltage1_gain_control_mode", gain_mode_rx2_.c_str());
if (ret < 0)
{
std::cout << "Failed to set in_voltage1_gain_control_mode: " << ret << std::endl;
std::cout << "Failed to set in_voltage1_gain_control_mode: " << ret << '\n';
}
if (gain_mode_rx1_ == "manual")
{
ret = iio_device_attr_write_double(ad9361_phy, "in_voltage0_hardwaregain", rf_gain_rx1_);
if (ret < 0)
{
std::cout << "Failed to set in_voltage0_hardwaregain: " << ret << std::endl;
std::cout << "Failed to set in_voltage0_hardwaregain: " << ret << '\n';
}
}
if (gain_mode_rx2_ == "manual")
@ -658,7 +658,7 @@ bool config_ad9361_rx_remote(const std::string &remote_host,
ret = iio_device_attr_write_double(ad9361_phy, "in_voltage1_hardwaregain", rf_gain_rx2_);
if (ret < 0)
{
std::cout << "Failed to set in_voltage1_hardwaregain: " << ret << std::endl;
std::cout << "Failed to set in_voltage1_hardwaregain: " << ret << '\n';
}
}
@ -720,13 +720,13 @@ bool config_ad9361_lo_local(uint64_t bandwidth_,
ret = iio_device_attr_write_double(ad9361_phy, "out_voltage0_hardwaregain", -std::abs(tx_attenuation_db_));
if (ret < 0)
{
std::cout << "Failed to set out_voltage0_hardwaregain value " << -std::abs(tx_attenuation_db_) << ". Error " << ret << std::endl;
std::cout << "Failed to set out_voltage0_hardwaregain value " << -std::abs(tx_attenuation_db_) << ". Error " << ret << '\n';
}
// shut down signal in TX2
ret = iio_device_attr_write_double(ad9361_phy, "out_voltage1_hardwaregain", -89.75);
if (ret < 0)
{
std::cout << "Failed to set out_voltage1_hardwaregain value -89.75 dB. Error " << ret << std::endl;
std::cout << "Failed to set out_voltage1_hardwaregain value -89.75 dB. Error " << ret << '\n';
}
struct iio_device *dds;
@ -740,51 +740,51 @@ bool config_ad9361_lo_local(uint64_t bandwidth_,
ret = iio_channel_attr_write_bool(dds_channel0_I, "raw", true);
if (ret < 0)
{
std::cout << "Failed to toggle DDS: " << ret << std::endl;
std::cout << "Failed to toggle DDS: " << ret << '\n';
}
// set frequency, scale and phase
ret = iio_channel_attr_write_longlong(dds_channel0_I, "frequency", static_cast<int64_t>(freq_dds_tx_hz_));
if (ret < 0)
{
std::cout << "Failed to set TX DDS frequency I: " << ret << std::endl;
std::cout << "Failed to set TX DDS frequency I: " << ret << '\n';
}
ret = iio_channel_attr_write_longlong(dds_channel0_Q, "frequency", static_cast<int64_t>(freq_dds_tx_hz_));
if (ret < 0)
{
std::cout << "Failed to set TX DDS frequency Q: " << ret << std::endl;
std::cout << "Failed to set TX DDS frequency Q: " << ret << '\n';
}
ret = iio_channel_attr_write_double(dds_channel0_I, "phase", phase_dds_deg_ * 1000.0);
if (ret < 0)
{
std::cout << "Failed to set TX DDS phase I: " << ret << std::endl;
std::cout << "Failed to set TX DDS phase I: " << ret << '\n';
}
ret = iio_channel_attr_write_double(dds_channel0_Q, "phase", phase_dds_deg_ * 1000.0 + 270000.0);
if (ret < 0)
{
std::cout << "Failed to set TX DDS phase Q: " << ret << std::endl;
std::cout << "Failed to set TX DDS phase Q: " << ret << '\n';
}
ret = iio_channel_attr_write_double(dds_channel0_I, "scale", pow(10, scale_dds_dbfs_ / 20.0));
if (ret < 0)
{
std::cout << "Failed to set TX DDS scale I: " << ret << std::endl;
std::cout << "Failed to set TX DDS scale I: " << ret << '\n';
}
ret = iio_channel_attr_write_double(dds_channel0_Q, "scale", pow(10, scale_dds_dbfs_ / 20.0));
if (ret < 0)
{
std::cout << "Failed to set TX DDS scale Q: " << ret << std::endl;
std::cout << "Failed to set TX DDS scale Q: " << ret << '\n';
}
// disable TX2
ret = iio_device_attr_write_double(ad9361_phy, "out_voltage1_hardwaregain", -89.0);
if (ret < 0)
{
std::cout << "Failed to set out_voltage1_hardwaregain value " << -89.0 << " error " << ret << std::endl;
std::cout << "Failed to set out_voltage1_hardwaregain value " << -89.0 << " error " << ret << '\n';
}
struct iio_channel *dds_channel1_I;
@ -796,13 +796,13 @@ bool config_ad9361_lo_local(uint64_t bandwidth_,
ret = iio_channel_attr_write_double(dds_channel1_I, "scale", 0);
if (ret < 0)
{
std::cout << "Failed to set TX2 DDS scale I: " << ret << std::endl;
std::cout << "Failed to set TX2 DDS scale I: " << ret << '\n';
}
ret = iio_channel_attr_write_double(dds_channel1_Q, "scale", 0);
if (ret < 0)
{
std::cout << "Failed to set TX2 DDS scale Q: " << ret << std::endl;
std::cout << "Failed to set TX2 DDS scale Q: " << ret << '\n';
}
iio_context_destroy(ctx);
@ -827,7 +827,7 @@ bool config_ad9361_lo_remote(const std::string &remote_host,
txcfg.lo_hz = freq_rf_tx_hz_;
txcfg.rfport = "A";
std::cout << "AD9361 Acquiring IIO REMOTE context in host " << remote_host << std::endl;
std::cout << "AD9361 Acquiring IIO REMOTE context in host " << remote_host << '\n';
struct iio_context *ctx;
ctx = iio_create_network_context(remote_host.c_str());
if (!ctx)
@ -862,14 +862,14 @@ bool config_ad9361_lo_remote(const std::string &remote_host,
ret = iio_device_attr_write_double(ad9361_phy, "out_voltage0_hardwaregain", -std::abs(tx_attenuation_db_));
if (ret < 0)
{
std::cout << "Failed to set out_voltage0_hardwaregain value " << -std::abs(tx_attenuation_db_) << ". Error " << ret << std::endl;
std::cout << "Failed to set out_voltage0_hardwaregain value " << -std::abs(tx_attenuation_db_) << ". Error " << ret << '\n';
}
// shut down signal in TX2
ret = iio_device_attr_write_double(ad9361_phy, "out_voltage1_hardwaregain", -89.75);
if (ret < 0)
{
std::cout << "Failed to set out_voltage1_hardwaregain value -89.75 dB. Error " << ret << std::endl;
std::cout << "Failed to set out_voltage1_hardwaregain value -89.75 dB. Error " << ret << '\n';
}
struct iio_device *dds;
dds = iio_context_find_device(ctx, "cf-ad9361-dds-core-lpc");
@ -882,51 +882,51 @@ bool config_ad9361_lo_remote(const std::string &remote_host,
ret = iio_channel_attr_write_bool(dds_channel0_I, "raw", true);
if (ret < 0)
{
std::cout << "Failed to toggle DDS: " << ret << std::endl;
std::cout << "Failed to toggle DDS: " << ret << '\n';
}
// set frequency, scale and phase
ret = iio_channel_attr_write_longlong(dds_channel0_I, "frequency", static_cast<int64_t>(freq_dds_tx_hz_));
if (ret < 0)
{
std::cout << "Failed to set TX DDS frequency I: " << ret << std::endl;
std::cout << "Failed to set TX DDS frequency I: " << ret << '\n';
}
ret = iio_channel_attr_write_longlong(dds_channel0_Q, "frequency", static_cast<int64_t>(freq_dds_tx_hz_));
if (ret < 0)
{
std::cout << "Failed to set TX DDS frequency Q: " << ret << std::endl;
std::cout << "Failed to set TX DDS frequency Q: " << ret << '\n';
}
ret = iio_channel_attr_write_double(dds_channel0_I, "phase", phase_dds_deg_ * 1000.0);
if (ret < 0)
{
std::cout << "Failed to set TX DDS phase I: " << ret << std::endl;
std::cout << "Failed to set TX DDS phase I: " << ret << '\n';
}
ret = iio_channel_attr_write_double(dds_channel0_Q, "phase", phase_dds_deg_ * 1000.0 + 270000.0);
if (ret < 0)
{
std::cout << "Failed to set TX DDS phase Q: " << ret << std::endl;
std::cout << "Failed to set TX DDS phase Q: " << ret << '\n';
}
ret = iio_channel_attr_write_double(dds_channel0_I, "scale", pow(10, scale_dds_dbfs_ / 20.0));
if (ret < 0)
{
std::cout << "Failed to set TX DDS scale I: " << ret << std::endl;
std::cout << "Failed to set TX DDS scale I: " << ret << '\n';
}
ret = iio_channel_attr_write_double(dds_channel0_Q, "scale", pow(10, scale_dds_dbfs_ / 20.0));
if (ret < 0)
{
std::cout << "Failed to set TX DDS scale Q: " << ret << std::endl;
std::cout << "Failed to set TX DDS scale Q: " << ret << '\n';
}
// disable TX2
ret = iio_device_attr_write_double(ad9361_phy, "out_voltage1_hardwaregain", -89.0);
if (ret < 0)
{
std::cout << "Failed to set out_voltage1_hardwaregain value " << -89.0 << " error " << ret << std::endl;
std::cout << "Failed to set out_voltage1_hardwaregain value " << -89.0 << " error " << ret << '\n';
}
struct iio_channel *dds_channel1_I;
@ -938,13 +938,13 @@ bool config_ad9361_lo_remote(const std::string &remote_host,
ret = iio_channel_attr_write_double(dds_channel1_I, "scale", 0);
if (ret < 0)
{
std::cout << "Failed to set TX2 DDS scale I: " << ret << std::endl;
std::cout << "Failed to set TX2 DDS scale I: " << ret << '\n';
}
ret = iio_channel_attr_write_double(dds_channel1_Q, "scale", 0);
if (ret < 0)
{
std::cout << "Failed to set TX2 DDS scale Q: " << ret << std::endl;
std::cout << "Failed to set TX2 DDS scale Q: " << ret << '\n';
}
iio_context_destroy(ctx);
@ -954,7 +954,7 @@ bool config_ad9361_lo_remote(const std::string &remote_host,
bool ad9361_disable_lo_remote(const std::string &remote_host)
{
std::cout << "AD9361 Acquiring IIO REMOTE context in host " << remote_host << std::endl;
std::cout << "AD9361 Acquiring IIO REMOTE context in host " << remote_host << '\n';
struct iio_context *ctx;
ctx = iio_create_network_context(remote_host.c_str());
if (!ctx)
@ -973,19 +973,19 @@ bool ad9361_disable_lo_remote(const std::string &remote_host)
ret = iio_channel_attr_write_bool(dds_channel0_I, "raw", false);
if (ret < 0)
{
std::cout << "Failed to toggle DDS: " << ret << std::endl;
std::cout << "Failed to toggle DDS: " << ret << '\n';
}
ret = iio_channel_attr_write_double(dds_channel0_I, "scale", 0.0);
if (ret < 0)
{
std::cout << "Failed to set TX DDS scale I: " << ret << std::endl;
std::cout << "Failed to set TX DDS scale I: " << ret << '\n';
}
ret = iio_channel_attr_write_double(dds_channel0_Q, "scale", 0.0);
if (ret < 0)
{
std::cout << "Failed to set TX DDS scale Q: " << ret << std::endl;
std::cout << "Failed to set TX DDS scale Q: " << ret << '\n';
}
iio_context_destroy(ctx);
@ -996,7 +996,7 @@ bool ad9361_disable_lo_remote(const std::string &remote_host)
bool ad9361_disable_lo_local()
{
std::cout << "AD9361 Acquiring IIO LOCAL context" << std::endl;
std::cout << "AD9361 Acquiring IIO LOCAL context\n";
struct iio_context *ctx;
ctx = iio_create_default_context();
if (!ctx)
@ -1015,19 +1015,19 @@ bool ad9361_disable_lo_local()
ret = iio_channel_attr_write_bool(dds_channel0_I, "raw", false);
if (ret < 0)
{
std::cout << "Failed to toggle DDS: " << ret << std::endl;
std::cout << "Failed to toggle DDS: " << ret << '\n';
}
ret = iio_channel_attr_write_double(dds_channel0_I, "scale", 0.0);
if (ret < 0)
{
std::cout << "Failed to set TX DDS scale I: " << ret << std::endl;
std::cout << "Failed to set TX DDS scale I: " << ret << '\n';
}
ret = iio_channel_attr_write_double(dds_channel0_Q, "scale", 0.0);
if (ret < 0)
{
std::cout << "Failed to set TX DDS scale Q: " << ret << std::endl;
std::cout << "Failed to set TX DDS scale Q: " << ret << '\n';
}
iio_context_destroy(ctx);

View File

@ -26,7 +26,7 @@
#include "fpga_switch.h"
#include <glog/logging.h>
#include <fcntl.h> // for open, O_RDWR, O_SYNC
#include <iostream> // for cout, endl
#include <iostream> // for cout
#include <sys/mman.h> // for mmap
Fpga_Switch::Fpga_Switch(const std::string &device_name)
@ -41,11 +41,11 @@ Fpga_Switch::Fpga_Switch(const std::string &device_name)
if (d_map_base == reinterpret_cast<void *>(-1))
{
LOG(WARNING) << "Cannot map the FPGA switch module into tracking memory";
std::cout << "Could not map switch memory." << std::endl;
std::cout << "Could not map switch memory.\n";
}
else
{
std::cout << "Switch memory successfully mapped." << std::endl;
std::cout << "Switch memory successfully mapped.\n";
}
// sanity check : check test register
@ -95,7 +95,7 @@ void Fpga_Switch::close_device()
auto *aux = const_cast<unsigned *>(d_map_base);
if (munmap(static_cast<void *>(aux), FPGA_PAGE_SIZE) == -1)
{
std::cout << "Failed to unmap memory uio" << std::endl;
std::cout << "Failed to unmap memory uio\n";
}
close(d_device_descriptor);

View File

@ -244,7 +244,7 @@ void beidou_b1i_telemetry_decoder_gs::decode_subframe(float *frame_symbols)
std::shared_ptr<Beidou_Dnav_Ephemeris> tmp_obj = std::make_shared<Beidou_Dnav_Ephemeris>(d_nav.get_ephemeris());
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
LOG(INFO) << "BEIDOU DNAV Ephemeris have been received in channel" << d_channel << " from satellite " << d_satellite;
std::cout << TEXT_YELLOW << "New BEIDOU B1I DNAV message received in channel " << d_channel << ": ephemeris from satellite " << d_satellite << TEXT_RESET << std::endl;
std::cout << TEXT_YELLOW << "New BEIDOU B1I DNAV message received in channel " << d_channel << ": ephemeris from satellite " << d_satellite << TEXT_RESET << '\n';
}
if (d_nav.have_new_utc_model() == true)
{
@ -252,7 +252,7 @@ void beidou_b1i_telemetry_decoder_gs::decode_subframe(float *frame_symbols)
std::shared_ptr<Beidou_Dnav_Utc_Model> tmp_obj = std::make_shared<Beidou_Dnav_Utc_Model>(d_nav.get_utc_model());
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
LOG(INFO) << "BEIDOU DNAV UTC Model have been received in channel" << d_channel << " from satellite " << d_satellite;
std::cout << TEXT_YELLOW << "New BEIDOU B1I DNAV utc model message received in channel " << d_channel << ": UTC model parameters from satellite " << d_satellite << TEXT_RESET << std::endl;
std::cout << TEXT_YELLOW << "New BEIDOU B1I DNAV utc model message received in channel " << d_channel << ": UTC model parameters from satellite " << d_satellite << TEXT_RESET << '\n';
}
if (d_nav.have_new_iono() == true)
{
@ -260,15 +260,15 @@ void beidou_b1i_telemetry_decoder_gs::decode_subframe(float *frame_symbols)
std::shared_ptr<Beidou_Dnav_Iono> tmp_obj = std::make_shared<Beidou_Dnav_Iono>(d_nav.get_iono());
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
LOG(INFO) << "BEIDOU DNAV Iono have been received in channel" << d_channel << " from satellite " << d_satellite;
std::cout << TEXT_YELLOW << "New BEIDOU B1I DNAV Iono message received in channel " << d_channel << ": Iono model parameters from satellite " << d_satellite << TEXT_RESET << std::endl;
std::cout << TEXT_YELLOW << "New BEIDOU B1I DNAV Iono message received in channel " << d_channel << ": Iono model parameters from satellite " << d_satellite << TEXT_RESET << '\n';
}
if (d_nav.have_new_almanac() == true)
{
// uint32_t slot_nbr = d_nav.i_alm_satellite_PRN;
// std::shared_ptr<Beidou_Dnav_Almanac> tmp_obj = std::make_shared<Beidou_Dnav_Almanac>(d_nav.get_almanac(slot_nbr));
// this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
LOG(INFO) << "BEIDOU DNAV Almanac have been received in channel" << d_channel << " from satellite " << d_satellite << std::endl;
std::cout << TEXT_YELLOW << "New BEIDOU B1I DNAV almanac received in channel " << d_channel << " from satellite " << d_satellite << TEXT_RESET << std::endl;
LOG(INFO) << "BEIDOU DNAV Almanac have been received in channel" << d_channel << " from satellite " << d_satellite << '\n';
std::cout << TEXT_YELLOW << "New BEIDOU B1I DNAV almanac received in channel " << d_channel << " from satellite " << d_satellite << TEXT_RESET << '\n';
}
}

View File

@ -248,7 +248,7 @@ void beidou_b3i_telemetry_decoder_gs::decode_subframe(float *frame_symbols)
LOG(INFO) << "BEIDOU DNAV Ephemeris have been received in channel"
<< d_channel << " from satellite " << d_satellite;
std::cout << TEXT_YELLOW << "New BEIDOU B3I DNAV message received in channel " << d_channel
<< ": ephemeris from satellite " << d_satellite << TEXT_RESET << std::endl;
<< ": ephemeris from satellite " << d_satellite << TEXT_RESET << '\n';
}
if (d_nav.have_new_utc_model() == true)
{
@ -260,7 +260,7 @@ void beidou_b3i_telemetry_decoder_gs::decode_subframe(float *frame_symbols)
<< d_channel << " from satellite " << d_satellite;
std::cout << TEXT_YELLOW << "New BEIDOU B3I DNAV utc model message received in channel "
<< d_channel << ": UTC model parameters from satellite "
<< d_satellite << TEXT_RESET << std::endl;
<< d_satellite << TEXT_RESET << '\n';
}
if (d_nav.have_new_iono() == true)
{
@ -272,7 +272,7 @@ void beidou_b3i_telemetry_decoder_gs::decode_subframe(float *frame_symbols)
<< " from satellite " << d_satellite;
std::cout << TEXT_YELLOW << "New BEIDOU B3I DNAV Iono message received in channel "
<< d_channel << ": Iono model parameters from satellite "
<< d_satellite << TEXT_RESET << std::endl;
<< d_satellite << TEXT_RESET << '\n';
}
if (d_nav.have_new_almanac() == true)
{
@ -282,9 +282,9 @@ void beidou_b3i_telemetry_decoder_gs::decode_subframe(float *frame_symbols)
// this->message_port_pub(pmt::mp("telemetry"),
// pmt::make_any(tmp_obj));
LOG(INFO) << "BEIDOU DNAV Almanac have been received in channel"
<< d_channel << " from satellite " << d_satellite << std::endl;
<< d_channel << " from satellite " << d_satellite << '\n';
std::cout << TEXT_YELLOW << "New BEIDOU B3I DNAV almanac received in channel " << d_channel
<< " from satellite " << d_satellite << TEXT_RESET << std::endl;
<< " from satellite " << d_satellite << TEXT_RESET << '\n';
}
}

View File

@ -114,7 +114,7 @@ galileo_telemetry_decoder_gs::galileo_telemetry_decoder_gs(
d_codelength = 0;
d_datalength = 0;
d_max_symbols_without_valid_frame = 0;
std::cout << "Galileo unified telemetry decoder error: Unknown frame type " << std::endl;
std::cout << "Galileo unified telemetry decoder error: Unknown frame type \n";
}
d_page_part_symbols.reserve(d_frame_length_symbols);
@ -275,21 +275,21 @@ void galileo_telemetry_decoder_gs::decode_INAV_word(float *page_part_symbols, in
{
// get object for this SV (mandatory)
std::shared_ptr<Galileo_Ephemeris> tmp_obj = std::make_shared<Galileo_Ephemeris>(d_inav_nav.get_ephemeris());
std::cout << "New Galileo E1 I/NAV message received in channel " << d_channel << ": ephemeris from satellite " << d_satellite << std::endl;
std::cout << "New Galileo E1 I/NAV message received in channel " << d_channel << ": ephemeris from satellite " << d_satellite << '\n';
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
}
if (d_inav_nav.have_new_iono_and_GST() == true)
{
// get object for this SV (mandatory)
std::shared_ptr<Galileo_Iono> tmp_obj = std::make_shared<Galileo_Iono>(d_inav_nav.get_iono());
std::cout << "New Galileo E1 I/NAV message received in channel " << d_channel << ": iono/GST model parameters from satellite " << d_satellite << std::endl;
std::cout << "New Galileo E1 I/NAV message received in channel " << d_channel << ": iono/GST model parameters from satellite " << d_satellite << '\n';
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
}
if (d_inav_nav.have_new_utc_model() == true)
{
// get object for this SV (mandatory)
std::shared_ptr<Galileo_Utc_Model> tmp_obj = std::make_shared<Galileo_Utc_Model>(d_inav_nav.get_utc_model());
std::cout << "New Galileo E1 I/NAV message received in channel " << d_channel << ": UTC model parameters from satellite " << d_satellite << std::endl;
std::cout << "New Galileo E1 I/NAV message received in channel " << d_channel << ": UTC model parameters from satellite " << d_satellite << '\n';
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
d_delta_t = tmp_obj->A_0G_10 + tmp_obj->A_1G_10 * (static_cast<double>(d_TOW_at_current_symbol_ms) / 1000.0 - tmp_obj->t_0G_10 + 604800 * (std::fmod(static_cast<float>(d_inav_nav.get_Galileo_week() - tmp_obj->WN_0G_10), 64.0)));
DLOG(INFO) << "delta_t=" << d_delta_t << "[s]";
@ -299,7 +299,7 @@ void galileo_telemetry_decoder_gs::decode_INAV_word(float *page_part_symbols, in
std::shared_ptr<Galileo_Almanac_Helper> tmp_obj = std::make_shared<Galileo_Almanac_Helper>(d_inav_nav.get_almanac());
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
// debug
std::cout << "Galileo E1 I/NAV almanac received in channel " << d_channel << " from satellite " << d_satellite << std::endl;
std::cout << "Galileo E1 I/NAV almanac received in channel " << d_channel << " from satellite " << d_satellite << '\n';
DLOG(INFO) << "Current parameters:";
DLOG(INFO) << "d_TOW_at_current_symbol_ms=" << d_TOW_at_current_symbol_ms;
DLOG(INFO) << "d_nav.WN_0=" << d_inav_nav.get_Galileo_week();
@ -355,19 +355,19 @@ void galileo_telemetry_decoder_gs::decode_FNAV_word(float *page_symbols, int32_t
if (d_fnav_nav.have_new_ephemeris() == true)
{
std::shared_ptr<Galileo_Ephemeris> tmp_obj = std::make_shared<Galileo_Ephemeris>(d_fnav_nav.get_ephemeris());
std::cout << TEXT_MAGENTA << "New Galileo E5a F/NAV message received in channel " << d_channel << ": ephemeris from satellite " << d_satellite << TEXT_RESET << std::endl;
std::cout << TEXT_MAGENTA << "New Galileo E5a F/NAV message received in channel " << d_channel << ": ephemeris from satellite " << d_satellite << TEXT_RESET << '\n';
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
}
if (d_fnav_nav.have_new_iono_and_GST() == true)
{
std::shared_ptr<Galileo_Iono> tmp_obj = std::make_shared<Galileo_Iono>(d_fnav_nav.get_iono());
std::cout << TEXT_MAGENTA << "New Galileo E5a F/NAV message received in channel " << d_channel << ": iono/GST model parameters from satellite " << d_satellite << TEXT_RESET << std::endl;
std::cout << TEXT_MAGENTA << "New Galileo E5a F/NAV message received in channel " << d_channel << ": iono/GST model parameters from satellite " << d_satellite << TEXT_RESET << '\n';
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
}
if (d_fnav_nav.have_new_utc_model() == true)
{
std::shared_ptr<Galileo_Utc_Model> tmp_obj = std::make_shared<Galileo_Utc_Model>(d_fnav_nav.get_utc_model());
std::cout << TEXT_MAGENTA << "New Galileo E5a F/NAV message received in channel " << d_channel << ": UTC model parameters from satellite " << d_satellite << TEXT_RESET << std::endl;
std::cout << TEXT_MAGENTA << "New Galileo E5a F/NAV message received in channel " << d_channel << ": UTC model parameters from satellite " << d_satellite << TEXT_RESET << '\n';
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
}
}

View File

@ -182,7 +182,7 @@ void glonass_l1_ca_telemetry_decoder_gs::decode_string(const double *frame_symbo
std::shared_ptr<Glonass_Gnav_Ephemeris> tmp_obj = std::make_shared<Glonass_Gnav_Ephemeris>(d_nav.get_ephemeris());
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
LOG(INFO) << "GLONASS GNAV Ephemeris have been received in channel" << d_channel << " from satellite " << d_satellite;
std::cout << "New GLONASS L1 GNAV message received in channel " << d_channel << ": ephemeris from satellite " << d_satellite << std::endl;
std::cout << "New GLONASS L1 GNAV message received in channel " << d_channel << ": ephemeris from satellite " << d_satellite << '\n';
}
if (d_nav.have_new_utc_model() == true)
{
@ -190,7 +190,7 @@ void glonass_l1_ca_telemetry_decoder_gs::decode_string(const double *frame_symbo
std::shared_ptr<Glonass_Gnav_Utc_Model> tmp_obj = std::make_shared<Glonass_Gnav_Utc_Model>(d_nav.get_utc_model());
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
LOG(INFO) << "GLONASS GNAV UTC Model have been received in channel" << d_channel << " from satellite " << d_satellite;
std::cout << "New GLONASS L1 GNAV message received in channel " << d_channel << ": UTC model parameters from satellite " << d_satellite << std::endl;
std::cout << "New GLONASS L1 GNAV message received in channel " << d_channel << ": UTC model parameters from satellite " << d_satellite << '\n';
}
if (d_nav.have_new_almanac() == true)
{
@ -199,7 +199,7 @@ void glonass_l1_ca_telemetry_decoder_gs::decode_string(const double *frame_symbo
tmp_obj = std::make_shared<Glonass_Gnav_Almanac>(d_nav.get_almanac(slot_nbr));
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
LOG(INFO) << "GLONASS GNAV Almanac have been received in channel" << d_channel << " in slot number " << slot_nbr;
std::cout << "New GLONASS L1 GNAV almanac received in channel " << d_channel << " from satellite " << d_satellite << std::endl;
std::cout << "New GLONASS L1 GNAV almanac received in channel " << d_channel << " from satellite " << d_satellite << '\n';
}
// 5. Update satellite information on system
if (d_nav.get_flag_update_slot_number() == true)

View File

@ -182,7 +182,7 @@ void glonass_l2_ca_telemetry_decoder_gs::decode_string(const double *frame_symbo
std::shared_ptr<Glonass_Gnav_Ephemeris> tmp_obj = std::make_shared<Glonass_Gnav_Ephemeris>(d_nav.get_ephemeris());
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
LOG(INFO) << "GLONASS GNAV Ephemeris have been received in channel" << d_channel << " from satellite " << d_satellite;
std::cout << TEXT_CYAN << "New GLONASS L2 GNAV message received in channel " << d_channel << ": ephemeris from satellite " << d_satellite << TEXT_RESET << std::endl;
std::cout << TEXT_CYAN << "New GLONASS L2 GNAV message received in channel " << d_channel << ": ephemeris from satellite " << d_satellite << TEXT_RESET << '\n';
}
if (d_nav.have_new_utc_model() == true)
{
@ -190,7 +190,7 @@ void glonass_l2_ca_telemetry_decoder_gs::decode_string(const double *frame_symbo
std::shared_ptr<Glonass_Gnav_Utc_Model> tmp_obj = std::make_shared<Glonass_Gnav_Utc_Model>(d_nav.get_utc_model());
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
LOG(INFO) << "GLONASS GNAV UTC Model have been received in channel" << d_channel << " from satellite " << d_satellite;
std::cout << TEXT_CYAN << "New GLONASS L2 GNAV message received in channel " << d_channel << ": UTC model parameters from satellite " << d_satellite << TEXT_RESET << std::endl;
std::cout << TEXT_CYAN << "New GLONASS L2 GNAV message received in channel " << d_channel << ": UTC model parameters from satellite " << d_satellite << TEXT_RESET << '\n';
}
if (d_nav.have_new_almanac() == true)
{
@ -198,7 +198,7 @@ void glonass_l2_ca_telemetry_decoder_gs::decode_string(const double *frame_symbo
std::shared_ptr<Glonass_Gnav_Almanac> tmp_obj = std::make_shared<Glonass_Gnav_Almanac>(d_nav.get_almanac(slot_nbr));
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
LOG(INFO) << "GLONASS GNAV Almanac have been received in channel" << d_channel << " in slot number " << slot_nbr;
std::cout << TEXT_CYAN << "New GLONASS L2 GNAV almanac received in channel " << d_channel << " from satellite " << d_satellite << TEXT_RESET << std::endl;
std::cout << TEXT_CYAN << "New GLONASS L2 GNAV almanac received in channel " << d_channel << " from satellite " << d_satellite << TEXT_RESET << '\n';
}
// 5. Update satellite information on system
if (d_nav.get_flag_update_slot_number() == true)

View File

@ -275,7 +275,7 @@ bool gps_l1_ca_telemetry_decoder_gs::decode_subframe()
std::cout << "New GPS NAV message received in channel " << this->d_channel << ": "
<< "subframe "
<< subframe_ID << " from satellite "
<< Gnss_Satellite(std::string("GPS"), d_nav.get_satellite_PRN()) << std::endl;
<< Gnss_Satellite(std::string("GPS"), d_nav.get_satellite_PRN()) << '\n';
switch (subframe_ID)
{

View File

@ -199,20 +199,20 @@ int gps_l2c_telemetry_decoder_gs::general_work(int noutput_items __attribute__((
{
// get ephemeris object for this SV
std::shared_ptr<Gps_CNAV_Ephemeris> tmp_obj = std::make_shared<Gps_CNAV_Ephemeris>(d_CNAV_Message.get_ephemeris());
std::cout << TEXT_BLUE << "New GPS CNAV message received in channel " << d_channel << ": ephemeris from satellite " << d_satellite << TEXT_RESET << std::endl;
std::cout << TEXT_BLUE << "New GPS CNAV message received in channel " << d_channel << ": ephemeris from satellite " << d_satellite << TEXT_RESET << '\n';
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
}
if (d_CNAV_Message.have_new_iono() == true)
{
std::shared_ptr<Gps_CNAV_Iono> tmp_obj = std::make_shared<Gps_CNAV_Iono>(d_CNAV_Message.get_iono());
std::cout << TEXT_BLUE << "New GPS CNAV message received in channel " << d_channel << ": iono model parameters from satellite " << d_satellite << TEXT_RESET << std::endl;
std::cout << TEXT_BLUE << "New GPS CNAV message received in channel " << d_channel << ": iono model parameters from satellite " << d_satellite << TEXT_RESET << '\n';
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
}
if (d_CNAV_Message.have_new_utc_model() == true)
{
std::shared_ptr<Gps_CNAV_Utc_Model> tmp_obj = std::make_shared<Gps_CNAV_Utc_Model>(d_CNAV_Message.get_utc_model());
std::cout << TEXT_BLUE << "New GPS CNAV message received in channel " << d_channel << ": UTC model parameters from satellite " << d_satellite << TEXT_RESET << std::endl;
std::cout << TEXT_BLUE << "New GPS CNAV message received in channel " << d_channel << ": UTC model parameters from satellite " << d_satellite << TEXT_RESET << '\n';
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
}

View File

@ -191,20 +191,20 @@ int gps_l5_telemetry_decoder_gs::general_work(int noutput_items __attribute__((u
{
// get ephemeris object for this SV
std::shared_ptr<Gps_CNAV_Ephemeris> tmp_obj = std::make_shared<Gps_CNAV_Ephemeris>(d_CNAV_Message.get_ephemeris());
std::cout << TEXT_MAGENTA << "New GPS L5 CNAV message received in channel " << d_channel << ": ephemeris from satellite " << d_satellite << TEXT_RESET << std::endl;
std::cout << TEXT_MAGENTA << "New GPS L5 CNAV message received in channel " << d_channel << ": ephemeris from satellite " << d_satellite << TEXT_RESET << '\n';
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
}
if (d_CNAV_Message.have_new_iono() == true)
{
std::shared_ptr<Gps_CNAV_Iono> tmp_obj = std::make_shared<Gps_CNAV_Iono>(d_CNAV_Message.get_iono());
std::cout << TEXT_MAGENTA << "New GPS L5 CNAV message received in channel " << d_channel << ": iono model parameters from satellite " << d_satellite << TEXT_RESET << std::endl;
std::cout << TEXT_MAGENTA << "New GPS L5 CNAV message received in channel " << d_channel << ": iono model parameters from satellite " << d_satellite << TEXT_RESET << '\n';
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
}
if (d_CNAV_Message.have_new_utc_model() == true)
{
std::shared_ptr<Gps_CNAV_Utc_Model> tmp_obj = std::make_shared<Gps_CNAV_Utc_Model>(d_CNAV_Message.get_utc_model());
std::cout << TEXT_MAGENTA << "New GPS L5 CNAV message received in channel " << d_channel << ": UTC model parameters from satellite " << d_satellite << TEXT_RESET << std::endl;
std::cout << TEXT_MAGENTA << "New GPS L5 CNAV message received in channel " << d_channel << ": UTC model parameters from satellite " << d_satellite << TEXT_RESET << '\n';
this->message_port_pub(pmt::mp("telemetry"), pmt::make_any(tmp_obj));
}

View File

@ -341,7 +341,7 @@ void sbas_l1_telemetry_decoder_gs::Crc_Verifier::get_valid_frames(const std::vec
{
ss << std::setw(2) << std::setfill('0') << std::hex << static_cast<uint32_t>((*byte_it));
}
VLOG(SAMP_SYNC) << ss.str() << std::setfill(' ') << std::resetiosflags(std::ios::hex) << std::endl;
VLOG(SAMP_SYNC) << ss.str() << std::setfill(' ') << std::resetiosflags(std::ios::hex) << '\n';
}
}
@ -465,7 +465,7 @@ int sbas_l1_telemetry_decoder_gs::general_work(int noutput_items __attribute__((
// and send them to the SBAS raw message queue
// for(std::vector<Sbas_Raw_Msg>::iterator it = sbas_raw_msgs.begin(); it != sbas_raw_msgs.end(); it++)
// {
// std::cout << "SBAS message type " << it->get_msg_type() << " from PRN" << it->get_prn() << " received" << std::endl;
// std::cout << "SBAS message type " << it->get_msg_type() << " from PRN" << it->get_prn() << " received\n";
// sbas_telemetry_data.update(*it);
// }

View File

@ -21,7 +21,7 @@
#include "viterbi_decoder.h"
#include <glog/logging.h>
#include <algorithm> // for fill_n
#include <ostream> // for operator<<, basic_ostream, char_traits, endl
#include <ostream> // for operator<<, basic_ostream, char_traits
// logging
#define EVENT 2 // logs important events which don't occur every block
@ -253,7 +253,7 @@ int Viterbi_Decoder::do_traceback(size_t traceback_length)
int state;
std::deque<Prev>::iterator it;
VLOG(FLOW) << "do_traceback(): traceback_length=" << traceback_length << std::endl;
VLOG(FLOW) << "do_traceback(): traceback_length=" << traceback_length << '\n';
if (d_trellis_paths.size() < traceback_length)
{
@ -516,12 +516,12 @@ Viterbi_Decoder::Prev::~Prev()
int Viterbi_Decoder::Prev::get_anchestor_state_of_current_state(int current_state)
{
// std::cout << "get prev state: for state " << current_state << " at time " << t << ", the prev state at time " << t-1 << " is " << state[current_state] << std::endl;
// std::cout << "get prev state: for state " << current_state << " at time " << t << ", the prev state at time " << t - 1 << " is " << state[current_state] << '\n';
if (num_states > current_state)
{
return state[current_state];
}
// std::cout<<"alarm "<<"num_states="<<num_states<<" current_state="<<current_state<<std::endl;
// std::cout << "alarm " << "num_states=" << num_states << " current_state=" << current_state << '\n';
// return state[current_state];
return 0;
}
@ -529,7 +529,7 @@ int Viterbi_Decoder::Prev::get_anchestor_state_of_current_state(int current_stat
int Viterbi_Decoder::Prev::get_bit_of_current_state(int current_state)
{
// std::cout << "get prev bit : for state " << current_state << " at time " << t << ", the send bit is " << bit[current_state] << std::endl;
// std::cout << "get prev bit : for state " << current_state << " at time " << t << ", the send bit is " << bit[current_state] << '\n';
if (num_states > current_state)
{
return v_bit[current_state];

View File

@ -46,22 +46,22 @@ BeidouB1iDllPllTracking::BeidouB1iDllPllTracking(
if (trk_params.extend_correlation_symbols < 1)
{
trk_params.extend_correlation_symbols = 1;
std::cout << TEXT_RED << "WARNING: BEIDOU B1I. extend_correlation_symbols must be bigger than 1. Coherent integration has been set to 1 symbol (1 ms)" << TEXT_RESET << std::endl;
std::cout << TEXT_RED << "WARNING: BEIDOU B1I. extend_correlation_symbols must be bigger than 1. Coherent integration has been set to 1 symbol (1 ms)" << TEXT_RESET << '\n';
}
else if (trk_params.extend_correlation_symbols > 20)
{
trk_params.extend_correlation_symbols = 20;
std::cout << TEXT_RED << "WARNING: BEIDOU B1I. extend_correlation_symbols must be lower than 21. Coherent integration has been set to 20 symbols (20 ms)" << TEXT_RESET << std::endl;
std::cout << TEXT_RED << "WARNING: BEIDOU B1I. extend_correlation_symbols must be lower than 21. Coherent integration has been set to 20 symbols (20 ms)" << TEXT_RESET << '\n';
}
trk_params.track_pilot = configuration->property(role + ".track_pilot", false);
if (trk_params.track_pilot)
{
std::cout << TEXT_RED << "WARNING: BEIDOU B1I does not have pilot signal. Data tracking has been enabled" << TEXT_RESET << std::endl;
std::cout << TEXT_RED << "WARNING: BEIDOU B1I does not have pilot signal. Data tracking has been enabled" << TEXT_RESET << '\n';
trk_params.track_pilot = false;
}
if ((trk_params.extend_correlation_symbols > 1) and (trk_params.pll_bw_narrow_hz > trk_params.pll_bw_hz or trk_params.dll_bw_narrow_hz > trk_params.dll_bw_hz))
{
std::cout << TEXT_RED << "WARNING: BEIDOU B1I. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << std::endl;
std::cout << TEXT_RED << "WARNING: BEIDOU B1I. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << '\n';
}
trk_params.system = 'C';
std::array<char, 3> sig_{'B', '1', '\0'};

View File

@ -48,12 +48,12 @@ BeidouB3iDllPllTracking::BeidouB3iDllPllTracking(
if (trk_params.extend_correlation_symbols < 1)
{
trk_params.extend_correlation_symbols = 1;
std::cout << TEXT_RED << "WARNING: BEIDOU B3I. extend_correlation_symbols must be bigger than 1. Coherent integration has been set to 1 symbol (1 ms)" << TEXT_RESET << std::endl;
std::cout << TEXT_RED << "WARNING: BEIDOU B3I. extend_correlation_symbols must be bigger than 1. Coherent integration has been set to 1 symbol (1 ms)" << TEXT_RESET << '\n';
}
else if (trk_params.extend_correlation_symbols > 20)
{
trk_params.extend_correlation_symbols = 20;
std::cout << TEXT_RED << "WARNING: BEIDOU B3I. extend_correlation_symbols must be lower than 21. Coherent integration has been set to 20 symbols (20 ms)" << TEXT_RESET << std::endl;
std::cout << TEXT_RED << "WARNING: BEIDOU B3I. extend_correlation_symbols must be lower than 21. Coherent integration has been set to 20 symbols (20 ms)" << TEXT_RESET << '\n';
}
trk_params.system = 'C';
std::array<char, 3> sig_{'B', '3', '\0'};

View File

@ -43,16 +43,16 @@ GalileoE1DllPllVemlTracking::GalileoE1DllPllVemlTracking(
if (trk_params.extend_correlation_symbols < 1)
{
trk_params.extend_correlation_symbols = 1;
std::cout << TEXT_RED << "WARNING: Galileo E1. extend_correlation_symbols must be bigger than 0. Coherent integration has been set to 1 symbol (4 ms)" << TEXT_RESET << std::endl;
std::cout << TEXT_RED << "WARNING: Galileo E1. extend_correlation_symbols must be bigger than 0. Coherent integration has been set to 1 symbol (4 ms)" << TEXT_RESET << '\n';
}
else if (!trk_params.track_pilot and trk_params.extend_correlation_symbols > 1)
{
trk_params.extend_correlation_symbols = 1;
std::cout << TEXT_RED << "WARNING: Galileo E1. Extended coherent integration is not allowed when tracking the data component. Coherent integration has been set to 4 ms (1 symbol)" << TEXT_RESET << std::endl;
std::cout << TEXT_RED << "WARNING: Galileo E1. Extended coherent integration is not allowed when tracking the data component. Coherent integration has been set to 4 ms (1 symbol)" << TEXT_RESET << '\n';
}
if ((trk_params.extend_correlation_symbols > 1) and (trk_params.pll_bw_narrow_hz > trk_params.pll_bw_hz or trk_params.dll_bw_narrow_hz > trk_params.dll_bw_hz))
{
std::cout << TEXT_RED << "WARNING: Galileo E1. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << std::endl;
std::cout << TEXT_RED << "WARNING: Galileo E1. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << '\n';
}
int vector_length = std::round(trk_params.fs_in / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS));
trk_params.vector_length = vector_length;

View File

@ -45,16 +45,16 @@ GalileoE1DllPllVemlTrackingFpga::GalileoE1DllPllVemlTrackingFpga(
if (trk_params_fpga.extend_correlation_symbols < 1)
{
trk_params_fpga.extend_correlation_symbols = 1;
std::cout << TEXT_RED << "WARNING: Galileo E1. extend_correlation_symbols must be bigger than 0. Coherent integration has been set to 1 symbol (4 ms)" << TEXT_RESET << std::endl;
std::cout << TEXT_RED << "WARNING: Galileo E1. extend_correlation_symbols must be bigger than 0. Coherent integration has been set to 1 symbol (4 ms)" << TEXT_RESET << '\n';
}
else if (!trk_params_fpga.track_pilot and trk_params_fpga.extend_correlation_symbols > 1)
{
trk_params_fpga.extend_correlation_symbols = 1;
std::cout << TEXT_RED << "WARNING: Galileo E1. Extended coherent integration is not allowed when tracking the data component. Coherent integration has been set to 4 ms (1 symbol)" << TEXT_RESET << std::endl;
std::cout << TEXT_RED << "WARNING: Galileo E1. Extended coherent integration is not allowed when tracking the data component. Coherent integration has been set to 4 ms (1 symbol)" << TEXT_RESET << '\n';
}
if ((trk_params_fpga.extend_correlation_symbols > 1) and (trk_params_fpga.pll_bw_narrow_hz > trk_params_fpga.pll_bw_hz or trk_params_fpga.dll_bw_narrow_hz > trk_params_fpga.dll_bw_hz))
{
std::cout << TEXT_RED << "WARNING: Galileo E1. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << std::endl;
std::cout << TEXT_RED << "WARNING: Galileo E1. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << '\n';
}
d_track_pilot = trk_params_fpga.track_pilot;
int32_t vector_length = std::round(trk_params_fpga.fs_in / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS));

View File

@ -44,16 +44,16 @@ GalileoE5aDllPllTracking::GalileoE5aDllPllTracking(
if (trk_params.extend_correlation_symbols < 1)
{
trk_params.extend_correlation_symbols = 1;
std::cout << TEXT_RED << "WARNING: Galileo E5a. extend_correlation_symbols must be bigger than 0. Coherent integration has been set to 1 symbol (1 ms)" << TEXT_RESET << std::endl;
std::cout << TEXT_RED << "WARNING: Galileo E5a. extend_correlation_symbols must be bigger than 0. Coherent integration has been set to 1 symbol (1 ms)" << TEXT_RESET << '\n';
}
else if (!trk_params.track_pilot and trk_params.extend_correlation_symbols > GALILEO_E5A_I_SECONDARY_CODE_LENGTH)
{
trk_params.extend_correlation_symbols = GALILEO_E5A_I_SECONDARY_CODE_LENGTH;
std::cout << TEXT_RED << "WARNING: Galileo E5a. extend_correlation_symbols must be lower than 21 when tracking the data component. Coherent integration has been set to 20 symbols (20 ms)" << TEXT_RESET << std::endl;
std::cout << TEXT_RED << "WARNING: Galileo E5a. extend_correlation_symbols must be lower than 21 when tracking the data component. Coherent integration has been set to 20 symbols (20 ms)" << TEXT_RESET << '\n';
}
if ((trk_params.extend_correlation_symbols > 1) and (trk_params.pll_bw_narrow_hz > trk_params.pll_bw_hz or trk_params.dll_bw_narrow_hz > trk_params.dll_bw_hz))
{
std::cout << TEXT_RED << "WARNING: Galileo E5a. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << std::endl;
std::cout << TEXT_RED << "WARNING: Galileo E5a. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << '\n';
}
trk_params.system = 'E';
std::array<char, 3> sig_{'5', 'X', '\0'};

View File

@ -43,16 +43,16 @@ GalileoE5aDllPllTrackingFpga::GalileoE5aDllPllTrackingFpga(
if (trk_params_fpga.extend_correlation_symbols < 1)
{
trk_params_fpga.extend_correlation_symbols = 1;
std::cout << TEXT_RED << "WARNING: Galileo E5a. extend_correlation_symbols must be bigger than 0. Coherent integration has been set to 1 symbol (1 ms)" << TEXT_RESET << std::endl;
std::cout << TEXT_RED << "WARNING: Galileo E5a. extend_correlation_symbols must be bigger than 0. Coherent integration has been set to 1 symbol (1 ms)" << TEXT_RESET << '\n';
}
else if (!trk_params_fpga.track_pilot and trk_params_fpga.extend_correlation_symbols > GALILEO_E5A_I_SECONDARY_CODE_LENGTH)
{
trk_params_fpga.extend_correlation_symbols = GALILEO_E5A_I_SECONDARY_CODE_LENGTH;
std::cout << TEXT_RED << "WARNING: Galileo E5a. extend_correlation_symbols must be lower than 21 when tracking the data component. Coherent integration has been set to 20 symbols (20 ms)" << TEXT_RESET << std::endl;
std::cout << TEXT_RED << "WARNING: Galileo E5a. extend_correlation_symbols must be lower than 21 when tracking the data component. Coherent integration has been set to 20 symbols (20 ms)" << TEXT_RESET << '\n';
}
if ((trk_params_fpga.extend_correlation_symbols > 1) and (trk_params_fpga.pll_bw_narrow_hz > trk_params_fpga.pll_bw_hz or trk_params_fpga.dll_bw_narrow_hz > trk_params_fpga.dll_bw_hz))
{
std::cout << TEXT_RED << "WARNING: Galileo E5a. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << std::endl;
std::cout << TEXT_RED << "WARNING: Galileo E5a. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << '\n';
}
trk_params_fpga.system = 'E';
std::array<char, 3> sig_{'5', 'X', '\0'};

View File

@ -46,22 +46,22 @@ GpsL1CaDllPllTracking::GpsL1CaDllPllTracking(
if (trk_params.extend_correlation_symbols < 1)
{
trk_params.extend_correlation_symbols = 1;
std::cout << TEXT_RED << "WARNING: GPS L1 C/A. extend_correlation_symbols must be bigger than 1. Coherent integration has been set to 1 symbol (1 ms)" << TEXT_RESET << std::endl;
std::cout << TEXT_RED << "WARNING: GPS L1 C/A. extend_correlation_symbols must be bigger than 1. Coherent integration has been set to 1 symbol (1 ms)" << TEXT_RESET << '\n';
}
else if (trk_params.extend_correlation_symbols > 20)
{
trk_params.extend_correlation_symbols = 20;
std::cout << TEXT_RED << "WARNING: GPS L1 C/A. extend_correlation_symbols must be lower than 21. Coherent integration has been set to 20 symbols (20 ms)" << TEXT_RESET << std::endl;
std::cout << TEXT_RED << "WARNING: GPS L1 C/A. extend_correlation_symbols must be lower than 21. Coherent integration has been set to 20 symbols (20 ms)" << TEXT_RESET << '\n';
}
trk_params.track_pilot = configuration->property(role + ".track_pilot", false);
if (trk_params.track_pilot)
{
trk_params.track_pilot = false;
std::cout << TEXT_RED << "WARNING: GPS L1 C/A does not have pilot signal. Data tracking has been enabled" << TEXT_RESET << std::endl;
std::cout << TEXT_RED << "WARNING: GPS L1 C/A does not have pilot signal. Data tracking has been enabled" << TEXT_RESET << '\n';
}
if ((trk_params.extend_correlation_symbols > 1) and (trk_params.pll_bw_narrow_hz > trk_params.pll_bw_hz or trk_params.dll_bw_narrow_hz > trk_params.dll_bw_hz))
{
std::cout << TEXT_RED << "WARNING: GPS L1 C/A. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << std::endl;
std::cout << TEXT_RED << "WARNING: GPS L1 C/A. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << '\n';
}
trk_params.system = 'G';

View File

@ -47,22 +47,22 @@ GpsL1CaDllPllTrackingFpga::GpsL1CaDllPllTrackingFpga(
if (trk_params_fpga.extend_correlation_symbols < 1)
{
trk_params_fpga.extend_correlation_symbols = 1;
std::cout << TEXT_RED << "WARNING: GPS L1 C/A. extend_correlation_symbols must be bigger than 1. Coherent integration has been set to 1 symbol (1 ms)" << TEXT_RESET << std::endl;
std::cout << TEXT_RED << "WARNING: GPS L1 C/A. extend_correlation_symbols must be bigger than 1. Coherent integration has been set to 1 symbol (1 ms)" << TEXT_RESET << '\n';
}
else if (trk_params_fpga.extend_correlation_symbols > GPS_CA_BIT_DURATION_MS)
{
trk_params_fpga.extend_correlation_symbols = GPS_CA_BIT_DURATION_MS;
std::cout << TEXT_RED << "WARNING: GPS L1 C/A. extend_correlation_symbols must be lower than 21. Coherent integration has been set to 20 symbols (20 ms)" << TEXT_RESET << std::endl;
std::cout << TEXT_RED << "WARNING: GPS L1 C/A. extend_correlation_symbols must be lower than 21. Coherent integration has been set to 20 symbols (20 ms)" << TEXT_RESET << '\n';
}
trk_params_fpga.track_pilot = configuration->property(role + ".track_pilot", false);
if (trk_params_fpga.track_pilot)
{
trk_params_fpga.track_pilot = false;
std::cout << TEXT_RED << "WARNING: GPS L1 C/A does not have pilot signal. Data tracking has been enabled" << TEXT_RESET << std::endl;
std::cout << TEXT_RED << "WARNING: GPS L1 C/A does not have pilot signal. Data tracking has been enabled" << TEXT_RESET << '\n';
}
if ((trk_params_fpga.extend_correlation_symbols > 1) and (trk_params_fpga.pll_bw_narrow_hz > trk_params_fpga.pll_bw_hz or trk_params_fpga.dll_bw_narrow_hz > trk_params_fpga.dll_bw_hz))
{
std::cout << TEXT_RED << "WARNING: GPS L1 C/A. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << std::endl;
std::cout << TEXT_RED << "WARNING: GPS L1 C/A. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << '\n';
}
trk_params_fpga.system = 'G';
std::array<char, 3> sig_{'1', 'C', '\0'};

View File

@ -45,13 +45,13 @@ GpsL2MDllPllTracking::GpsL2MDllPllTracking(
if (trk_params.extend_correlation_symbols != 1)
{
trk_params.extend_correlation_symbols = 1;
std::cout << TEXT_RED << "WARNING: Extended coherent integration is not allowed in GPS L2. Coherent integration has been set to 20 ms (1 symbol)" << TEXT_RESET << std::endl;
std::cout << TEXT_RED << "WARNING: Extended coherent integration is not allowed in GPS L2. Coherent integration has been set to 20 ms (1 symbol)" << TEXT_RESET << '\n';
}
trk_params.track_pilot = configuration->property(role + ".track_pilot", false);
if (trk_params.track_pilot)
{
trk_params.track_pilot = false;
std::cout << TEXT_RED << "WARNING: GPS L2 does not have pilot signal. Data tracking has been enabled" << TEXT_RESET << std::endl;
std::cout << TEXT_RED << "WARNING: GPS L2 does not have pilot signal. Data tracking has been enabled" << TEXT_RESET << '\n';
}
trk_params.system = 'G';
std::array<char, 3> sig_{'2', 'S', '\0'};

View File

@ -53,14 +53,14 @@ GpsL2MDllPllTrackingFpga::GpsL2MDllPllTrackingFpga(
if (trk_params_fpga.extend_correlation_symbols != 1)
{
trk_params_fpga.extend_correlation_symbols = 1;
std::cout << TEXT_RED << "WARNING: Extended coherent integration is not allowed in GPS L2. Coherent integration has been set to 20 ms (1 symbol)" << TEXT_RESET << std::endl;
std::cout << TEXT_RED << "WARNING: Extended coherent integration is not allowed in GPS L2. Coherent integration has been set to 20 ms (1 symbol)" << TEXT_RESET << '\n';
}
trk_params_fpga.track_pilot = configuration->property(role + ".track_pilot", false);
if (trk_params_fpga.track_pilot)
{
trk_params_fpga.track_pilot = false;
std::cout << TEXT_RED << "WARNING: GPS L2 does not have pilot signal. Data tracking has been enabled" << TEXT_RESET << std::endl;
std::cout << TEXT_RED << "WARNING: GPS L2 does not have pilot signal. Data tracking has been enabled" << TEXT_RESET << '\n';
}
trk_params_fpga.system = 'G';
std::array<char, 3> sig_{'2', 'S', '\0'};

View File

@ -45,16 +45,16 @@ GpsL5DllPllTracking::GpsL5DllPllTracking(
if (trk_params.extend_correlation_symbols < 1)
{
trk_params.extend_correlation_symbols = 1;
std::cout << TEXT_RED << "WARNING: GPS L5. extend_correlation_symbols must be bigger than 0. Coherent integration has been set to 1 symbol (1 ms)" << TEXT_RESET << std::endl;
std::cout << TEXT_RED << "WARNING: GPS L5. extend_correlation_symbols must be bigger than 0. Coherent integration has been set to 1 symbol (1 ms)" << TEXT_RESET << '\n';
}
else if (!trk_params.track_pilot and trk_params.extend_correlation_symbols > GPS_L5I_NH_CODE_LENGTH)
{
trk_params.extend_correlation_symbols = GPS_L5I_NH_CODE_LENGTH;
std::cout << TEXT_RED << "WARNING: GPS L5. extend_correlation_symbols must be lower than 11 when tracking the data component. Coherent integration has been set to 10 symbols (10 ms)" << TEXT_RESET << std::endl;
std::cout << TEXT_RED << "WARNING: GPS L5. extend_correlation_symbols must be lower than 11 when tracking the data component. Coherent integration has been set to 10 symbols (10 ms)" << TEXT_RESET << '\n';
}
if ((trk_params.extend_correlation_symbols > 1) and (trk_params.pll_bw_narrow_hz > trk_params.pll_bw_hz or trk_params.dll_bw_narrow_hz > trk_params.dll_bw_hz))
{
std::cout << TEXT_RED << "WARNING: GPS L5. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << std::endl;
std::cout << TEXT_RED << "WARNING: GPS L5. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << '\n';
}
trk_params.system = 'G';
std::array<char, 3> sig_{'L', '5', '\0'};

View File

@ -49,16 +49,16 @@ GpsL5DllPllTrackingFpga::GpsL5DllPllTrackingFpga(
if (trk_params_fpga.extend_correlation_symbols < 1)
{
trk_params_fpga.extend_correlation_symbols = 1;
std::cout << TEXT_RED << "WARNING: GPS L5. extend_correlation_symbols must be bigger than 0. Coherent integration has been set to 1 symbol (1 ms)" << TEXT_RESET << std::endl;
std::cout << TEXT_RED << "WARNING: GPS L5. extend_correlation_symbols must be bigger than 0. Coherent integration has been set to 1 symbol (1 ms)" << TEXT_RESET << '\n';
}
else if (!trk_params_fpga.track_pilot and trk_params_fpga.extend_correlation_symbols > GPS_L5I_NH_CODE_LENGTH)
{
trk_params_fpga.extend_correlation_symbols = GPS_L5I_NH_CODE_LENGTH;
std::cout << TEXT_RED << "WARNING: GPS L5. extend_correlation_symbols must be lower than 11 when tracking the data component. Coherent integration has been set to 10 symbols (10 ms)" << TEXT_RESET << std::endl;
std::cout << TEXT_RED << "WARNING: GPS L5. extend_correlation_symbols must be lower than 11 when tracking the data component. Coherent integration has been set to 10 symbols (10 ms)" << TEXT_RESET << '\n';
}
if ((trk_params_fpga.extend_correlation_symbols > 1) and (trk_params_fpga.pll_bw_narrow_hz > trk_params_fpga.pll_bw_hz or trk_params_fpga.dll_bw_narrow_hz > trk_params_fpga.dll_bw_hz))
{
std::cout << TEXT_RED << "WARNING: GPS L5. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << std::endl;
std::cout << TEXT_RED << "WARNING: GPS L5. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << '\n';
}
d_track_pilot = trk_params_fpga.track_pilot;
trk_params_fpga.system = 'G';

View File

@ -211,7 +211,7 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
else
{
LOG(WARNING) << "Invalid Signal argument when instantiating tracking blocks";
std::cerr << "Invalid Signal argument when instantiating tracking blocks" << std::endl;
std::cerr << "Invalid Signal argument when instantiating tracking blocks\n";
d_correlation_length_ms = 1;
d_secondary = false;
d_signal_carrier_freq = 0.0;
@ -286,7 +286,7 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
else
{
LOG(WARNING) << "Invalid Signal argument when instantiating tracking blocks";
std::cout << "Invalid Signal argument when instantiating tracking blocks" << std::endl;
std::cout << "Invalid Signal argument when instantiating tracking blocks\n";
d_correlation_length_ms = 1;
d_secondary = false;
d_signal_carrier_freq = 0.0;
@ -343,7 +343,7 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
else
{
LOG(WARNING) << "Invalid Signal argument when instantiating tracking blocks";
std::cout << "Invalid Signal argument when instantiating tracking blocks" << std::endl;
std::cout << "Invalid Signal argument when instantiating tracking blocks\n";
d_correlation_length_ms = 1;
d_secondary = false;
d_signal_carrier_freq = 0.0;
@ -356,7 +356,7 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
else
{
LOG(WARNING) << "Invalid System argument when instantiating tracking blocks";
std::cerr << "Invalid System argument when instantiating tracking blocks" << std::endl;
std::cerr << "Invalid System argument when instantiating tracking blocks\n";
d_correlation_length_ms = 1;
d_secondary = false;
d_signal_carrier_freq = 0.0;
@ -537,7 +537,7 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
// create directory
if (!gnss_sdr_create_directory(dump_path))
{
std::cerr << "GNSS-SDR cannot create dump files for the tracking block. Wrong permissions?" << std::endl;
std::cerr << "GNSS-SDR cannot create dump files for the tracking block. Wrong permissions?\n";
d_dump = false;
}
}
@ -762,7 +762,7 @@ void dll_pll_veml_tracking::start_tracking()
d_code_loop_filter.initialize(); // initialize the code filter
// DEBUG OUTPUT
std::cout << "Tracking of " << d_systemName << " " << d_signal_pretty_name << " signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(d_systemName, d_acquisition_gnss_synchro->PRN) << std::endl;
std::cout << "Tracking of " << d_systemName << " " << d_signal_pretty_name << " signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(d_systemName, d_acquisition_gnss_synchro->PRN) << '\n';
DLOG(INFO) << "Starting tracking of satellite " << Gnss_Satellite(d_systemName, d_acquisition_gnss_synchro->PRN) << " on channel " << d_channel;
// enable tracking pull-in
@ -900,7 +900,7 @@ bool dll_pll_veml_tracking::cn0_and_tracking_lock_status(double coh_integration_
}
if (d_carrier_lock_fail_counter > d_trk_parameters.max_carrier_lock_fail or d_code_lock_fail_counter > d_trk_parameters.max_code_lock_fail)
{
std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl;
std::cout << "Loss of lock in channel " << d_channel << "!\n";
LOG(INFO) << "Loss of lock in channel " << d_channel
<< " (carrier_lock_fail_counter:" << d_carrier_lock_fail_counter
<< " code_lock_fail_counter : " << d_code_lock_fail_counter << ")";
@ -968,7 +968,7 @@ void dll_pll_veml_tracking::run_dll_pll()
d_carr_freq_error_hz = fll_diff_atan(d_P_accu_old, d_P_accu, 0, d_current_correlation_time_s) / TWO_PI;
d_P_accu_old = d_P_accu;
// std::cout << "d_carr_freq_error_hz: " << d_carr_freq_error_hz << std::endl;
// std::cout << "d_carr_freq_error_hz: " << d_carr_freq_error_hz << '\n';
// Carrier discriminator filter
if ((d_pull_in_transitory == true and d_trk_parameters.enable_fll_pull_in == true))
{
@ -990,8 +990,8 @@ void dll_pll_veml_tracking::run_dll_pll()
// New carrier Doppler frequency estimation
d_carrier_doppler_hz = d_carr_error_filt_hz;
// std::cout << "d_carrier_doppler_hz: " << d_carrier_doppler_hz << std::endl;
// std::cout << "d_CN0_SNV_dB_Hz: " << this->d_CN0_SNV_dB_Hz << std::endl;
// std::cout << "d_carrier_doppler_hz: " << d_carrier_doppler_hz << '\n';
// std::cout << "d_CN0_SNV_dB_Hz: " << this->d_CN0_SNV_dB_Hz << '\n';
// ################## DLL ##########################################################
// DLL discriminator
@ -1105,7 +1105,7 @@ void dll_pll_veml_tracking::update_tracking_vars()
d_carrier_phase_rate_step_rad = (tmp_cp2 - tmp_cp1) / tmp_samples;
}
}
// std::cout << d_carrier_phase_rate_step_rad * d_trk_parameters.fs_in * d_trk_parameters.fs_in / TWO_PI << std::endl;
// std::cout << d_carrier_phase_rate_step_rad * d_trk_parameters.fs_in * d_trk_parameters.fs_in / TWO_PI << '\n';
// remnant carrier phase to prevent overflow in the code NCO
d_rem_carr_phase_rad += static_cast<float>(d_carrier_phase_step_rad * static_cast<double>(d_current_prn_length_samples) + 0.5 * d_carrier_phase_rate_step_rad * static_cast<double>(d_current_prn_length_samples) * static_cast<double>(d_current_prn_length_samples));
d_rem_carr_phase_rad = fmod(d_rem_carr_phase_rad, TWO_PI);
@ -1113,7 +1113,7 @@ void dll_pll_veml_tracking::update_tracking_vars()
// carrier phase accumulator
// double a = d_carrier_phase_step_rad * static_cast<double>(d_current_prn_length_samples);
// double b = 0.5 * d_carrier_phase_rate_step_rad * static_cast<double>(d_current_prn_length_samples) * static_cast<double>(d_current_prn_length_samples);
// std::cout << fmod(b, TWO_PI) / fmod(a, TWO_PI) << std::endl;
// std::cout << fmod(b, TWO_PI) / fmod(a, TWO_PI) << '\n';
d_acc_carrier_phase_rad -= (d_carrier_phase_step_rad * static_cast<double>(d_current_prn_length_samples) + 0.5 * d_carrier_phase_rate_step_rad * static_cast<double>(d_current_prn_length_samples) * static_cast<double>(d_current_prn_length_samples));
// ################### DLL COMMANDS #################################################
@ -1227,7 +1227,7 @@ void dll_pll_veml_tracking::save_correlation_results()
else
{
d_P_data_accu += *d_Prompt;
// std::cout << "s[" << d_current_data_symbol << "]=" << (int)((*d_Prompt).real() > 0) << std::endl;
// std::cout << "s[" << d_current_data_symbol << "]=" << (int)((*d_Prompt).real() > 0) << '\n';
}
d_current_data_symbol++;
d_current_data_symbol %= d_symbols_per_bit;
@ -1370,7 +1370,7 @@ int32_t dll_pll_veml_tracking::save_matfile() const
dump_filename_.append(std::to_string(d_channel));
// add extension
dump_filename_.append(".dat");
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
{
@ -1378,7 +1378,7 @@ int32_t dll_pll_veml_tracking::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
@ -1449,7 +1449,7 @@ int32_t dll_pll_veml_tracking::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;
}
@ -1683,7 +1683,7 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused)
{
d_carrier_lock_fail_counter = 300000; // force loss-of-lock condition
LOG(INFO) << d_systemName << " " << d_signal_pretty_name << " tracking synchronization time limit reached in channel " << d_channel
<< " for satellite " << Gnss_Satellite(d_systemName, d_acquisition_gnss_synchro->PRN) << std::endl;
<< " for satellite " << Gnss_Satellite(d_systemName, d_acquisition_gnss_synchro->PRN) << '\n';
}
// Check lock status
if (!cn0_and_tracking_lock_status(d_code_period))
@ -1713,9 +1713,9 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused)
if (next_state)
{
LOG(INFO) << d_systemName << " " << d_signal_pretty_name << " secondary code locked in channel " << d_channel
<< " for satellite " << Gnss_Satellite(d_systemName, d_acquisition_gnss_synchro->PRN) << std::endl;
<< " for satellite " << Gnss_Satellite(d_systemName, d_acquisition_gnss_synchro->PRN) << '\n';
std::cout << d_systemName << " " << d_signal_pretty_name << " secondary code locked in channel " << d_channel
<< " for satellite " << Gnss_Satellite(d_systemName, d_acquisition_gnss_synchro->PRN) << std::endl;
<< " for satellite " << Gnss_Satellite(d_systemName, d_acquisition_gnss_synchro->PRN) << '\n';
}
}
}
@ -1729,9 +1729,9 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused)
if (next_state)
{
LOG(INFO) << d_systemName << " " << d_signal_pretty_name << " tracking bit synchronization locked in channel " << d_channel
<< " for satellite " << Gnss_Satellite(d_systemName, d_acquisition_gnss_synchro->PRN) << std::endl;
<< " for satellite " << Gnss_Satellite(d_systemName, d_acquisition_gnss_synchro->PRN) << '\n';
std::cout << d_systemName << " " << d_signal_pretty_name << " tracking bit synchronization locked in channel " << d_channel
<< " for satellite " << Gnss_Satellite(d_systemName, d_acquisition_gnss_synchro->PRN) << std::endl;
<< " for satellite " << Gnss_Satellite(d_systemName, d_acquisition_gnss_synchro->PRN) << '\n';
}
}
}
@ -1767,7 +1767,7 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused)
<< " for satellite " << Gnss_Satellite(d_systemName, d_acquisition_gnss_synchro->PRN);
std::cout << "Enabled " << d_trk_parameters.extend_correlation_symbols * static_cast<int32_t>(d_code_period * 1000.0) << " ms extended correlator in channel "
<< d_channel
<< " for satellite " << Gnss_Satellite(d_systemName, d_acquisition_gnss_synchro->PRN) << std::endl;
<< " for satellite " << Gnss_Satellite(d_systemName, d_acquisition_gnss_synchro->PRN) << '\n';
// Set narrow taps delay values [chips]
d_code_loop_filter.set_update_interval(d_current_correlation_time_s);
d_code_loop_filter.set_noise_bandwidth(d_trk_parameters.dll_bw_narrow_hz);

View File

@ -207,7 +207,7 @@ dll_pll_veml_tracking_fpga::dll_pll_veml_tracking_fpga(const Dll_Pll_Conf_Fpga &
else
{
LOG(WARNING) << "Invalid Signal argument when instantiating tracking blocks";
std::cerr << "Invalid Signal argument when instantiating tracking blocks" << std::endl;
std::cerr << "Invalid Signal argument when instantiating tracking blocks\n";
d_correlation_length_ms = 1;
d_secondary = false;
d_signal_carrier_freq = 0.0;
@ -285,7 +285,7 @@ dll_pll_veml_tracking_fpga::dll_pll_veml_tracking_fpga(const Dll_Pll_Conf_Fpga &
else
{
LOG(WARNING) << "Invalid Signal argument when instantiating tracking blocks";
std::cout << "Invalid Signal argument when instantiating tracking blocks" << std::endl;
std::cout << "Invalid Signal argument when instantiating tracking blocks\n";
d_correlation_length_ms = 1;
d_secondary = false;
d_signal_carrier_freq = 0.0;
@ -296,7 +296,7 @@ dll_pll_veml_tracking_fpga::dll_pll_veml_tracking_fpga(const Dll_Pll_Conf_Fpga &
else
{
LOG(WARNING) << "Invalid System argument when instantiating tracking blocks";
std::cerr << "Invalid System argument when instantiating tracking blocks" << std::endl;
std::cerr << "Invalid System argument when instantiating tracking blocks\n";
d_correlation_length_ms = 1;
d_secondary = false;
d_signal_carrier_freq = 0.0;
@ -461,7 +461,7 @@ dll_pll_veml_tracking_fpga::dll_pll_veml_tracking_fpga(const Dll_Pll_Conf_Fpga &
// create directory
if (!gnss_sdr_create_directory(dump_path))
{
std::cerr << "GNSS-SDR cannot create dump files for the tracking block. Wrong permissions?" << std::endl;
std::cerr << "GNSS-SDR cannot create dump files for the tracking block. Wrong permissions?\n";
d_dump = false;
}
}
@ -656,7 +656,7 @@ bool dll_pll_veml_tracking_fpga::cn0_and_tracking_lock_status(double coh_integra
}
if (d_carrier_lock_fail_counter > d_trk_parameters.max_carrier_lock_fail or d_code_lock_fail_counter > d_trk_parameters.max_code_lock_fail)
{
std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl;
std::cout << "Loss of lock in channel " << d_channel << "!\n";
LOG(INFO) << "Loss of lock in channel " << d_channel
<< " (carrier_lock_fail_counter:" << d_carrier_lock_fail_counter
<< " code_lock_fail_counter : " << d_code_lock_fail_counter << ")";
@ -712,7 +712,7 @@ void dll_pll_veml_tracking_fpga::run_dll_pll()
d_carr_freq_error_hz = fll_diff_atan(d_P_accu_old, d_P_accu, 0, d_current_correlation_time_s) / TWO_PI;
d_P_accu_old = d_P_accu;
// std::cout << "d_carr_freq_error_hz: " << d_carr_freq_error_hz << std::endl;
// std::cout << "d_carr_freq_error_hz: " << d_carr_freq_error_hz << '\n';
// Carrier discriminator filter
if ((d_pull_in_transitory == true and d_trk_parameters.enable_fll_pull_in == true))
{
@ -734,8 +734,8 @@ void dll_pll_veml_tracking_fpga::run_dll_pll()
// New carrier Doppler frequency estimation
d_carrier_doppler_hz = d_carr_error_filt_hz;
// std::cout << "d_carrier_doppler_hz: " << d_carrier_doppler_hz << std::endl;
// std::cout << "d_CN0_SNV_dB_Hz: " << this->d_CN0_SNV_dB_Hz << std::endl;
// std::cout << "d_carrier_doppler_hz: " << d_carrier_doppler_hz << '\n';
// std::cout << "d_CN0_SNV_dB_Hz: " << this->d_CN0_SNV_dB_Hz << '\n';
// ################## DLL ##########################################################
// DLL discriminator
@ -850,7 +850,7 @@ void dll_pll_veml_tracking_fpga::update_tracking_vars()
d_carrier_phase_rate_step_rad = (tmp_cp2 - tmp_cp1) / tmp_samples;
}
}
// std::cout << d_carrier_phase_rate_step_rad * d_trk_parameters.fs_in * d_trk_parameters.fs_in / TWO_PI << std::endl;
// std::cout << d_carrier_phase_rate_step_rad * d_trk_parameters.fs_in * d_trk_parameters.fs_in / TWO_PI << '\n';
// remnant carrier phase to prevent overflow in the code NCO
d_rem_carr_phase_rad += static_cast<float>(d_carrier_phase_step_rad * static_cast<double>(d_current_integration_length_samples) + 0.5 * d_carrier_phase_rate_step_rad * static_cast<double>(d_current_integration_length_samples) * static_cast<double>(d_current_integration_length_samples));
d_rem_carr_phase_rad = fmod(d_rem_carr_phase_rad, TWO_PI);
@ -858,7 +858,7 @@ void dll_pll_veml_tracking_fpga::update_tracking_vars()
// carrier phase accumulator
// double a = d_carrier_phase_step_rad * static_cast<double>(d_current_prn_length_samples);
// double b = 0.5 * d_carrier_phase_rate_step_rad * static_cast<double>(d_current_prn_length_samples) * static_cast<double>(d_current_prn_length_samples);
// std::cout << fmod(b, TWO_PI) / fmod(a, TWO_PI) << std::endl;
// std::cout << fmod(b, TWO_PI) / fmod(a, TWO_PI) << '\n';
d_acc_carrier_phase_rad -= (d_carrier_phase_step_rad * static_cast<double>(d_current_integration_length_samples) + 0.5 * d_carrier_phase_rate_step_rad * static_cast<double>(d_current_integration_length_samples) * static_cast<double>(d_current_integration_length_samples));
// ################## DLL COMMANDS #################################################
@ -986,7 +986,7 @@ void dll_pll_veml_tracking_fpga::save_correlation_results()
else
{
d_P_data_accu += *d_Prompt;
// std::cout << "s[" << d_current_data_symbol << "]=" << (int)((*d_Prompt).real() > 0) << std::endl;
// std::cout << "s[" << d_current_data_symbol << "]=" << (int)((*d_Prompt).real() > 0) << '\n';
}
d_current_data_symbol += d_current_fpga_integration_period;
d_current_data_symbol %= d_symbols_per_bit;
@ -1129,7 +1129,7 @@ int32_t dll_pll_veml_tracking_fpga::save_matfile() const
dump_filename_.append(std::to_string(d_channel));
// add extension
dump_filename_.append(".dat");
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
{
@ -1137,7 +1137,7 @@ int32_t dll_pll_veml_tracking_fpga::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
@ -1208,7 +1208,7 @@ int32_t dll_pll_veml_tracking_fpga::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;
}
@ -1596,11 +1596,11 @@ int dll_pll_veml_tracking_fpga::general_work(int noutput_items __attribute__((un
<< ". PULL-IN Code Phase [samples] = " << d_acq_code_phase_samples;
// DEBUG OUTPUT
std::cout << "Tracking of " << d_systemName << " " << d_signal_pretty_name << " signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(d_systemName, d_acquisition_gnss_synchro->PRN) << std::endl;
std::cout << "Tracking of " << d_systemName << " " << d_signal_pretty_name << " signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(d_systemName, d_acquisition_gnss_synchro->PRN) << '\n';
DLOG(INFO) << "Starting tracking of satellite " << Gnss_Satellite(d_systemName, d_acquisition_gnss_synchro->PRN) << " on channel " << d_channel;
// DLOG(INFO) << "Number of samples between Acquisition and Tracking = " << acq_trk_diff_samples << " ( " << acq_trk_diff_seconds << " s)";
// std::cout << "Number of samples between Acquisition and Tracking = " << acq_trk_diff_samples << " ( " << acq_trk_diff_seconds << " s)" << std::endl;
// std::cout << "Number of samples between Acquisition and Tracking = " << acq_trk_diff_samples << " ( " << acq_trk_diff_seconds << " s)\n";
// DLOG(INFO) << "PULL-IN Doppler [Hz] = " << d_carrier_doppler_hz
// << ". PULL-IN Code Phase [samples] = " << d_acq_code_phase_samples;
@ -1634,7 +1634,7 @@ int dll_pll_veml_tracking_fpga::general_work(int noutput_items __attribute__((un
{
d_carrier_lock_fail_counter = 300000; // force loss-of-lock condition
LOG(INFO) << d_systemName << " " << d_signal_pretty_name << " tracking synchronization time limit reached in channel " << d_channel
<< " for satellite " << Gnss_Satellite(d_systemName, d_acquisition_gnss_synchro->PRN) << std::endl;
<< " for satellite " << Gnss_Satellite(d_systemName, d_acquisition_gnss_synchro->PRN) << '\n';
}
// Check lock status
@ -1672,9 +1672,9 @@ int dll_pll_veml_tracking_fpga::general_work(int noutput_items __attribute__((un
if (next_state)
{
LOG(INFO) << d_systemName << " " << d_signal_pretty_name << " secondary code locked in channel " << d_channel
<< " for satellite " << Gnss_Satellite(d_systemName, d_acquisition_gnss_synchro->PRN) << std::endl;
<< " for satellite " << Gnss_Satellite(d_systemName, d_acquisition_gnss_synchro->PRN) << '\n';
std::cout << d_systemName << " " << d_signal_pretty_name << " secondary code locked in channel " << d_channel
<< " for satellite " << Gnss_Satellite(d_systemName, d_acquisition_gnss_synchro->PRN) << std::endl;
<< " for satellite " << Gnss_Satellite(d_systemName, d_acquisition_gnss_synchro->PRN) << '\n';
}
}
}
@ -1688,9 +1688,9 @@ int dll_pll_veml_tracking_fpga::general_work(int noutput_items __attribute__((un
if (next_state)
{
LOG(INFO) << d_systemName << " " << d_signal_pretty_name << " tracking bit synchronization locked in channel " << d_channel
<< " for satellite " << Gnss_Satellite(d_systemName, d_acquisition_gnss_synchro->PRN) << std::endl;
<< " for satellite " << Gnss_Satellite(d_systemName, d_acquisition_gnss_synchro->PRN) << '\n';
std::cout << d_systemName << " " << d_signal_pretty_name << " tracking bit synchronization locked in channel " << d_channel
<< " for satellite " << Gnss_Satellite(d_systemName, d_acquisition_gnss_synchro->PRN) << std::endl;
<< " for satellite " << Gnss_Satellite(d_systemName, d_acquisition_gnss_synchro->PRN) << '\n';
}
}
}
@ -1757,7 +1757,7 @@ int dll_pll_veml_tracking_fpga::general_work(int noutput_items __attribute__((un
<< " for satellite " << Gnss_Satellite(d_systemName, d_acquisition_gnss_synchro->PRN);
std::cout << "Enabled " << d_trk_parameters.extend_correlation_symbols * static_cast<int32_t>(d_code_period * 1000.0) << " ms extended correlator in channel "
<< d_channel
<< " for satellite " << Gnss_Satellite(d_systemName, d_acquisition_gnss_synchro->PRN) << std::endl;
<< " for satellite " << Gnss_Satellite(d_systemName, d_acquisition_gnss_synchro->PRN) << '\n';
// Set narrow taps delay values [chips]
d_code_loop_filter.set_update_interval(d_current_correlation_time_s);
d_code_loop_filter.set_noise_bandwidth(d_trk_parameters.dll_bw_narrow_hz);

View File

@ -202,7 +202,7 @@ void Galileo_E1_Tcp_Connector_Tracking_cc::start_tracking()
sys = sys_.substr(0, 1);
// DEBUG OUTPUT
std::cout << "Tracking of Galileo E1 signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << std::endl;
std::cout << "Tracking of Galileo E1 signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << '\n';
LOG(INFO) << "Tracking of Galileo E1 signal for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << " on channel " << d_channel;
// enable tracking
@ -414,7 +414,7 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attri
}
if (d_carrier_lock_fail_counter > FLAGS_max_lock_fail)
{
std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl;
std::cout << "Loss of lock in channel " << d_channel << "!\n";
LOG(INFO) << "Loss of lock in channel " << d_channel << "!";
this->message_port_pub(pmt::mp("events"), pmt::from_long(3)); // 3 -> loss of lock

View File

@ -290,7 +290,7 @@ void glonass_l1_ca_dll_pll_c_aid_tracking_cc::start_tracking()
sys = sys_.substr(0, 1);
// DEBUG OUTPUT
std::cout << "Tracking of GLONASS L1 C/A signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << std::endl;
std::cout << "Tracking of GLONASS L1 C/A signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << '\n';
LOG(INFO) << "Tracking of GLONASS L1 C/A signal for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << " on channel " << d_channel;
// enable tracking
@ -334,7 +334,7 @@ glonass_l1_ca_dll_pll_c_aid_tracking_cc::~glonass_l1_ca_dll_pll_c_aid_tracking_c
}
if (d_channel == 0)
{
std::cout << " done." << std::endl;
std::cout << " done.\n";
}
}
@ -365,7 +365,7 @@ int32_t glonass_l1_ca_dll_pll_c_aid_tracking_cc::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
@ -429,7 +429,7 @@ int32_t glonass_l1_ca_dll_pll_c_aid_tracking_cc::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;
}
@ -535,7 +535,7 @@ void glonass_l1_ca_dll_pll_c_aid_tracking_cc::set_channel(uint32_t channel)
d_dump_filename.append(".dat");
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);
LOG(INFO) << "Tracking dump enabled on channel " << d_channel << " Log file: " << d_dump_filename.c_str() << std::endl;
LOG(INFO) << "Tracking dump enabled on channel " << d_channel << " Log file: " << d_dump_filename.c_str() << '\n';
}
catch (const std::ifstream::failure &e)
{
@ -622,7 +622,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at
{
// compute coherent integration and enable tracking loop
// perform coherent integration using correlator output history
// std::cout<<"##### RESET COHERENT INTEGRATION ####"<<std::endl;
// std::cout<<"##### RESET COHERENT INTEGRATION ####\n";
d_correlator_outs[0] = gr_complex(0.0, 0.0);
d_correlator_outs[1] = gr_complex(0.0, 0.0);
d_correlator_outs[2] = gr_complex(0.0, 0.0);
@ -639,8 +639,8 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at
d_carrier_loop_filter.set_params(10.0, d_pll_bw_narrow_hz, 2);
d_preamble_synchronized = true;
std::cout << "Enabled " << d_extend_correlation_ms << " [ms] extended correlator for CH " << d_channel << " : Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN)
<< " pll_bw = " << d_pll_bw_hz << " [Hz], pll_narrow_bw = " << d_pll_bw_narrow_hz << " [Hz]" << std::endl
<< " dll_bw = " << d_dll_bw_hz << " [Hz], dll_narrow_bw = " << d_dll_bw_narrow_hz << " [Hz]" << std::endl;
<< " pll_bw = " << d_pll_bw_hz << " [Hz], pll_narrow_bw = " << d_pll_bw_narrow_hz << " [Hz]\n"
<< " dll_bw = " << d_dll_bw_hz << " [Hz], dll_narrow_bw = " << d_dll_bw_narrow_hz << " [Hz]\n";
}
// UPDATE INTEGRATION TIME
CURRENT_INTEGRATION_TIME_S = static_cast<double>(d_extend_correlation_ms) * GLONASS_L1_CA_CODE_PERIOD_S;
@ -772,7 +772,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at
}
if (d_carrier_lock_fail_counter > FLAGS_max_lock_fail)
{
std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl;
std::cout << "Loss of lock in channel " << d_channel << "!\n";
LOG(INFO) << "Loss of lock in channel " << d_channel << "!";
this->message_port_pub(pmt::mp("events"), pmt::from_long(3)); // 3 -> loss of lock
d_carrier_lock_fail_counter = 0;

View File

@ -289,7 +289,7 @@ void glonass_l1_ca_dll_pll_c_aid_tracking_sc::start_tracking()
sys = sys_.substr(0, 1);
// DEBUG OUTPUT
std::cout << "Tracking of GLONASS L1 C/A signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << std::endl;
std::cout << "Tracking of GLONASS L1 C/A signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << '\n';
LOG(INFO) << "Tracking of GLONASS L1 C/A signal for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << " on channel " << d_channel;
// enable tracking
@ -320,7 +320,7 @@ int32_t glonass_l1_ca_dll_pll_c_aid_tracking_sc::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
@ -384,7 +384,7 @@ int32_t glonass_l1_ca_dll_pll_c_aid_tracking_sc::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;
}
@ -506,7 +506,7 @@ glonass_l1_ca_dll_pll_c_aid_tracking_sc::~glonass_l1_ca_dll_pll_c_aid_tracking_s
if (d_channel == 0)
{
std::cout << " done." << std::endl;
std::cout << " done.\n";
}
}
@ -536,7 +536,7 @@ void glonass_l1_ca_dll_pll_c_aid_tracking_sc::set_channel(uint32_t channel)
d_dump_filename.append(".dat");
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);
LOG(INFO) << "Tracking dump enabled on channel " << d_channel << " Log file: " << d_dump_filename.c_str() << std::endl;
LOG(INFO) << "Tracking dump enabled on channel " << d_channel << " Log file: " << d_dump_filename.c_str() << '\n';
}
catch (const std::ifstream::failure &e)
{
@ -623,7 +623,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at
{
// compute coherent integration and enable tracking loop
// perform coherent integration using correlator output history
// std::cout<<"##### RESET COHERENT INTEGRATION ####"<<std::endl;
// std::cout<<"##### RESET COHERENT INTEGRATION ####\n";
d_correlator_outs_16sc[0] = lv_cmake(0, 0);
d_correlator_outs_16sc[1] = lv_cmake(0, 0);
d_correlator_outs_16sc[2] = lv_cmake(0, 0);
@ -640,8 +640,8 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at
d_carrier_loop_filter.set_params(10.0, d_pll_bw_narrow_hz, 2);
d_preamble_synchronized = true;
std::cout << "Enabled " << d_extend_correlation_ms << " [ms] extended correlator for CH " << d_channel << " : Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN)
<< " pll_bw = " << d_pll_bw_hz << " [Hz], pll_narrow_bw = " << d_pll_bw_narrow_hz << " [Hz]" << std::endl
<< " dll_bw = " << d_dll_bw_hz << " [Hz], dll_narrow_bw = " << d_dll_bw_narrow_hz << " [Hz]" << std::endl;
<< " pll_bw = " << d_pll_bw_hz << " [Hz], pll_narrow_bw = " << d_pll_bw_narrow_hz << " [Hz]\n"
<< " dll_bw = " << d_dll_bw_hz << " [Hz], dll_narrow_bw = " << d_dll_bw_narrow_hz << " [Hz]\n";
}
// UPDATE INTEGRATION TIME
CURRENT_INTEGRATION_TIME_S = static_cast<double>(d_extend_correlation_ms) * GLONASS_L1_CA_CODE_PERIOD_S;
@ -771,7 +771,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at
}
if (d_carrier_lock_fail_counter > FLAGS_max_lock_fail)
{
std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl;
std::cout << "Loss of lock in channel " << d_channel << "!\n";
LOG(INFO) << "Loss of lock in channel " << d_channel << "!";
this->message_port_pub(pmt::mp("events"), pmt::from_long(3)); // 3 -> loss of lock
d_carrier_lock_fail_counter = 0;

View File

@ -232,7 +232,7 @@ void Glonass_L1_Ca_Dll_Pll_Tracking_cc::start_tracking()
sys = sys_.substr(0, 1);
// DEBUG OUTPUT
std::cout << "Tracking of GLONASS L1 C/A signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << std::endl;
std::cout << "Tracking of GLONASS L1 C/A signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << '\n';
LOG(INFO) << "Tracking of GLONASS L1 C/A signal for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << " on channel " << d_channel;
// enable tracking
@ -275,7 +275,7 @@ Glonass_L1_Ca_Dll_Pll_Tracking_cc::~Glonass_L1_Ca_Dll_Pll_Tracking_cc()
if (d_channel == 0)
{
std::cout << " done." << std::endl;
std::cout << " done.\n";
}
}
try
@ -305,7 +305,7 @@ int32_t Glonass_L1_Ca_Dll_Pll_Tracking_cc::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
@ -369,7 +369,7 @@ int32_t Glonass_L1_Ca_Dll_Pll_Tracking_cc::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;
}
@ -619,7 +619,7 @@ int Glonass_L1_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut
}
if (d_carrier_lock_fail_counter > FLAGS_max_lock_fail)
{
std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl;
std::cout << "Loss of lock in channel " << d_channel << "!\n";
LOG(INFO) << "Loss of lock in channel " << d_channel << "!";
this->message_port_pub(pmt::mp("events"), pmt::from_long(3)); // 3 -> loss of lock
d_carrier_lock_fail_counter = 0;

View File

@ -286,7 +286,7 @@ void glonass_l2_ca_dll_pll_c_aid_tracking_cc::start_tracking()
sys = sys_.substr(0, 1);
// DEBUG OUTPUT
std::cout << "Tracking of GLONASS L2 C/A signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << std::endl;
std::cout << "Tracking of GLONASS L2 C/A signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << '\n';
LOG(INFO) << "Tracking of GLONASS L2 C/A signal for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << " on channel " << d_channel;
// enable tracking
@ -331,7 +331,7 @@ glonass_l2_ca_dll_pll_c_aid_tracking_cc::~glonass_l2_ca_dll_pll_c_aid_tracking_c
if (d_channel == 0)
{
std::cout << " done." << std::endl;
std::cout << " done.\n";
}
}
@ -362,7 +362,7 @@ int32_t glonass_l2_ca_dll_pll_c_aid_tracking_cc::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
@ -426,7 +426,7 @@ int32_t glonass_l2_ca_dll_pll_c_aid_tracking_cc::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;
}
@ -532,7 +532,7 @@ void glonass_l2_ca_dll_pll_c_aid_tracking_cc::set_channel(uint32_t channel)
d_dump_filename.append(".dat");
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);
LOG(INFO) << "Tracking dump enabled on channel " << d_channel << " Log file: " << d_dump_filename.c_str() << std::endl;
LOG(INFO) << "Tracking dump enabled on channel " << d_channel << " Log file: " << d_dump_filename.c_str() << '\n';
}
catch (const std::ifstream::failure &e)
{
@ -619,7 +619,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at
{
// compute coherent integration and enable tracking loop
// perform coherent integration using correlator output history
// std::cout<<"##### RESET COHERENT INTEGRATION ####"<<std::endl;
// std::cout<<"##### RESET COHERENT INTEGRATION ####\n";
d_correlator_outs[0] = gr_complex(0.0, 0.0);
d_correlator_outs[1] = gr_complex(0.0, 0.0);
d_correlator_outs[2] = gr_complex(0.0, 0.0);
@ -636,8 +636,8 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at
d_carrier_loop_filter.set_params(10.0, d_pll_bw_narrow_hz, 2);
d_preamble_synchronized = true;
std::cout << "Enabled " << d_extend_correlation_ms << " [ms] extended correlator for CH " << d_channel << " : Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN)
<< " pll_bw = " << d_pll_bw_hz << " [Hz], pll_narrow_bw = " << d_pll_bw_narrow_hz << " [Hz]" << std::endl
<< " dll_bw = " << d_dll_bw_hz << " [Hz], dll_narrow_bw = " << d_dll_bw_narrow_hz << " [Hz]" << std::endl;
<< " pll_bw = " << d_pll_bw_hz << " [Hz], pll_narrow_bw = " << d_pll_bw_narrow_hz << " [Hz]\n"
<< " dll_bw = " << d_dll_bw_hz << " [Hz], dll_narrow_bw = " << d_dll_bw_narrow_hz << " [Hz]\n";
}
// UPDATE INTEGRATION TIME
CURRENT_INTEGRATION_TIME_S = static_cast<double>(d_extend_correlation_ms) * GLONASS_L2_CA_CODE_PERIOD_S;
@ -769,7 +769,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at
}
if (d_carrier_lock_fail_counter > FLAGS_max_lock_fail)
{
std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl;
std::cout << "Loss of lock in channel " << d_channel << "!\n";
LOG(INFO) << "Loss of lock in channel " << d_channel << "!";
this->message_port_pub(pmt::mp("events"), pmt::from_long(3)); // 3 -> loss of lock
d_carrier_lock_fail_counter = 0;

View File

@ -287,7 +287,7 @@ void glonass_l2_ca_dll_pll_c_aid_tracking_sc::start_tracking()
sys = sys_.substr(0, 1);
// DEBUG OUTPUT
std::cout << "Tracking of GLONASS L2 C/A signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << std::endl;
std::cout << "Tracking of GLONASS L2 C/A signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << '\n';
LOG(INFO) << "Tracking of GLONASS L2 C/A signal for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << " on channel " << d_channel;
// enable tracking
@ -318,7 +318,7 @@ int32_t glonass_l2_ca_dll_pll_c_aid_tracking_sc::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
@ -382,7 +382,7 @@ int32_t glonass_l2_ca_dll_pll_c_aid_tracking_sc::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;
}
@ -504,7 +504,7 @@ glonass_l2_ca_dll_pll_c_aid_tracking_sc::~glonass_l2_ca_dll_pll_c_aid_tracking_s
if (d_channel == 0)
{
std::cout << " done." << std::endl;
std::cout << " done.\n";
}
}
@ -534,7 +534,7 @@ void glonass_l2_ca_dll_pll_c_aid_tracking_sc::set_channel(uint32_t channel)
d_dump_filename.append(".dat");
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);
LOG(INFO) << "Tracking dump enabled on channel " << d_channel << " Log file: " << d_dump_filename.c_str() << std::endl;
LOG(INFO) << "Tracking dump enabled on channel " << d_channel << " Log file: " << d_dump_filename.c_str() << '\n';
}
catch (const std::ifstream::failure &e)
{
@ -621,7 +621,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at
{
// compute coherent integration and enable tracking loop
// perform coherent integration using correlator output history
// std::cout<<"##### RESET COHERENT INTEGRATION ####"<<std::endl;
// std::cout<<"##### RESET COHERENT INTEGRATION ####\n";
d_correlator_outs_16sc[0] = lv_cmake(0, 0);
d_correlator_outs_16sc[1] = lv_cmake(0, 0);
d_correlator_outs_16sc[2] = lv_cmake(0, 0);
@ -638,8 +638,8 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at
d_carrier_loop_filter.set_params(10.0, d_pll_bw_narrow_hz, 2);
d_preamble_synchronized = true;
std::cout << "Enabled " << d_extend_correlation_ms << " [ms] extended correlator for CH " << d_channel << " : Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN)
<< " pll_bw = " << d_pll_bw_hz << " [Hz], pll_narrow_bw = " << d_pll_bw_narrow_hz << " [Hz]" << std::endl
<< " dll_bw = " << d_dll_bw_hz << " [Hz], dll_narrow_bw = " << d_dll_bw_narrow_hz << " [Hz]" << std::endl;
<< " pll_bw = " << d_pll_bw_hz << " [Hz], pll_narrow_bw = " << d_pll_bw_narrow_hz << " [Hz]\n"
<< " dll_bw = " << d_dll_bw_hz << " [Hz], dll_narrow_bw = " << d_dll_bw_narrow_hz << " [Hz]\n";
}
// UPDATE INTEGRATION TIME
CURRENT_INTEGRATION_TIME_S = static_cast<double>(d_extend_correlation_ms) * GLONASS_L2_CA_CODE_PERIOD_S;
@ -769,7 +769,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at
}
if (d_carrier_lock_fail_counter > FLAGS_max_lock_fail)
{
std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl;
std::cout << "Loss of lock in channel " << d_channel << "!\n";
LOG(INFO) << "Loss of lock in channel " << d_channel << "!";
this->message_port_pub(pmt::mp("events"), pmt::from_long(3)); // 3 -> loss of lock
d_carrier_lock_fail_counter = 0;

View File

@ -233,7 +233,7 @@ void Glonass_L2_Ca_Dll_Pll_Tracking_cc::start_tracking()
sys = sys_.substr(0, 1);
// DEBUG OUTPUT
std::cout << "Tracking of GLONASS L2 C/A signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << std::endl;
std::cout << "Tracking of GLONASS L2 C/A signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << '\n';
LOG(INFO) << "Tracking of GLONASS L2 C/A signal for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << " on channel " << d_channel;
// enable tracking
@ -276,7 +276,7 @@ Glonass_L2_Ca_Dll_Pll_Tracking_cc::~Glonass_L2_Ca_Dll_Pll_Tracking_cc()
if (d_channel == 0)
{
std::cout << " done." << std::endl;
std::cout << " done.\n";
}
}
try
@ -306,7 +306,7 @@ int32_t Glonass_L2_Ca_Dll_Pll_Tracking_cc::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
@ -370,7 +370,7 @@ int32_t Glonass_L2_Ca_Dll_Pll_Tracking_cc::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;
}
@ -620,7 +620,7 @@ int Glonass_L2_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut
}
if (d_carrier_lock_fail_counter > FLAGS_max_lock_fail)
{
std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl;
std::cout << "Loss of lock in channel " << d_channel << "!\n";
LOG(INFO) << "Loss of lock in channel " << d_channel << "!";
this->message_port_pub(pmt::mp("events"), pmt::from_long(3)); // 3 -> loss of lock
d_carrier_lock_fail_counter = 0;

View File

@ -228,7 +228,7 @@ void Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::start_tracking()
sys = sys_.substr(0, 1);
// DEBUG OUTPUT
std::cout << "Tracking of GPS L1 C/A signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << std::endl;
std::cout << "Tracking of GPS L1 C/A signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << '\n';
LOG(INFO) << "Tracking of GPS L1 C/A signal for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << " on channel " << d_channel;
// enable tracking
@ -354,7 +354,7 @@ int Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::general_work(int noutput_items __attribut
static_cast<float>(d_rem_code_phase_chips),
d_correlation_length_samples, d_n_correlator_taps);
cudaProfilerStop();
// std::cout<<"c_out[0]="<<d_correlator_outs[0]<<"c_out[1]="<<d_correlator_outs[1]<<"c_out[2]="<<d_correlator_outs[2]<<std::endl;
// std::cout<<"c_out[0]="<<d_correlator_outs[0]<<"c_out[1]="<<d_correlator_outs[1]<<"c_out[2]="<<d_correlator_outs[2]<< '\n';
// UPDATE INTEGRATION TIME
CURRENT_INTEGRATION_TIME_S = static_cast<double>(d_correlation_length_samples) / static_cast<double>(d_fs_in);
@ -440,7 +440,7 @@ int Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::general_work(int noutput_items __attribut
}
if (d_carrier_lock_fail_counter > FLAGS_max_lock_fail)
{
std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl;
std::cout << "Loss of lock in channel " << d_channel << "!\n";
LOG(INFO) << "Loss of lock in channel " << d_channel << "!";
this->message_port_pub(pmt::mp("events"), pmt::from_long(3)); // 3 -> loss of lock
d_carrier_lock_fail_counter = 0;

View File

@ -329,7 +329,7 @@ void Gps_L1_Ca_Kf_Tracking_cc::start_tracking()
sys = sys_.substr(0, 1);
// DEBUG OUTPUT
std::cout << "Tracking of GPS L1 C/A signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << std::endl;
std::cout << "Tracking of GPS L1 C/A signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << '\n';
LOG(INFO) << "Starting tracking of satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << " on channel " << d_channel;
// enable tracking
@ -372,7 +372,7 @@ Gps_L1_Ca_Kf_Tracking_cc::~Gps_L1_Ca_Kf_Tracking_cc()
if (d_channel == 0)
{
std::cout << " done." << std::endl;
std::cout << " done.\n";
}
}
try
@ -402,7 +402,7 @@ int32_t Gps_L1_Ca_Kf_Tracking_cc::save_matfile()
}
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
@ -474,7 +474,7 @@ int32_t Gps_L1_Ca_Kf_Tracking_cc::save_matfile()
}
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;
}
@ -782,7 +782,7 @@ int Gps_L1_Ca_Kf_Tracking_cc::general_work(int noutput_items __attribute__((unus
if (d_carrier_lock_test < d_carrier_lock_threshold or d_CN0_SNV_dB_Hz < FLAGS_cn0_min)
{
// if (d_channel == 1)
// std::cout << "Carrier Lock Test Fail in channel " << d_channel << ": " << d_carrier_lock_test << " < " << d_carrier_lock_threshold << "," << nfail++ << std::endl;
// std::cout << "Carrier Lock Test Fail in channel " << d_channel << ": " << d_carrier_lock_test << " < " << d_carrier_lock_threshold << "," << nfail++ << '\n';
d_carrier_lock_fail_counter++;
// nfail++;
}
@ -795,7 +795,7 @@ int Gps_L1_Ca_Kf_Tracking_cc::general_work(int noutput_items __attribute__((unus
}
if (d_carrier_lock_fail_counter > FLAGS_max_lock_fail)
{
std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl;
std::cout << "Loss of lock in channel " << d_channel << "!\n";
LOG(INFO) << "Loss of lock in channel " << d_channel << "!";
this->message_port_pub(pmt::mp("events"), pmt::from_long(3)); // 3 -> loss of lock
d_carrier_lock_fail_counter = 0;

View File

@ -174,7 +174,7 @@ void Gps_L1_Ca_Tcp_Connector_Tracking_cc::start_tracking()
int64_t acq_trk_diff_samples;
float acq_trk_diff_seconds;
acq_trk_diff_samples = static_cast<int64_t>(d_sample_counter) - static_cast<int64_t>(d_acq_sample_stamp);
std::cout << "acq_trk_diff_samples=" << acq_trk_diff_samples << std::endl;
std::cout << "acq_trk_diff_samples=" << acq_trk_diff_samples << '\n';
acq_trk_diff_seconds = static_cast<float>(acq_trk_diff_samples) / static_cast<float>(d_fs_in);
// doppler effect
// Fd=(C/(C+Vr))*F
@ -229,7 +229,7 @@ void Gps_L1_Ca_Tcp_Connector_Tracking_cc::start_tracking()
sys = sys_.substr(0, 1);
// DEBUG OUTPUT
std::cout << "Tracking of GPS L1 C/A signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << std::endl;
std::cout << "Tracking of GPS L1 C/A signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << '\n';
LOG(INFO) << "Tracking of GPS L1 C/A signal for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << " on channel " << d_channel;
// enable tracking
@ -448,7 +448,7 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attrib
}
if (d_carrier_lock_fail_counter > FLAGS_max_lock_fail)
{
std::cout << "Loss of lock in channel " << d_channel << "!" << std::endl;
std::cout << "Loss of lock in channel " << d_channel << "!\n";
LOG(INFO) << "Loss of lock in channel " << d_channel << "!";
this->message_port_pub(pmt::mp("events"), pmt::from_long(3)); // 3 -> loss of lock
d_carrier_lock_fail_counter = 0;

View File

@ -178,8 +178,8 @@ void Fpga_Multicorrelator_8sc::Carrier_wipeoff_multicorrelator_resampler(
nb = read(d_device_descriptor, &irq_count, sizeof(irq_count));
if (nb != sizeof(irq_count))
{
std::cout << "Tracking_module Read failed to retrieve 4 bytes!" << std::endl;
std::cout << "Tracking_module Interrupt number " << irq_count << std::endl;
std::cout << "Tracking_module Read failed to retrieve 4 bytes!\n";
std::cout << "Tracking_module Interrupt number " << irq_count << '\n';
}
// release secondary code indices, keep channel locked
@ -222,12 +222,12 @@ void Fpga_Multicorrelator_8sc::set_channel(uint32_t channel)
mergedname.copy(device_io_name, mergedname.size() + 1);
device_io_name[mergedname.size()] = '\0';
std::cout << "trk device_io_name = " << device_io_name << std::endl;
std::cout << "trk device_io_name = " << device_io_name << '\n';
if ((d_device_descriptor = open(device_io_name, O_RDWR | O_SYNC)) == -1)
{
LOG(WARNING) << "Cannot open deviceio" << device_io_name;
std::cout << "Cannot open deviceio" << device_io_name << std::endl;
std::cout << "Cannot open deviceio" << device_io_name << '\n';
}
d_map_base = reinterpret_cast<volatile uint32_t *>(mmap(nullptr, page_size,
PROT_READ | PROT_WRITE, MAP_SHARED, d_device_descriptor, 0));
@ -236,7 +236,7 @@ void Fpga_Multicorrelator_8sc::set_channel(uint32_t channel)
{
LOG(WARNING) << "Cannot map the FPGA tracking module "
<< d_channel << "into user memory";
std::cout << "Cannot map deviceio" << device_io_name << std::endl;
std::cout << "Cannot map deviceio" << device_io_name << '\n';
}
// sanity check: check test register
@ -246,7 +246,7 @@ void Fpga_Multicorrelator_8sc::set_channel(uint32_t channel)
if (writeval != readval)
{
LOG(WARNING) << "Test register sanity check failed";
std::cout << "Tracking test register sanity check failed" << std::endl;
std::cout << "Tracking test register sanity check failed\n";
}
else
{
@ -395,7 +395,7 @@ void Fpga_Multicorrelator_8sc::fpga_launch_multicorrelator_fpga()
ssize_t nbytes = TEMP_FAILURE_RETRY(write(d_device_descriptor, reinterpret_cast<void *>(&reenable), sizeof(int32_t)));
if (nbytes != sizeof(int32_t))
{
std::cerr << "Error launching the FPGA multicorrelator" << std::endl;
std::cerr << "Error launching the FPGA multicorrelator\n";
}
// writing 1 to reg 14 launches the tracking
d_map_base[start_flag_addr] = 1;
@ -436,7 +436,7 @@ void Fpga_Multicorrelator_8sc::close_device()
auto *aux = const_cast<uint32_t *>(d_map_base);
if (munmap(static_cast<void *>(aux), page_size) == -1)
{
std::cout << "Failed to unmap memory uio" << std::endl;
std::cout << "Failed to unmap memory uio\n";
}
close(d_device_descriptor);
}

View File

@ -38,7 +38,7 @@ int Tcp_Communication::listen_tcp_connection(size_t d_port_, size_t d_port_ch0_)
if (d_port_ == d_port_ch0_)
{
std::cout << "Server ready. Listening for TCP connections..." << std::endl;
std::cout << "Server ready. Listening for TCP connections...\n";
}
// Reuse the IP address for each connection
@ -48,12 +48,12 @@ int Tcp_Communication::listen_tcp_connection(size_t d_port_, size_t d_port_ch0_)
acceptor.listen(12);
acceptor.accept(tcp_socket_);
std::cout << "Socket accepted on port " << d_port_ << std::endl;
std::cout << "Socket accepted on port " << d_port_ << '\n';
}
catch (const std::exception& e)
{
std::cerr << "Exception: " << e.what() << std::endl;
std::cerr << "Exception: " << e.what() << '\n';
}
return false;
@ -88,7 +88,7 @@ void Tcp_Communication::send_receive_tcp_packet_galileo_e1(boost::array<float, N
catch (const std::exception& e)
{
std::cerr << "Exception: " << e.what() << ". Please press Ctrl+C to end the program." << std::endl;
std::cerr << "Exception: " << e.what() << ". Please press Ctrl+C to end the program.\n";
std::cin >> controlc;
}
}
@ -122,7 +122,7 @@ void Tcp_Communication::send_receive_tcp_packet_gps_l1_ca(boost::array<float, NU
catch (const std::exception& e)
{
std::cerr << "Exception: " << e.what() << ". Please press Ctrl+C to end the program." << std::endl;
std::cerr << "Exception: " << e.what() << ". Please press Ctrl+C to end the program.\n";
std::cin >> controlc;
}
}
@ -132,5 +132,5 @@ void Tcp_Communication::close_tcp_connection(size_t d_port_)
{
// Close the TCP connection
tcp_socket_.close();
std::cout << "Socket closed on port " << d_port_ << std::endl;
std::cout << "Socket closed on port " << d_port_ << '\n';
}

View File

@ -74,12 +74,12 @@ void channel_status_msg_receiver::msg_handler_events(const pmt::pmt_t& msg)
d_channel_status_map.erase(gnss_synchro_obj->Channel_ID);
}
// std::cout << "-------- " << std::endl << std::endl;
// std::cout << "-------- \n" << '\n';
// for (std::map<int, std::shared_ptr<Gnss_Synchro>>::iterator it = d_channel_status_map.begin(); it != d_channel_status_map.end(); ++it)
// {
// std::cout << " Channel: " << it->first << " => Doppler: " << it->second->Carrier_Doppler_hz << "[Hz] " << std::endl;
// std::cout << " Channel: " << it->first << " => Doppler: " << it->second->Carrier_Doppler_hz << "[Hz] \n";
// }
// std::cout << "-------- " << std::endl << std::endl;
// std::cout << "-------- \n" << '\n';
}
else if (pmt::any_ref(msg).type() == typeid(std::shared_ptr<Monitor_Pvt>))
{
@ -88,9 +88,9 @@ void channel_status_msg_receiver::msg_handler_events(const pmt::pmt_t& msg)
monitor_pvt_obj = boost::any_cast<std::shared_ptr<Monitor_Pvt>>(pmt::any_ref(msg));
d_pvt_status = *monitor_pvt_obj.get();
// std::cout << "-------- " << std::endl << std::endl;
// std::cout << "PVT TOW: " << d_pvt_status->TOW_at_current_symbol_ms << std::endl;
// std::cout << "-------- " << std::endl << std::endl;
// std::cout << "-------- \n" << '\n';
// std::cout << "PVT TOW: " << d_pvt_status->TOW_at_current_symbol_ms << '\n';
// std::cout << "-------- \n" << '\n';
}
else
{

View File

@ -27,7 +27,7 @@
#include <pmt/pmt_sugar.h> // for mp
#include <cmath> // for round
#include <fcntl.h> // for O_RDWR, libraries used by the GIPO
#include <iostream> // for operator<<, endl
#include <iostream> // for operator<<
#include <sys/mman.h> // libraries used by the GIPO
#include <unistd.h> // for write, close, read, ssize_t
@ -136,7 +136,7 @@ void gnss_sdr_fpga_sample_counter::open_device()
if ((fd = open(device_name.c_str(), O_RDWR | O_SYNC)) == -1)
{
LOG(WARNING) << "Cannot open deviceio" << device_name;
std::cout << "Counter-Intr: cannot open deviceio" << device_name << std::endl;
std::cout << "Counter-Intr: cannot open deviceio" << device_name << '\n';
}
map_base = reinterpret_cast<volatile uint32_t *>(mmap(nullptr, page_size,
PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0));
@ -144,7 +144,7 @@ void gnss_sdr_fpga_sample_counter::open_device()
if (map_base == reinterpret_cast<void *>(-1))
{
LOG(WARNING) << "Cannot map the FPGA acquisition module into user memory";
std::cout << "Counter-Intr: cannot map deviceio" << device_name << std::endl;
std::cout << "Counter-Intr: cannot map deviceio" << device_name << '\n';
}
// sanity check : check test register
@ -158,7 +158,7 @@ void gnss_sdr_fpga_sample_counter::open_device()
else
{
LOG(INFO) << "Acquisition test register sanity check success!";
// std::cout << "Acquisition test register sanity check success!" << std::endl;
// std::cout << "Acquisition test register sanity check success!\n";
}
}
@ -170,7 +170,7 @@ void gnss_sdr_fpga_sample_counter::close_device()
auto *aux = const_cast<uint32_t *>(map_base);
if (munmap(static_cast<void *>(aux), page_size) == -1)
{
std::cout << "Failed to unmap memory uio" << std::endl;
std::cout << "Failed to unmap memory uio\n";
}
close(fd);
}
@ -233,23 +233,23 @@ int gnss_sdr_fpga_sample_counter::general_work(int noutput_items __attribute__((
{
day = " days ";
}
std::cout << "Current receiver time: " << current_days << day << current_h << " h " << current_m << " min " << current_s << " s" << std::endl;
std::cout << "Current receiver time: " << current_days << day << current_h << " h " << current_m << " min " << current_s << " s\n";
}
else
{
if (flag_h)
{
std::cout << "Current receiver time: " << current_h << " h " << current_m << " min " << current_s << " s" << std::endl;
std::cout << "Current receiver time: " << current_h << " h " << current_m << " min " << current_s << " s\n";
}
else
{
if (flag_m)
{
std::cout << "Current receiver time: " << current_m << " min " << current_s << " s" << std::endl;
std::cout << "Current receiver time: " << current_m << " min " << current_s << " s\n";
}
else
{
std::cout << "Current receiver time: " << current_s << " s" << std::endl;
std::cout << "Current receiver time: " << current_s << " s\n";
}
}
}
@ -277,7 +277,7 @@ void gnss_sdr_fpga_sample_counter::wait_for_interrupt()
nb = read(fd, &irq_count, sizeof(irq_count));
if (nb != sizeof(irq_count))
{
std::cout << "fpga sample counter module read failed to retrieve 4 bytes!" << std::endl;
std::cout << "fpga sample counter module interrupt number " << irq_count << std::endl;
std::cout << "fpga sample counter module read failed to retrieve 4 bytes!\n";
std::cout << "fpga sample counter module interrupt number " << irq_count << '\n';
}
}

View File

@ -104,23 +104,23 @@ int gnss_sdr_sample_counter::work(int noutput_items __attribute__((unused)),
{
day = " days ";
}
std::cout << "Current receiver time: " << current_days << day << current_h << " h " << current_m << " min " << current_s << " s" << std::endl;
std::cout << "Current receiver time: " << current_days << day << current_h << " h " << current_m << " min " << current_s << " s\n";
}
else
{
if (flag_h)
{
std::cout << "Current receiver time: " << current_h << " h " << current_m << " min " << current_s << " s" << std::endl;
std::cout << "Current receiver time: " << current_h << " h " << current_m << " min " << current_s << " s\n";
}
else
{
if (flag_m)
{
std::cout << "Current receiver time: " << current_m << " min " << current_s << " s" << std::endl;
std::cout << "Current receiver time: " << current_m << " min " << current_s << " s\n";
}
else
{
std::cout << "Current receiver time: " << current_s << " s" << std::endl;
std::cout << "Current receiver time: " << current_s << " s\n";
}
}
}

View File

@ -888,7 +888,7 @@ bool Gnss_Sdr_Supl_Client::read_gal_almanac_from_gsa(const std::string& file_nam
}
catch (const std::exception& e)
{
std::cerr << e.what() << std::endl;
std::cerr << e.what() << '\n';
}
}
if (this->gal_almanac_map.empty())

View File

@ -87,23 +87,23 @@ int gnss_sdr_time_counter::general_work(int noutput_items __attribute__((unused)
{
day = " days ";
}
std::cout << "Current receiver time: " << current_days << day << current_h << " h " << current_m << " min " << current_s << " s" << std::endl;
std::cout << "Current receiver time: " << current_days << day << current_h << " h " << current_m << " min " << current_s << " s\n";
}
else
{
if (flag_h)
{
std::cout << "Current receiver time: " << current_h << " h " << current_m << " min " << current_s << " s" << std::endl;
std::cout << "Current receiver time: " << current_h << " h " << current_m << " min " << current_s << " s\n";
}
else
{
if (flag_m)
{
std::cout << "Current receiver time: " << current_m << " min " << current_s << " s" << std::endl;
std::cout << "Current receiver time: " << current_m << " min " << current_s << " s\n";
}
else
{
std::cout << "Current receiver time: " << current_s << " s" << std::endl;
std::cout << "Current receiver time: " << current_s << " s\n";
}
}
}

View File

@ -61,7 +61,7 @@
#include <chrono> // for milliseconds
#include <cmath> // for floor, fmod, log
#include <exception> // for exception
#include <iostream> // for operator<<, endl
#include <iostream> // for operator<<
#include <limits> // for numeric_limits
#include <map> // for map
#include <pthread.h> // for pthread_cancel
@ -114,7 +114,7 @@ void ControlThread::init()
}
catch (const boost::bad_lexical_cast &e)
{
std::cout << "Caught bad lexical cast with error " << e.what() << std::endl;
std::cout << "Caught bad lexical cast with error " << e.what() << '\n';
}
stop_ = false;
processed_control_messages_ = 0;
@ -154,7 +154,7 @@ void ControlThread::init()
}
else
{
std::cerr << "GNSS-SDR.AGNSS_ref_location=" << ref_location_str << " is not a valid position." << std::endl;
std::cerr << "GNSS-SDR.AGNSS_ref_location=" << ref_location_str << " is not a valid position.\n";
agnss_ref_location_.valid = false;
}
}
@ -180,12 +180,12 @@ void ControlThread::init()
}
else
{
std::cerr << "GNSS-SDR.AGNSS_ref_utc_time=" << ref_time_str << " is not well-formed. Please use four digits for the year: DD/MM/YYYY HH:MM:SS" << std::endl;
std::cerr << "GNSS-SDR.AGNSS_ref_utc_time=" << ref_time_str << " is not well-formed. Please use four digits for the year: DD/MM/YYYY HH:MM:SS\n";
}
}
else
{
std::cerr << "GNSS-SDR.AGNSS_ref_utc_time=" << ref_time_str << " is not well-formed. Should be DD/MM/YYYY HH:MM:SS in UTC" << std::endl;
std::cerr << "GNSS-SDR.AGNSS_ref_utc_time=" << ref_time_str << " is not well-formed. Should be DD/MM/YYYY HH:MM:SS in UTC\n";
agnss_ref_time_.valid = false;
}
}
@ -342,7 +342,7 @@ int ControlThread::run()
// call the new sat dispatcher and receiver controller
event_dispatcher(valid_event, msg);
}
std::cout << "Stopping GNSS-SDR, please wait!" << std::endl;
std::cout << "Stopping GNSS-SDR, please wait!\n";
flowgraph_->stop();
stop_ = true;
flowgraph_->disconnect();
@ -432,7 +432,7 @@ bool ControlThread::read_assistance_from_XML()
gps_almanac_xml_filename = configuration_->property("GNSS-SDR.AGNSS_gps_almanac_xml", gps_almanac_default_xml_filename_);
}
std::cout << "Trying to read GNSS ephemeris from XML file(s)..." << std::endl;
std::cout << "Trying to read GNSS ephemeris from XML file(s)...\n";
if (configuration_->property("Channels_1C.count", 0) > 0)
{
@ -443,7 +443,7 @@ bool ControlThread::read_assistance_from_XML()
gps_eph_iter != supl_client_ephemeris_.gps_ephemeris_map.cend();
gps_eph_iter++)
{
std::cout << "From XML file: Read NAV ephemeris for satellite " << Gnss_Satellite("GPS", gps_eph_iter->second.i_satellite_PRN) << std::endl;
std::cout << "From XML file: Read NAV ephemeris for satellite " << Gnss_Satellite("GPS", gps_eph_iter->second.i_satellite_PRN) << '\n';
std::shared_ptr<Gps_Ephemeris> tmp_obj = std::make_shared<Gps_Ephemeris>(gps_eph_iter->second);
flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj));
}
@ -454,7 +454,7 @@ bool ControlThread::read_assistance_from_XML()
{
std::shared_ptr<Gps_Utc_Model> tmp_obj = std::make_shared<Gps_Utc_Model>(supl_client_acquisition_.gps_utc);
flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj));
std::cout << "From XML file: Read GPS UTC model parameters." << std::endl;
std::cout << "From XML file: Read GPS UTC model parameters.\n";
ret = true;
}
@ -462,7 +462,7 @@ bool ControlThread::read_assistance_from_XML()
{
std::shared_ptr<Gps_Iono> tmp_obj = std::make_shared<Gps_Iono>(supl_client_acquisition_.gps_iono);
flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj));
std::cout << "From XML file: Read GPS ionosphere model parameters." << std::endl;
std::cout << "From XML file: Read GPS ionosphere model parameters.\n";
ret = true;
}
@ -473,7 +473,7 @@ bool ControlThread::read_assistance_from_XML()
gps_alm_iter != supl_client_ephemeris_.gps_almanac_map.cend();
gps_alm_iter++)
{
std::cout << "From XML file: Read GPS almanac for satellite " << Gnss_Satellite("GPS", gps_alm_iter->second.i_satellite_PRN) << std::endl;
std::cout << "From XML file: Read GPS almanac for satellite " << Gnss_Satellite("GPS", gps_alm_iter->second.i_satellite_PRN) << '\n';
std::shared_ptr<Gps_Almanac> tmp_obj = std::make_shared<Gps_Almanac>(gps_alm_iter->second);
flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj));
}
@ -490,7 +490,7 @@ bool ControlThread::read_assistance_from_XML()
gal_eph_iter != supl_client_ephemeris_.gal_ephemeris_map.cend();
gal_eph_iter++)
{
std::cout << "From XML file: Read ephemeris for satellite " << Gnss_Satellite("Galileo", gal_eph_iter->second.i_satellite_PRN) << std::endl;
std::cout << "From XML file: Read ephemeris for satellite " << Gnss_Satellite("Galileo", gal_eph_iter->second.i_satellite_PRN) << '\n';
std::shared_ptr<Galileo_Ephemeris> tmp_obj = std::make_shared<Galileo_Ephemeris>(gal_eph_iter->second);
flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj));
}
@ -501,7 +501,7 @@ bool ControlThread::read_assistance_from_XML()
{
std::shared_ptr<Galileo_Iono> tmp_obj = std::make_shared<Galileo_Iono>(supl_client_acquisition_.gal_iono);
flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj));
std::cout << "From XML file: Read Galileo ionosphere model parameters." << std::endl;
std::cout << "From XML file: Read Galileo ionosphere model parameters.\n";
ret = true;
}
@ -509,7 +509,7 @@ bool ControlThread::read_assistance_from_XML()
{
std::shared_ptr<Galileo_Utc_Model> tmp_obj = std::make_shared<Galileo_Utc_Model>(supl_client_acquisition_.gal_utc);
flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj));
std::cout << "From XML file: Read Galileo UTC model parameters." << std::endl;
std::cout << "From XML file: Read Galileo UTC model parameters.\n";
ret = true;
}
@ -520,7 +520,7 @@ bool ControlThread::read_assistance_from_XML()
gal_alm_iter != supl_client_ephemeris_.gal_almanac_map.cend();
gal_alm_iter++)
{
std::cout << "From XML file: Read Galileo almanac for satellite " << Gnss_Satellite("Galileo", gal_alm_iter->second.i_satellite_PRN) << std::endl;
std::cout << "From XML file: Read Galileo almanac for satellite " << Gnss_Satellite("Galileo", gal_alm_iter->second.i_satellite_PRN) << '\n';
std::shared_ptr<Galileo_Almanac> tmp_obj = std::make_shared<Galileo_Almanac>(gal_alm_iter->second);
flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj));
}
@ -537,7 +537,7 @@ bool ControlThread::read_assistance_from_XML()
gps_cnav_eph_iter != supl_client_ephemeris_.gps_cnav_ephemeris_map.cend();
gps_cnav_eph_iter++)
{
std::cout << "From XML file: Read CNAV ephemeris for satellite " << Gnss_Satellite("GPS", gps_cnav_eph_iter->second.i_satellite_PRN) << std::endl;
std::cout << "From XML file: Read CNAV ephemeris for satellite " << Gnss_Satellite("GPS", gps_cnav_eph_iter->second.i_satellite_PRN) << '\n';
std::shared_ptr<Gps_CNAV_Ephemeris> tmp_obj = std::make_shared<Gps_CNAV_Ephemeris>(gps_cnav_eph_iter->second);
flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj));
}
@ -548,7 +548,7 @@ bool ControlThread::read_assistance_from_XML()
{
std::shared_ptr<Gps_CNAV_Utc_Model> tmp_obj = std::make_shared<Gps_CNAV_Utc_Model>(supl_client_acquisition_.gps_cnav_utc);
flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj));
std::cout << "From XML file: Read GPS CNAV UTC model parameters." << std::endl;
std::cout << "From XML file: Read GPS CNAV UTC model parameters.\n";
ret = true;
}
}
@ -562,7 +562,7 @@ bool ControlThread::read_assistance_from_XML()
glo_gnav_eph_iter != supl_client_ephemeris_.glonass_gnav_ephemeris_map.cend();
glo_gnav_eph_iter++)
{
std::cout << "From XML file: Read GLONASS GNAV ephemeris for satellite " << Gnss_Satellite("GLONASS", glo_gnav_eph_iter->second.i_satellite_PRN) << std::endl;
std::cout << "From XML file: Read GLONASS GNAV ephemeris for satellite " << Gnss_Satellite("GLONASS", glo_gnav_eph_iter->second.i_satellite_PRN) << '\n';
std::shared_ptr<Glonass_Gnav_Ephemeris> tmp_obj = std::make_shared<Glonass_Gnav_Ephemeris>(glo_gnav_eph_iter->second);
flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj));
}
@ -573,15 +573,15 @@ bool ControlThread::read_assistance_from_XML()
{
std::shared_ptr<Glonass_Gnav_Utc_Model> tmp_obj = std::make_shared<Glonass_Gnav_Utc_Model>(supl_client_acquisition_.glo_gnav_utc);
flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj));
std::cout << "From XML file: Read GLONASS UTC model parameters." << std::endl;
std::cout << "From XML file: Read GLONASS UTC model parameters.\n";
ret = true;
}
}
if (ret == false)
{
std::cout << "Error reading XML files" << std::endl;
std::cout << "Disabling GNSS assistance..." << std::endl;
std::cout << "Error reading XML files\n";
std::cout << "Disabling GNSS assistance...\n";
}
// Only look for {ref time, ref location} if SUPL is enabled
@ -625,7 +625,7 @@ void ControlThread::assist_GNSS()
bool enable_agnss_xml = configuration_->property("GNSS-SDR.AGNSS_XML_enabled", false);
if ((enable_gps_supl_assistance == true) and (enable_agnss_xml == false))
{
std::cout << "SUPL RRLP GPS assistance enabled!" << std::endl;
std::cout << "SUPL RRLP GPS assistance enabled!\n";
std::string default_acq_server = "supl.google.com";
std::string default_eph_server = "supl.google.com";
supl_client_ephemeris_.server_name = configuration_->property("GNSS-SDR.SUPL_gps_ephemeris_server", default_acq_server);
@ -674,8 +674,8 @@ void ControlThread::assist_GNSS()
// Read assistance from file
if (read_assistance_from_XML())
{
std::cout << "GNSS assistance data loaded from local XML file(s)." << std::endl;
std::cout << "No SUPL request has been performed." << std::endl;
std::cout << "GNSS assistance data loaded from local XML file(s).\n";
std::cout << "No SUPL request has been performed.\n";
}
}
else
@ -683,7 +683,7 @@ void ControlThread::assist_GNSS()
// Request ephemeris from SUPL server
int error;
supl_client_ephemeris_.request = 1;
std::cout << "SUPL: Try to read GPS ephemeris data from SUPL server..." << std::endl;
std::cout << "SUPL: Try to read GPS ephemeris data from SUPL server...\n";
error = supl_client_ephemeris_.get_assistance(supl_mcc_, supl_mns_, supl_lac_, supl_ci_);
if (error == 0)
{
@ -692,7 +692,7 @@ void ControlThread::assist_GNSS()
gps_eph_iter != supl_client_ephemeris_.gps_ephemeris_map.cend();
gps_eph_iter++)
{
std::cout << "SUPL: Received ephemeris data for satellite " << Gnss_Satellite("GPS", gps_eph_iter->second.i_satellite_PRN) << std::endl;
std::cout << "SUPL: Received ephemeris data for satellite " << Gnss_Satellite("GPS", gps_eph_iter->second.i_satellite_PRN) << '\n';
std::shared_ptr<Gps_Ephemeris> tmp_obj = std::make_shared<Gps_Ephemeris>(gps_eph_iter->second);
flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj));
}
@ -700,27 +700,27 @@ void ControlThread::assist_GNSS()
std::string eph_xml_filename = configuration_->property("GNSS-SDR.SUPL_gps_ephemeris_xml", eph_default_xml_filename_);
if (supl_client_ephemeris_.save_ephemeris_map_xml(eph_xml_filename, supl_client_ephemeris_.gps_ephemeris_map) == true)
{
std::cout << "SUPL: XML ephemeris data file created" << std::endl;
std::cout << "SUPL: XML ephemeris data file created\n";
}
else
{
std::cout << "SUPL: Failed to create XML ephemeris data file" << std::endl;
std::cout << "SUPL: Failed to create XML ephemeris data file\n";
}
}
else
{
std::cout << "ERROR: SUPL client request for ephemeris data returned " << error << std::endl;
std::cout << "Please check your network connectivity and SUPL server configuration" << std::endl;
std::cout << "Trying to read AGNSS data from local XML file(s)..." << std::endl;
std::cout << "ERROR: SUPL client request for ephemeris data returned " << error << '\n';
std::cout << "Please check your network connectivity and SUPL server configuration\n";
std::cout << "Trying to read AGNSS data from local XML file(s)...\n";
if (read_assistance_from_XML() == false)
{
std::cout << "ERROR: Could not read XML files: Disabling SUPL assistance." << std::endl;
std::cout << "ERROR: Could not read XML files: Disabling SUPL assistance.\n";
}
}
// Request almanac, IONO and UTC Model data
supl_client_ephemeris_.request = 0;
std::cout << "SUPL: Try to read Almanac, Iono, Utc Model, Ref Time and Ref Location data from SUPL server..." << std::endl;
std::cout << "SUPL: Try to read Almanac, Iono, Utc Model, Ref Time and Ref Location data from SUPL server...\n";
error = supl_client_ephemeris_.get_assistance(supl_mcc_, supl_mns_, supl_lac_, supl_ci_);
if (error == 0)
{
@ -729,20 +729,20 @@ void ControlThread::assist_GNSS()
gps_alm_iter != supl_client_ephemeris_.gps_almanac_map.cend();
gps_alm_iter++)
{
std::cout << "SUPL: Received almanac data for satellite " << Gnss_Satellite("GPS", gps_alm_iter->second.i_satellite_PRN) << std::endl;
std::cout << "SUPL: Received almanac data for satellite " << Gnss_Satellite("GPS", gps_alm_iter->second.i_satellite_PRN) << '\n';
std::shared_ptr<Gps_Almanac> tmp_obj = std::make_shared<Gps_Almanac>(gps_alm_iter->second);
flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj));
}
supl_client_ephemeris_.save_gps_almanac_xml("gps_almanac_map.xml", supl_client_ephemeris_.gps_almanac_map);
if (supl_client_ephemeris_.gps_iono.valid == true)
{
std::cout << "SUPL: Received GPS Ionosphere model parameters" << std::endl;
std::cout << "SUPL: Received GPS Ionosphere model parameters\n";
std::shared_ptr<Gps_Iono> tmp_obj = std::make_shared<Gps_Iono>(supl_client_ephemeris_.gps_iono);
flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj));
}
if (supl_client_ephemeris_.gps_utc.valid == true)
{
std::cout << "SUPL: Received GPS UTC model parameters" << std::endl;
std::cout << "SUPL: Received GPS UTC model parameters\n";
std::shared_ptr<Gps_Utc_Model> tmp_obj = std::make_shared<Gps_Utc_Model>(supl_client_ephemeris_.gps_utc);
flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj));
}
@ -750,31 +750,31 @@ void ControlThread::assist_GNSS()
std::string iono_xml_filename = configuration_->property("GNSS-SDR.SUPL_gps_iono_xml", iono_default_xml_filename_);
if (supl_client_ephemeris_.save_iono_xml(iono_xml_filename, supl_client_ephemeris_.gps_iono) == true)
{
std::cout << "SUPL: Iono data file created" << std::endl;
std::cout << "SUPL: Iono data file created\n";
}
else
{
std::cout << "SUPL: Failed to create Iono data file" << std::endl;
std::cout << "SUPL: Failed to create Iono data file\n";
}
std::string utc_xml_filename = configuration_->property("GNSS-SDR.SUPL_gps_utc_model_xml", utc_default_xml_filename_);
if (supl_client_ephemeris_.save_utc_xml(utc_xml_filename, supl_client_ephemeris_.gps_utc) == true)
{
std::cout << "SUPL: UTC model data file created" << std::endl;
std::cout << "SUPL: UTC model data file created\n";
}
else
{
std::cout << "SUPL: Failed to create UTC model data file" << std::endl;
std::cout << "SUPL: Failed to create UTC model data file\n";
}
}
else
{
std::cout << "ERROR: SUPL client for almanac data returned " << error << std::endl;
std::cout << "Please check your network connectivity and SUPL server configuration" << std::endl;
std::cout << "ERROR: SUPL client for almanac data returned " << error << '\n';
std::cout << "Please check your network connectivity and SUPL server configuration\n";
}
// Request acquisition assistance
supl_client_acquisition_.request = 2;
std::cout << "SUPL: Try to read acquisition assistance data from SUPL server..." << std::endl;
std::cout << "SUPL: Try to read acquisition assistance data from SUPL server...\n";
error = supl_client_acquisition_.get_assistance(supl_mcc_, supl_mns_, supl_lac_, supl_ci_);
if (error == 0)
{
@ -783,12 +783,12 @@ void ControlThread::assist_GNSS()
gps_acq_iter != supl_client_acquisition_.gps_acq_map.cend();
gps_acq_iter++)
{
std::cout << "SUPL: Received acquisition assistance data for satellite " << Gnss_Satellite("GPS", gps_acq_iter->second.i_satellite_PRN) << std::endl;
std::cout << "SUPL: Received acquisition assistance data for satellite " << Gnss_Satellite("GPS", gps_acq_iter->second.i_satellite_PRN) << '\n';
global_gps_acq_assist_map.write(gps_acq_iter->second.i_satellite_PRN, gps_acq_iter->second);
}
if (supl_client_acquisition_.gps_ref_loc.valid == true)
{
std::cout << "SUPL: Received Ref Location data (Acquisition Assistance)" << std::endl;
std::cout << "SUPL: Received Ref Location data (Acquisition Assistance)\n";
agnss_ref_location_ = supl_client_acquisition_.gps_ref_loc;
std::shared_ptr<Agnss_Ref_Location> tmp_obj = std::make_shared<Agnss_Ref_Location>(agnss_ref_location_);
flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj));
@ -796,7 +796,7 @@ void ControlThread::assist_GNSS()
}
if (supl_client_acquisition_.gps_time.valid == true)
{
std::cout << "SUPL: Received Ref Time data (Acquisition Assistance)" << std::endl;
std::cout << "SUPL: Received Ref Time data (Acquisition Assistance)\n";
agnss_ref_time_ = supl_client_acquisition_.gps_time;
std::shared_ptr<Agnss_Ref_Time> tmp_obj = std::make_shared<Agnss_Ref_Time>(agnss_ref_time_);
flowgraph_->send_telemetry_msg(pmt::make_any(tmp_obj));
@ -805,9 +805,9 @@ void ControlThread::assist_GNSS()
}
else
{
std::cout << "ERROR: SUPL client for acquisition assistance returned " << error << std::endl;
std::cout << "Please check your network connectivity and SUPL server configuration" << std::endl;
std::cout << "Disabling SUPL acquisition assistance." << std::endl;
std::cout << "ERROR: SUPL client for acquisition assistance returned " << error << '\n';
std::cout << "Please check your network connectivity and SUPL server configuration\n";
std::cout << "Disabling SUPL acquisition assistance.\n";
}
}
}
@ -817,7 +817,7 @@ void ControlThread::assist_GNSS()
// read assistance from file
if (read_assistance_from_XML())
{
std::cout << "GNSS assistance data loaded from local XML file(s)." << std::endl;
std::cout << "GNSS assistance data loaded from local XML file(s).\n";
}
}
@ -932,7 +932,7 @@ std::vector<std::pair<int, Gnss_Satellite>> ControlThread::get_visible_sats(time
strftime(buf, sizeof(buf), "%d/%m/%Y %H:%M:%S ", &tstruct);
std::string str_time = std::string(buf);
std::cout << "Get visible satellites at " << str_time
<< "UTC, assuming RX position " << LLH[0] << " [deg], " << LLH[1] << " [deg], " << LLH[2] << " [m]" << std::endl;
<< "UTC, assuming RX position " << LLH[0] << " [deg], " << LLH[1] << " [deg], " << LLH[2] << " [m]\n";
std::map<int, Gps_Ephemeris> gps_eph_map = pvt_ptr->get_gps_ephemeris();
for (auto &it : gps_eph_map)
@ -952,7 +952,7 @@ std::vector<std::pair<int, Gnss_Satellite>> ControlThread::get_visible_sats(time
// push sat
if (El > 0)
{
std::cout << "Using GPS Ephemeris: Sat " << it.second.i_satellite_PRN << " Az: " << Az << " El: " << El << std::endl;
std::cout << "Using GPS Ephemeris: Sat " << it.second.i_satellite_PRN << " Az: " << Az << " El: " << El << '\n';
available_satellites.emplace_back(floor(El),
(Gnss_Satellite(std::string("GPS"), it.second.i_satellite_PRN)));
visible_gps.push_back(it.second.i_satellite_PRN);
@ -977,7 +977,7 @@ std::vector<std::pair<int, Gnss_Satellite>> ControlThread::get_visible_sats(time
// push sat
if (El > 0)
{
std::cout << "Using Galileo Ephemeris: Sat " << it.second.i_satellite_PRN << " Az: " << Az << " El: " << El << std::endl;
std::cout << "Using Galileo Ephemeris: Sat " << it.second.i_satellite_PRN << " Az: " << Az << " El: " << El << '\n';
available_satellites.emplace_back(floor(El),
(Gnss_Satellite(std::string("Galileo"), it.second.i_satellite_PRN)));
visible_gal.push_back(it.second.i_satellite_PRN);
@ -1007,7 +1007,7 @@ std::vector<std::pair<int, Gnss_Satellite>> ControlThread::get_visible_sats(time
it2 = std::find(visible_gps.begin(), visible_gps.end(), it.second.i_satellite_PRN);
if (it2 == visible_gps.end())
{
std::cout << "Using GPS Almanac: Sat " << it.second.i_satellite_PRN << " Az: " << Az << " El: " << El << std::endl;
std::cout << "Using GPS Almanac: Sat " << it.second.i_satellite_PRN << " Az: " << Az << " El: " << El << '\n';
available_satellites.emplace_back(floor(El),
(Gnss_Satellite(std::string("GPS"), it.second.i_satellite_PRN)));
}
@ -1037,7 +1037,7 @@ std::vector<std::pair<int, Gnss_Satellite>> ControlThread::get_visible_sats(time
it2 = std::find(visible_gal.begin(), visible_gal.end(), it.second.i_satellite_PRN);
if (it2 == visible_gal.end())
{
std::cout << "Using Galileo Almanac: Sat " << it.second.i_satellite_PRN << " Az: " << Az << " El: " << El << std::endl;
std::cout << "Using Galileo Almanac: Sat " << it.second.i_satellite_PRN << " Az: " << Az << " El: " << El << '\n';
available_satellites.emplace_back(floor(El),
(Gnss_Satellite(std::string("Galileo"), it.second.i_satellite_PRN)));
}
@ -1072,11 +1072,11 @@ void ControlThread::gps_acq_assist_data_collector()
<< gps_acq.i_satellite_PRN
<< " with Doppler "
<< gps_acq.d_Doppler0
<< " [Hz] " << std::endl;
<< " [Hz]\n";
// insert new acq record to the global ephemeris map
if (global_gps_acq_assist_map.read(gps_acq.i_satellite_PRN, gps_acq_old))
{
std::cout << "Acquisition assistance record updated" << std::endl;
std::cout << "Acquisition assistance record updated\n";
global_gps_acq_assist_map.write(gps_acq.i_satellite_PRN, gps_acq);
}
else
@ -1106,7 +1106,7 @@ void ControlThread::sysv_queue_listener()
if ((msqid_ = msgget(key, 0644 | IPC_CREAT)) == -1)
{
std::cerr << "GNSS-SDR cannot create SysV message queues" << std::endl;
std::cerr << "GNSS-SDR cannot create SysV message queues\n";
read_queue = false;
}
@ -1117,7 +1117,7 @@ void ControlThread::sysv_queue_listener()
received_message = msg.stop_message;
if ((std::abs(received_message - (-200.0)) < 10 * std::numeric_limits<double>::epsilon()))
{
std::cout << "Quit order received, stopping GNSS-SDR !!" << std::endl;
std::cout << "Quit order received, stopping GNSS-SDR !!\n";
control_queue_->push(pmt::make_any(command_event_make(200, 0)));
read_queue = false;
}
@ -1135,7 +1135,7 @@ void ControlThread::keyboard_listener()
std::cin.get(c);
if (c == 'q')
{
std::cout << "Quit keystroke order received, stopping GNSS-SDR !!" << std::endl;
std::cout << "Quit keystroke order received, stopping GNSS-SDR !!\n";
control_queue_->push(pmt::make_any(command_event_make(200, 0)));
read_keys = false;
}

View File

@ -1223,7 +1223,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
catch (const std::exception& e)
{
std::cout << "GNSS-SDR program ended." << std::endl;
std::cout << "GNSS-SDR program ended.\n";
exit(1);
}
}
@ -1238,7 +1238,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
catch (const std::exception& e)
{
std::cout << "GNSS-SDR program ended." << std::endl;
std::cout << "GNSS-SDR program ended.\n";
exit(1);
}
}
@ -1254,7 +1254,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
catch (const std::exception& e)
{
std::cout << "GNSS-SDR program ended." << std::endl;
std::cout << "GNSS-SDR program ended.\n";
exit(1);
}
}
@ -1269,7 +1269,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
}
catch (const std::exception& e)
{
std::cout << "GNSS-SDR program ended." << std::endl;
std::cout << "GNSS-SDR program ended.\n";
exit(1);
}
}
@ -1283,7 +1283,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
}
catch (const std::exception& e)
{
std::cout << "GNSS-SDR program ended." << std::endl;
std::cout << "GNSS-SDR program ended.\n";
exit(1);
}
}
@ -1297,7 +1297,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
}
catch (const std::exception& e)
{
std::cout << "GNSS-SDR program ended." << std::endl;
std::cout << "GNSS-SDR program ended.\n";
exit(1);
}
}
@ -1311,7 +1311,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
}
catch (const std::exception& e)
{
std::cout << "GNSS-SDR program ended." << std::endl;
std::cout << "GNSS-SDR program ended.\n";
exit(1);
}
}
@ -1325,7 +1325,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
}
catch (const std::exception& e)
{
std::cout << "GNSS-SDR program ended." << std::endl;
std::cout << "GNSS-SDR program ended.\n";
exit(1);
}
}
@ -1339,7 +1339,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
}
catch (const std::exception& e)
{
std::cout << "GNSS-SDR program ended." << std::endl;
std::cout << "GNSS-SDR program ended.\n";
exit(1);
}
}
@ -1354,7 +1354,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
catch (const std::exception& e)
{
std::cout << "GNSS-SDR program ended." << std::endl;
std::cout << "GNSS-SDR program ended.\n";
exit(1);
}
}

View File

@ -228,10 +228,10 @@ void GNSSFlowgraph::connect()
if (sig_source_.at(i)->implementation() == "Raw_Array_Signal_Source")
{
// Multichannel Array
std::cout << "ARRAY MODE" << std::endl;
std::cout << "ARRAY MODE\n";
for (int j = 0; j < GNSS_SDR_ARRAY_SIGNAL_CONDITIONER_CHANNELS; j++)
{
std::cout << "connecting ch " << j << std::endl;
std::cout << "connecting ch " << j << '\n';
top_block_->connect(sig_source_.at(i)->get_right_block(), j, sig_conditioner_.at(i)->get_left_block(), j);
}
}
@ -298,7 +298,7 @@ void GNSSFlowgraph::connect()
if (fs == 0.0)
{
LOG(WARNING) << "Set GNSS-SDR.internal_fs_sps in configuration file";
std::cout << "Set GNSS-SDR.internal_fs_sps in configuration file" << std::endl;
std::cout << "Set GNSS-SDR.internal_fs_sps in configuration file\n";
throw(std::invalid_argument("Set GNSS-SDR.internal_fs_sps in configuration"));
}
int observable_interval_ms = static_cast<double>(configuration_->property("GNSS-SDR.observable_interval_ms", 20));
@ -323,7 +323,7 @@ void GNSSFlowgraph::connect()
if (fs == 0.0)
{
LOG(WARNING) << "Set GNSS-SDR.internal_fs_sps in configuration file";
std::cout << "Set GNSS-SDR.internal_fs_sps in configuration file" << std::endl;
std::cout << "Set GNSS-SDR.internal_fs_sps in configuration file\n";
throw(std::invalid_argument("Set GNSS-SDR.internal_fs_sps in configuration"));
}
int observable_interval_ms = static_cast<double>(configuration_->property("GNSS-SDR.observable_interval_ms", 20));
@ -347,7 +347,7 @@ void GNSSFlowgraph::connect()
if (fs == 0.0)
{
LOG(WARNING) << "Set GNSS-SDR.internal_fs_sps in configuration file";
std::cout << "Set GNSS-SDR.internal_fs_sps in configuration file" << std::endl;
std::cout << "Set GNSS-SDR.internal_fs_sps in configuration file\n";
throw(std::invalid_argument("Set GNSS-SDR.internal_fs_sps in configuration"));
}
@ -555,7 +555,7 @@ void GNSSFlowgraph::connect()
null_sinks_.push_back(gr::blocks::null_sink::make(sizeof(gr_complex)));
top_block_->connect(sig_conditioner_.at(n)->get_right_block(), 0,
null_sinks_.back(), 0);
LOG(INFO) << "Null sink connected to signal conditioner " << n << " due to lack of connection to any channel" << std::endl;
LOG(INFO) << "Null sink connected to signal conditioner " << n << " due to lack of connection to any channel\n";
}
}
}
@ -1507,13 +1507,13 @@ void GNSSFlowgraph::init()
{
for (int i = 0; i < sources_count_; i++)
{
std::cout << "Creating source " << i << std::endl;
std::cout << "Creating source " << i << '\n';
sig_source_.push_back(block_factory->GetSignalSource(configuration_.get(), queue_.get(), i));
// TODO: Create a class interface for SignalSources, derived from GNSSBlockInterface.
// Include GetRFChannels in the interface to avoid read config parameters here
// read the number of RF channels for each front-end
RF_Channels = configuration_->property(sig_source_.at(i)->role() + ".RF_channels", 1);
std::cout << "RF Channels " << RF_Channels << std::endl;
std::cout << "RF Channels " << RF_Channels << '\n';
for (int j = 0; j < RF_Channels; j++)
{
sig_conditioner_.push_back(block_factory->GetSignalConditioner(configuration_.get(), signal_conditioner_ID));
@ -1551,8 +1551,8 @@ void GNSSFlowgraph::init()
if ((obs_implementation == "GPS_L1_CA_Observables") || (obs_implementation == "GPS_L2C_Observables") ||
(obs_implementation == "Galileo_E1B_Observables") || (obs_implementation == "Galileo_E5A_Observables"))
{
std::cout << "WARNING: Implementation '" << obs_implementation << "' of the Observables block has been replaced by 'Hybrid_Observables'." << std::endl;
std::cout << "Please update your configuration file." << std::endl;
std::cout << "WARNING: Implementation '" << obs_implementation << "' of the Observables block has been replaced by 'Hybrid_Observables'.\n";
std::cout << "Please update your configuration file.\n";
}
pvt_ = block_factory->GetPVT(configuration_.get());
@ -1560,8 +1560,8 @@ void GNSSFlowgraph::init()
std::string pvt_implementation = configuration_->property("PVT.implementation", default_str);
if ((pvt_implementation == "GPS_L1_CA_PVT") || (pvt_implementation == "Galileo_E1_PVT") || (pvt_implementation == "Hybrid_PVT"))
{
std::cout << "WARNING: Implementation '" << pvt_implementation << "' of the PVT block has been replaced by 'RTKLIB_PVT'." << std::endl;
std::cout << "Please update your configuration file." << std::endl;
std::cout << "WARNING: Implementation '" << pvt_implementation << "' of the PVT block has been replaced by 'RTKLIB_PVT'.\n";
std::cout << "Please update your configuration file.\n";
}
auto channels = block_factory->GetChannels(configuration_.get(), queue_.get());

View File

@ -154,16 +154,16 @@ std::string TcpCmdInterface::status(const std::vector<std::string> &commandLine
tstruct = *gmtime(&UTC_time);
strftime(buf1.data(), buf1.size(), "%d/%m/%Y %H:%M:%S", &tstruct);
std::string str_time = std::string(buf1.data());
str_stream << "- Receiver UTC Time: " << str_time << std::endl;
str_stream << "- Receiver UTC Time: " << str_time << '\n';
str_stream << std::setprecision(9);
str_stream << "- Receiver Position WGS84 [Lat, Long, H]: "
<< latitude_deg << ", "
<< longitude_deg << ", ";
str_stream << std::setprecision(3);
str_stream << height_m << std::endl;
str_stream << height_m << '\n';
str_stream << std::setprecision(1);
str_stream << "- Receiver Speed over Ground [km/h]: " << ground_speed_kmh << std::endl;
str_stream << "- Receiver Course over ground [deg]: " << course_over_ground_deg << std::endl;
str_stream << "- Receiver Speed over Ground [km/h]: " << ground_speed_kmh << '\n';
str_stream << "- Receiver Course over ground [deg]: " << course_over_ground_deg << '\n';
}
else
{
@ -319,13 +319,13 @@ void TcpCmdInterface::run_cmd_server(int tcp_port)
{
try
{
std::cout << "TcpCmdInterface: Telecommand TCP interface listening on port " << tcp_port << std::endl;
std::cout << "TcpCmdInterface: Telecommand TCP interface listening on port " << tcp_port << '\n';
boost::asio::ip::tcp::socket socket(context);
acceptor.accept(socket, not_throw);
if (not_throw)
{
std::cout << "TcpCmdInterface: Error when binding the port in the socket" << std::endl;
std::cout << "TcpCmdInterface: Error when binding the port in the socket\n";
continue;
}
@ -376,7 +376,7 @@ void TcpCmdInterface::run_cmd_server(int tcp_port)
socket.write_some(boost::asio::buffer(response), not_throw);
if (not_throw)
{
std::cout << "Error sending(" << not_throw.value() << "): " << not_throw.message() << std::endl;
std::cout << "Error sending(" << not_throw.value() << "): " << not_throw.message() << '\n';
break;
}
}
@ -388,7 +388,7 @@ void TcpCmdInterface::run_cmd_server(int tcp_port)
}
else
{
std::cout << "TcpCmdInterface unexpected error: " << error << std::endl;
std::cout << "TcpCmdInterface unexpected error: " << error << '\n';
}
// Close socket
@ -396,16 +396,16 @@ void TcpCmdInterface::run_cmd_server(int tcp_port)
}
catch (const boost::exception &e)
{
std::cout << "TcpCmdInterface: Boost exception " << std::endl;
std::cout << "TcpCmdInterface: Boost exception\n";
}
catch (const std::exception &ex)
{
std::cout << "TcpCmdInterface: Exception " << ex.what() << std::endl;
std::cout << "TcpCmdInterface: Exception " << ex.what() << '\n';
}
}
}
catch (const boost::exception &e)
{
std::cout << "TCP Command Interface exception: address already in use" << std::endl;
std::cout << "TCP Command Interface exception: address already in use\n";
}
}

View File

@ -22,7 +22,7 @@
#include "beidou_dnav_navigation_message.h"
#include "gnss_satellite.h"
#include <cmath> // for cos, sin, fmod, sqrt, atan2, fabs, floor
#include <iostream> // for string, operator<<, cout, ostream, endl
#include <iostream> // for string, operator<<, cout, ostream
#include <limits> // for std::numeric_limits
@ -43,9 +43,7 @@ Beidou_Dnav_Navigation_Message::Beidou_Dnav_Navigation_Message()
void Beidou_Dnav_Navigation_Message::print_beidou_word_bytes(uint32_t BEIDOU_word) const
{
std::cout << " Word =";
std::cout << std::bitset<32>(BEIDOU_word);
std::cout << std::endl;
std::cout << " Word =" << std::bitset<32>(BEIDOU_word) << '\n';
}

View File

@ -651,7 +651,7 @@ bool Glonass_Gnav_Navigation_Message::have_new_ephemeris() // Check if we have
flag_all_ephemeris = true;
// Update the time of ephemeris information
d_previous_tb = gnav_ephemeris.d_t_b;
DLOG(INFO) << "GLONASS GNAV Ephemeris (1, 2, 3, 4) have been received and belong to the same batch" << std::endl;
DLOG(INFO) << "GLONASS GNAV Ephemeris (1, 2, 3, 4) have been received and belong to the same batch";
new_eph = true;
}
}

Some files were not shown because too many files have changed in this diff Show More