mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-11-21 09:34:53 +00:00
Add new conf parameter PVT.rinex_name to specify a custom name for generated RINEX files.
A command-line flag --RINEX_name, which overrides the configuration if defined, is also available
This commit is contained in:
@@ -26,6 +26,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||||||
- New PVT parameter enable_rx_clock_correction allows to enable or disable the continuous application of the Time solution correction (clock steering) to the computation of Observables. By default is set to false (that is, disabled).
|
- New PVT parameter enable_rx_clock_correction allows to enable or disable the continuous application of the Time solution correction (clock steering) to the computation of Observables. By default is set to false (that is, disabled).
|
||||||
- New PVT parameter max_clock_offset_ms: if PVT.enable_rx_clock_correction is set to false, this parameter sets the maximum allowed local clock offset with respect to the Time solution. If the estimated offset exceeds this parameter, a clock correction is applied to the computation of Observables.
|
- New PVT parameter max_clock_offset_ms: if PVT.enable_rx_clock_correction is set to false, this parameter sets the maximum allowed local clock offset with respect to the Time solution. If the estimated offset exceeds this parameter, a clock correction is applied to the computation of Observables.
|
||||||
- Fixed L5 and E5a receiver chains when tracking the data component.
|
- Fixed L5 and E5a receiver chains when tracking the data component.
|
||||||
|
- Added new PVT parameter rinex_name to specify a custom name of the generated RINEX files. A commandline flag --RINEX_name is also available, and overrides the configuration.
|
||||||
|
|
||||||
|
|
||||||
### Improvements in Interoperability:
|
### Improvements in Interoperability:
|
||||||
|
|||||||
@@ -98,6 +98,11 @@ Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration,
|
|||||||
pvt_output_parameters.rinex_version = 2;
|
pvt_output_parameters.rinex_version = 2;
|
||||||
}
|
}
|
||||||
pvt_output_parameters.rinexobs_rate_ms = bc::lcm(configuration->property(role + ".rinexobs_rate_ms", 1000), pvt_output_parameters.output_rate_ms);
|
pvt_output_parameters.rinexobs_rate_ms = bc::lcm(configuration->property(role + ".rinexobs_rate_ms", 1000), pvt_output_parameters.output_rate_ms);
|
||||||
|
pvt_output_parameters.rinex_name = configuration->property(role + ".rinex_name", std::string("-"));
|
||||||
|
if (FLAGS_RINEX_name != "-")
|
||||||
|
{
|
||||||
|
pvt_output_parameters.rinex_name = FLAGS_RINEX_name;
|
||||||
|
}
|
||||||
|
|
||||||
// RTCM Printer settings
|
// RTCM Printer settings
|
||||||
pvt_output_parameters.flag_rtcm_tty_port = configuration->property(role + ".flag_rtcm_tty_port", false);
|
pvt_output_parameters.flag_rtcm_tty_port = configuration->property(role + ".flag_rtcm_tty_port", false);
|
||||||
|
|||||||
@@ -341,7 +341,7 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels,
|
|||||||
d_rinex_version = conf_.rinex_version;
|
d_rinex_version = conf_.rinex_version;
|
||||||
if (b_rinex_output_enabled)
|
if (b_rinex_output_enabled)
|
||||||
{
|
{
|
||||||
rp = std::make_shared<Rinex_Printer>(d_rinex_version, conf_.rinex_output_path);
|
rp = std::make_shared<Rinex_Printer>(d_rinex_version, conf_.rinex_output_path, conf_.rinex_name);
|
||||||
rp->set_pre_2009_file(conf_.pre_2009_file);
|
rp->set_pre_2009_file(conf_.pre_2009_file);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ Pvt_Conf::Pvt_Conf()
|
|||||||
max_obs_block_rx_clock_offset_ms = 40;
|
max_obs_block_rx_clock_offset_ms = 40;
|
||||||
rinex_version = 0;
|
rinex_version = 0;
|
||||||
rinexobs_rate_ms = 0;
|
rinexobs_rate_ms = 0;
|
||||||
|
rinex_name = "-";
|
||||||
|
|
||||||
dump = false;
|
dump = false;
|
||||||
dump_mat = true;
|
dump_mat = true;
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ public:
|
|||||||
|
|
||||||
int32_t rinex_version;
|
int32_t rinex_version;
|
||||||
int32_t rinexobs_rate_ms;
|
int32_t rinexobs_rate_ms;
|
||||||
|
std::string rinex_name;
|
||||||
std::map<int, int> rtcm_msg_rate_ms;
|
std::map<int, int> rtcm_msg_rate_ms;
|
||||||
|
|
||||||
bool dump;
|
bool dump;
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ namespace errorlib = boost::system;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
Rinex_Printer::Rinex_Printer(int32_t conf_version, const std::string& base_path)
|
Rinex_Printer::Rinex_Printer(int32_t conf_version, const std::string& base_path, const std::string& base_name)
|
||||||
{
|
{
|
||||||
pre_2009_file_ = false;
|
pre_2009_file_ = false;
|
||||||
std::string base_rinex_path = base_path;
|
std::string base_rinex_path = base_path;
|
||||||
@@ -108,13 +108,13 @@ Rinex_Printer::Rinex_Printer(int32_t conf_version, const std::string& base_path)
|
|||||||
std::cout << "RINEX files will be stored at " << base_rinex_path << std::endl;
|
std::cout << "RINEX files will be stored at " << base_rinex_path << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
navfilename = base_rinex_path + fs::path::preferred_separator + Rinex_Printer::createFilename("RINEX_FILE_TYPE_GPS_NAV");
|
navfilename = base_rinex_path + fs::path::preferred_separator + Rinex_Printer::createFilename("RINEX_FILE_TYPE_GPS_NAV", base_name);
|
||||||
obsfilename = base_rinex_path + fs::path::preferred_separator + Rinex_Printer::createFilename("RINEX_FILE_TYPE_OBS");
|
obsfilename = base_rinex_path + fs::path::preferred_separator + Rinex_Printer::createFilename("RINEX_FILE_TYPE_OBS", base_name);
|
||||||
sbsfilename = base_rinex_path + fs::path::preferred_separator + Rinex_Printer::createFilename("RINEX_FILE_TYPE_SBAS");
|
sbsfilename = base_rinex_path + fs::path::preferred_separator + Rinex_Printer::createFilename("RINEX_FILE_TYPE_SBAS", base_name);
|
||||||
navGalfilename = base_rinex_path + fs::path::preferred_separator + Rinex_Printer::createFilename("RINEX_FILE_TYPE_GAL_NAV");
|
navGalfilename = base_rinex_path + fs::path::preferred_separator + Rinex_Printer::createFilename("RINEX_FILE_TYPE_GAL_NAV", base_name);
|
||||||
navMixfilename = base_rinex_path + fs::path::preferred_separator + Rinex_Printer::createFilename("RINEX_FILE_TYPE_MIXED_NAV");
|
navMixfilename = base_rinex_path + fs::path::preferred_separator + Rinex_Printer::createFilename("RINEX_FILE_TYPE_MIXED_NAV", base_name);
|
||||||
navGlofilename = base_rinex_path + fs::path::preferred_separator + Rinex_Printer::createFilename("RINEX_FILE_TYPE_GLO_NAV");
|
navGlofilename = base_rinex_path + fs::path::preferred_separator + Rinex_Printer::createFilename("RINEX_FILE_TYPE_GLO_NAV", base_name);
|
||||||
navBdsfilename = base_rinex_path + fs::path::preferred_separator + Rinex_Printer::createFilename("RINEX_FILE_TYPE_BDS_NAV");
|
navBdsfilename = base_rinex_path + fs::path::preferred_separator + Rinex_Printer::createFilename("RINEX_FILE_TYPE_BDS_NAV", base_name);
|
||||||
|
|
||||||
Rinex_Printer::navFile.open(navfilename, std::ios::out | std::ios::in | std::ios::app);
|
Rinex_Printer::navFile.open(navfilename, std::ios::out | std::ios::in | std::ios::app);
|
||||||
Rinex_Printer::obsFile.open(obsfilename, std::ios::out | std::ios::in | std::ios::app);
|
Rinex_Printer::obsFile.open(obsfilename, std::ios::out | std::ios::in | std::ios::app);
|
||||||
@@ -335,7 +335,7 @@ void Rinex_Printer::lengthCheck(const std::string& line)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::string Rinex_Printer::createFilename(const std::string& type)
|
std::string Rinex_Printer::createFilename(const std::string& type, const std::string& base_name)
|
||||||
{
|
{
|
||||||
const std::string stationName = "GSDR"; // 4-character station name designator
|
const std::string stationName = "GSDR"; // 4-character station name designator
|
||||||
boost::gregorian::date today = boost::gregorian::day_clock::local_day();
|
boost::gregorian::date today = boost::gregorian::day_clock::local_day();
|
||||||
@@ -365,7 +365,6 @@ std::string Rinex_Printer::createFilename(const std::string& type)
|
|||||||
fileType.insert(std::pair<std::string, std::string>("RINEX_FILE_TYPE_SUMMARY", "S")); // S - Summary file (used e.g., by IGS, not a standard!).
|
fileType.insert(std::pair<std::string, std::string>("RINEX_FILE_TYPE_SUMMARY", "S")); // S - Summary file (used e.g., by IGS, not a standard!).
|
||||||
fileType.insert(std::pair<std::string, std::string>("RINEX_FILE_TYPE_BDS_NAV", "F")); // G - GLONASS navigation file.
|
fileType.insert(std::pair<std::string, std::string>("RINEX_FILE_TYPE_BDS_NAV", "F")); // G - GLONASS navigation file.
|
||||||
|
|
||||||
|
|
||||||
boost::posix_time::ptime pt = boost::posix_time::second_clock::local_time();
|
boost::posix_time::ptime pt = boost::posix_time::second_clock::local_time();
|
||||||
tm pt_tm = boost::posix_time::to_tm(pt);
|
tm pt_tm = boost::posix_time::to_tm(pt);
|
||||||
int32_t local_hour = pt_tm.tm_hour;
|
int32_t local_hour = pt_tm.tm_hour;
|
||||||
@@ -416,8 +415,15 @@ std::string Rinex_Printer::createFilename(const std::string& type)
|
|||||||
std::string yearTag = strm3.str();
|
std::string yearTag = strm3.str();
|
||||||
|
|
||||||
std::string typeOfFile = fileType[type];
|
std::string typeOfFile = fileType[type];
|
||||||
|
std::string filename;
|
||||||
std::string filename(stationName + dayOfTheYearTag + hourTag + minTag + "." + yearTag + typeOfFile);
|
if (base_name == "-")
|
||||||
|
{
|
||||||
|
filename = stationName + dayOfTheYearTag + hourTag + minTag + "." + yearTag + typeOfFile;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
filename = base_name + "." + yearTag + typeOfFile;
|
||||||
|
}
|
||||||
return filename;
|
return filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Default constructor. Creates GNSS Navigation and Observables RINEX files and their headers
|
* \brief Default constructor. Creates GNSS Navigation and Observables RINEX files and their headers
|
||||||
*/
|
*/
|
||||||
explicit Rinex_Printer(int version = 0, const std::string& base_path = ".");
|
explicit Rinex_Printer(int version = 0, const std::string& base_path = ".", const std::string& base_name = "-");
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Default destructor. Closes GNSS Navigation and Observables RINEX files
|
* \brief Default destructor. Closes GNSS Navigation and Observables RINEX files
|
||||||
@@ -465,7 +465,7 @@ private:
|
|||||||
* "RINEX_FILE_TYPE_SBAS" - SBAS broadcast data file.
|
* "RINEX_FILE_TYPE_SBAS" - SBAS broadcast data file.
|
||||||
* "RINEX_FILE_TYPE_CLK" - Clock file.
|
* "RINEX_FILE_TYPE_CLK" - Clock file.
|
||||||
*/
|
*/
|
||||||
std::string createFilename(const std::string& type);
|
std::string createFilename(const std::string& type, const std::string& base_name);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Generates the data for the PGM / RUN BY / DATE line
|
* Generates the data for the PGM / RUN BY / DATE line
|
||||||
|
|||||||
@@ -64,14 +64,16 @@ DEFINE_int32(max_lock_fail, 50, "Maximum number of code lock failures before dro
|
|||||||
// cos(2xError_angle)=0.7 -> Error_angle=22 deg
|
// cos(2xError_angle)=0.7 -> Error_angle=22 deg
|
||||||
DEFINE_double(carrier_lock_th, 0.7, "Carrier lock threshold (in rad).");
|
DEFINE_double(carrier_lock_th, 0.7, "Carrier lock threshold (in rad).");
|
||||||
|
|
||||||
DEFINE_string(RINEX_version, "-", "If defined, specifies the RINEX version (2.11 or 3.02). Overrides the configuration file.");
|
|
||||||
|
|
||||||
DEFINE_double(dll_bw_hz, 0.0, "If defined, bandwidth of the DLL low pass filter, in Hz (overrides the configuration file).");
|
DEFINE_double(dll_bw_hz, 0.0, "If defined, bandwidth of the DLL low pass filter, in Hz (overrides the configuration file).");
|
||||||
|
|
||||||
DEFINE_double(pll_bw_hz, 0.0, "If defined, bandwidth of the PLL low pass filter, in Hz (overrides the configuration file).");
|
DEFINE_double(pll_bw_hz, 0.0, "If defined, bandwidth of the PLL low pass filter, in Hz (overrides the configuration file).");
|
||||||
|
|
||||||
DEFINE_int32(carrier_smoothing_factor, DEFAULT_CARRIER_SMOOTHING_FACTOR, "Sets carrier smoothing factor M (overrides the configuration file)");
|
DEFINE_int32(carrier_smoothing_factor, DEFAULT_CARRIER_SMOOTHING_FACTOR, "Sets carrier smoothing factor M (overrides the configuration file)");
|
||||||
|
|
||||||
|
DEFINE_string(RINEX_version, "-", "If defined, specifies the RINEX version (2.11 or 3.02). Overrides the configuration file.");
|
||||||
|
|
||||||
|
DEFINE_string(RINEX_name, "-", "If defined, specifies the RINEX files base name");
|
||||||
|
|
||||||
#if GFLAGS_GREATER_2_0
|
#if GFLAGS_GREATER_2_0
|
||||||
|
|
||||||
static bool ValidateC(const char* flagname, const std::string& value)
|
static bool ValidateC(const char* flagname, const std::string& value)
|
||||||
|
|||||||
@@ -53,6 +53,6 @@ const int32_t DEFAULT_CARRIER_SMOOTHING_FACTOR = 200;
|
|||||||
|
|
||||||
// Declare flags for PVT
|
// Declare flags for PVT
|
||||||
DECLARE_string(RINEX_version); //!< If defined, specifies the RINEX version (2.11 or 3.02). Overrides the configuration file.
|
DECLARE_string(RINEX_version); //!< If defined, specifies the RINEX version (2.11 or 3.02). Overrides the configuration file.
|
||||||
|
DECLARE_string(RINEX_name); //!< If defined, specifies the RINEX files base name
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user