mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-15 04:30:33 +00:00
Warn if output files cannot be written.
This commit is contained in:
parent
b183fe63ba
commit
19dca87427
@ -594,16 +594,16 @@ rtklib_pvt_cc::~rtklib_pvt_cc()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Save GPS CNAV iono parameters
|
// Save GPS CNAV iono parameters
|
||||||
file_name = xml_base_path + "gps_iono.xml";
|
file_name = xml_base_path + "gps_cnav_iono.xml";
|
||||||
if (d_ls_pvt->gps_iono.valid == true)
|
if (d_ls_pvt->gps_cnav_iono.valid == true)
|
||||||
{
|
{
|
||||||
std::ofstream ofs;
|
std::ofstream ofs;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ofs.open(file_name.c_str(), std::ofstream::trunc | std::ofstream::out);
|
ofs.open(file_name.c_str(), std::ofstream::trunc | std::ofstream::out);
|
||||||
boost::archive::xml_oarchive xml(ofs);
|
boost::archive::xml_oarchive xml(ofs);
|
||||||
xml << boost::serialization::make_nvp("GNSS-SDR_iono_model", d_ls_pvt->gps_iono);
|
xml << boost::serialization::make_nvp("GNSS-SDR_cnav_iono_model", d_ls_pvt->gps_cnav_iono);
|
||||||
LOG(INFO) << "Saved GPS ionospheric model parameters";
|
LOG(INFO) << "Saved GPS CNAV ionospheric model parameters";
|
||||||
}
|
}
|
||||||
catch (std::exception& e)
|
catch (std::exception& e)
|
||||||
{
|
{
|
||||||
@ -612,10 +612,9 @@ rtklib_pvt_cc::~rtklib_pvt_cc()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOG(INFO) << "Failed to save GPS ionospheric model parameters, not valid data";
|
LOG(INFO) << "Failed to save GPS CNAV ionospheric model parameters, not valid data";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Save Galileo iono parameters
|
// Save Galileo iono parameters
|
||||||
file_name = xml_base_path + "gal_iono.xml";
|
file_name = xml_base_path + "gal_iono.xml";
|
||||||
if (d_ls_pvt->galileo_iono.ai0_5 != 0.0)
|
if (d_ls_pvt->galileo_iono.ai0_5 != 0.0)
|
||||||
|
@ -159,6 +159,7 @@ bool GeoJSON_Printer::set_headers(std::string filename, bool time_tag_name)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
std::cout << "File " << filename_ << " cannot be saved. Wrong permissions?" << std::endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -149,6 +149,7 @@ bool Gpx_Printer::set_headers(std::string filename, bool time_tag_name)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
std::cout << "File " << gpx_filename << " cannot be saved. Wrong permissions?" << std::endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -161,6 +161,7 @@ bool Kml_Printer::set_headers(std::string filename, bool time_tag_name)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
std::cout << "File " << kml_filename << " cannot be saved. Wrong permissions?" << std::endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -92,6 +92,10 @@ Nmea_Printer::Nmea_Printer(std::string filename, bool flag_nmea_output_file, boo
|
|||||||
{
|
{
|
||||||
DLOG(INFO) << "NMEA printer writing on " << nmea_filename.c_str();
|
DLOG(INFO) << "NMEA printer writing on " << nmea_filename.c_str();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
std::cout << "File " << nmea_filename << " cannot be saved. Wrong permissions?" << std::endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nmea_devname = nmea_dump_devname;
|
nmea_devname = nmea_dump_devname;
|
||||||
|
@ -97,6 +97,13 @@ Rinex_Printer::Rinex_Printer(int32_t conf_version, const std::string& base_path)
|
|||||||
Rinex_Printer::navMixFile.open(navMixfilename, std::ios::out | std::ios::in | std::ios::app);
|
Rinex_Printer::navMixFile.open(navMixfilename, std::ios::out | std::ios::in | std::ios::app);
|
||||||
Rinex_Printer::navGloFile.open(navGlofilename, std::ios::out | std::ios::in | std::ios::app);
|
Rinex_Printer::navGloFile.open(navGlofilename, std::ios::out | std::ios::in | std::ios::app);
|
||||||
|
|
||||||
|
if (!Rinex_Printer::navFile.is_open() or !Rinex_Printer::obsFile.is_open() or
|
||||||
|
!Rinex_Printer::sbsFile.is_open() or !Rinex_Printer::navGalFile.is_open() or
|
||||||
|
!Rinex_Printer::navMixFile.is_open() or !Rinex_Printer::navGloFile.is_open())
|
||||||
|
{
|
||||||
|
std::cout << "RINEX files cannot be saved. Wrong permissions?" << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
// RINEX v3.02 codes
|
// RINEX v3.02 codes
|
||||||
satelliteSystem["GPS"] = "G";
|
satelliteSystem["GPS"] = "G";
|
||||||
satelliteSystem["GLONASS"] = "R";
|
satelliteSystem["GLONASS"] = "R";
|
||||||
|
@ -135,6 +135,10 @@ Rtcm_Printer::Rtcm_Printer(std::string filename, bool flag_rtcm_file_dump, bool
|
|||||||
{
|
{
|
||||||
DLOG(INFO) << "RTCM printer writing on " << rtcm_filename.c_str();
|
DLOG(INFO) << "RTCM printer writing on " << rtcm_filename.c_str();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
std::cout << "File " << rtcm_filename << "cannot be saved. Wrong permissions?" << std::endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rtcm_devname = rtcm_dump_devname;
|
rtcm_devname = rtcm_dump_devname;
|
||||||
|
Loading…
Reference in New Issue
Block a user