|
|
|
@ -85,38 +85,30 @@ public:
|
|
|
|
|
*/
|
|
|
|
|
~Rinex_Printer();
|
|
|
|
|
|
|
|
|
|
std::fstream obsFile; //!< Output file stream for RINEX observation file
|
|
|
|
|
std::fstream navFile; //!< Output file stream for RINEX navigation data file
|
|
|
|
|
std::fstream sbsFile; //!< Output file stream for RINEX SBAS raw data file
|
|
|
|
|
std::fstream navGalFile; //!< Output file stream for RINEX Galileo navigation data file
|
|
|
|
|
std::fstream navGloFile; //!< Output file stream for RINEX GLONASS navigation data file
|
|
|
|
|
std::fstream navBdsFile; //!< Output file stream for RINEX Galileo navigation data file
|
|
|
|
|
std::fstream navMixFile; //!< Output file stream for RINEX Mixed navigation data file
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Generates the GPS L1 C/A Navigation Data header
|
|
|
|
|
*/
|
|
|
|
|
void rinex_nav_header(std::fstream& out, const Gps_Iono& iono, const Gps_Utc_Model& utc_model, const Gps_Ephemeris& eph);
|
|
|
|
|
void rinex_nav_header(std::fstream& out, const Gps_Iono& iono, const Gps_Utc_Model& utc_model, const Gps_Ephemeris& eph) const;
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Generates the GPS L2C(M) Navigation Data header
|
|
|
|
|
*/
|
|
|
|
|
void rinex_nav_header(std::fstream& out, const Gps_CNAV_Iono& iono, const Gps_CNAV_Utc_Model& utc_model);
|
|
|
|
|
void rinex_nav_header(std::fstream& out, const Gps_CNAV_Iono& iono, const Gps_CNAV_Utc_Model& utc_model) const;
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Generates the Galileo Navigation Data header
|
|
|
|
|
*/
|
|
|
|
|
void rinex_nav_header(std::fstream& out, const Galileo_Iono& iono, const Galileo_Utc_Model& utc_model);
|
|
|
|
|
void rinex_nav_header(std::fstream& out, const Galileo_Iono& iono, const Galileo_Utc_Model& utc_model) const;
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Generates the Mixed (GPS/Galileo) Navigation Data header
|
|
|
|
|
*/
|
|
|
|
|
void rinex_nav_header(std::fstream& out, const Gps_Iono& gps_iono, const Gps_Utc_Model& gps_utc_model, const Gps_Ephemeris& eph, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model);
|
|
|
|
|
void rinex_nav_header(std::fstream& out, const Gps_Iono& gps_iono, const Gps_Utc_Model& gps_utc_model, const Gps_Ephemeris& eph, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model) const;
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Generates the Mixed (GPS CNAV/Galileo) Navigation Data header
|
|
|
|
|
*/
|
|
|
|
|
void rinex_nav_header(std::fstream& out, const Gps_CNAV_Iono& iono, const Gps_CNAV_Utc_Model& utc_model, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model);
|
|
|
|
|
void rinex_nav_header(std::fstream& out, const Gps_CNAV_Iono& iono, const Gps_CNAV_Utc_Model& utc_model, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model) const;
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Generates the GLONASS L1, L2 C/A Navigation Data header
|
|
|
|
@ -126,7 +118,7 @@ public:
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Generates the Mixed (Galileo/GLONASS) Navigation Data header
|
|
|
|
|
*/
|
|
|
|
|
void rinex_nav_header(std::fstream& out, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac);
|
|
|
|
|
void rinex_nav_header(std::fstream& out, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac) const;
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Generates the Mixed (GPS L1 C/A/GLONASS L1, L2) Navigation Data header
|
|
|
|
@ -141,12 +133,12 @@ public:
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Generates the BDS B1I or B3I Navigation Data header
|
|
|
|
|
*/
|
|
|
|
|
void rinex_nav_header(std::fstream& out, const Beidou_Dnav_Iono& iono, const Beidou_Dnav_Utc_Model& utc_model);
|
|
|
|
|
void rinex_nav_header(std::fstream& out, const Beidou_Dnav_Iono& iono, const Beidou_Dnav_Utc_Model& utc_model) const;
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Generates the Mixed GPS L1,L5 + BDS B1I, B3I Navigation Data header
|
|
|
|
|
*/
|
|
|
|
|
void rinex_nav_header(std::fstream& out, const Gps_Iono& gps_iono, const Gps_Utc_Model& gps_utc_model, const Gps_Ephemeris& eph, const Beidou_Dnav_Iono& bds_dnav_iono, const Beidou_Dnav_Utc_Model& bds_dnav_utc_model);
|
|
|
|
|
void rinex_nav_header(std::fstream& out, const Gps_Iono& gps_iono, const Gps_Utc_Model& gps_utc_model, const Gps_Ephemeris& eph, const Beidou_Dnav_Iono& bds_dnav_iono, const Beidou_Dnav_Utc_Model& bds_dnav_utc_model) const;
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Generates the Mixed GPS L2C + BDS B1I, B3I Navigation Data header
|
|
|
|
@ -156,77 +148,77 @@ public:
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Generates the Mixed GLONASS L1,L2 + BDS B1I, B3I Navigation Data header
|
|
|
|
|
*/
|
|
|
|
|
void rinex_nav_header(std::fstream& out, const Glonass_Gnav_Utc_Model& glo_gnav_utc_model, const Beidou_Dnav_Iono& bds_dnav_iono, const Beidou_Dnav_Utc_Model& bds_dnav_utc_model);
|
|
|
|
|
void rinex_nav_header(std::fstream& out, const Glonass_Gnav_Utc_Model& glo_gnav_utc_model, const Beidou_Dnav_Iono& bds_dnav_iono, const Beidou_Dnav_Utc_Model& bds_dnav_utc_model) const;
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Generates the Mixed (Galileo/BDS B1I, B3I) Navigation Data header
|
|
|
|
|
*/
|
|
|
|
|
void rinex_nav_header(std::fstream& out, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model, const Beidou_Dnav_Iono& bds_dnav_iono, const Beidou_Dnav_Utc_Model& bds_dnav_utc_model);
|
|
|
|
|
void rinex_nav_header(std::fstream& out, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model, const Beidou_Dnav_Iono& bds_dnav_iono, const Beidou_Dnav_Utc_Model& bds_dnav_utc_model) const;
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Generates the GPS Observation data header
|
|
|
|
|
*/
|
|
|
|
|
void rinex_obs_header(std::fstream& out, const Gps_Ephemeris& eph, const double d_TOW_first_observation);
|
|
|
|
|
void rinex_obs_header(std::fstream& out, const Gps_Ephemeris& eph, double d_TOW_first_observation);
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Generates the GPS L2 Observation data header
|
|
|
|
|
*/
|
|
|
|
|
void rinex_obs_header(std::fstream& out, const Gps_CNAV_Ephemeris& eph, const double d_TOW_first_observation, const std::string& gps_bands = "2S");
|
|
|
|
|
void rinex_obs_header(std::fstream& out, const Gps_CNAV_Ephemeris& eph, double d_TOW_first_observation, const std::string& gps_bands = "2S");
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Generates the dual frequency GPS L1 & L2/L5 Observation data header
|
|
|
|
|
*/
|
|
|
|
|
void rinex_obs_header(std::fstream& out, const Gps_Ephemeris& eph, const Gps_CNAV_Ephemeris& eph_cnav, const double d_TOW_first_observation, const std::string& gps_bands = "1C 2S");
|
|
|
|
|
void rinex_obs_header(std::fstream& out, const Gps_Ephemeris& eph, const Gps_CNAV_Ephemeris& eph_cnav, double d_TOW_first_observation, const std::string& gps_bands = "1C 2S");
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Generates the Galileo Observation data header. Example: bands("1B"), bands("1B 5X"), bands("5X"), ... Default: "1B".
|
|
|
|
|
*/
|
|
|
|
|
void rinex_obs_header(std::fstream& out, const Galileo_Ephemeris& eph, const double d_TOW_first_observation, const std::string& bands = "1B");
|
|
|
|
|
void rinex_obs_header(std::fstream& out, const Galileo_Ephemeris& eph, double d_TOW_first_observation, const std::string& bands = "1B");
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Generates the Mixed (GPS/Galileo) Observation data header. Example: galileo_bands("1B"), galileo_bands("1B 5X"), galileo_bands("5X"), ... Default: "1B".
|
|
|
|
|
*/
|
|
|
|
|
void rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps_eph, const Galileo_Ephemeris& galileo_eph, const double d_TOW_first_observation, const std::string& galileo_bands = "1B");
|
|
|
|
|
void rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps_eph, const Galileo_Ephemeris& galileo_eph, double d_TOW_first_observation, const std::string& galileo_bands = "1B");
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Generates the Mixed (GPS/Galileo) Observation data header. Example: galileo_bands("1B"), galileo_bands("1B 5X"), galileo_bands("5X"), ... Default: "1B".
|
|
|
|
|
*/
|
|
|
|
|
void rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps_eph, const Gps_CNAV_Ephemeris& eph_cnav, const Galileo_Ephemeris& galileo_eph, const double d_TOW_first_observation, const std::string& gps_bands = "1C 2S", const std::string& galileo_bands = "1B");
|
|
|
|
|
void rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps_eph, const Gps_CNAV_Ephemeris& eph_cnav, const Galileo_Ephemeris& galileo_eph, double d_TOW_first_observation, const std::string& gps_bands = "1C 2S", const std::string& galileo_bands = "1B");
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Generates the Mixed (GPS/Galileo) Observation data header. Example: galileo_bands("1B"), galileo_bands("1B 5X"), galileo_bands("5X"), ... Default: "1B".
|
|
|
|
|
*/
|
|
|
|
|
void rinex_obs_header(std::fstream& out, const Gps_CNAV_Ephemeris& eph_cnav, const Galileo_Ephemeris& galileo_eph, const double d_TOW_first_observation, const std::string& gps_bands = "2S", const std::string& galileo_bands = "1B");
|
|
|
|
|
void rinex_obs_header(std::fstream& out, const Gps_CNAV_Ephemeris& eph_cnav, const Galileo_Ephemeris& galileo_eph, double d_TOW_first_observation, const std::string& gps_bands = "2S", const std::string& galileo_bands = "1B");
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Generates the GLONASS GNAV Observation data header. Example: bands("1C"), bands("1C 2C"), bands("2C"), ... Default: "1C".
|
|
|
|
|
*/
|
|
|
|
|
void rinex_obs_header(std::fstream& out, const Glonass_Gnav_Ephemeris& eph, const double d_TOW_first_observation, const std::string& bands = "1G");
|
|
|
|
|
void rinex_obs_header(std::fstream& out, const Glonass_Gnav_Ephemeris& eph, double d_TOW_first_observation, const std::string& bands = "1G");
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Generates the Mixed (GPS L1 C/A /GLONASS) Observation data header. Example: galileo_bands("1C"), galileo_bands("1B 5X"), galileo_bands("5X"), ... Default: "1B".
|
|
|
|
|
*/
|
|
|
|
|
void rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const double d_TOW_first_observation, const std::string& glonass_bands = "1C");
|
|
|
|
|
void rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, double d_TOW_first_observation, const std::string& glonass_bands = "1C");
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Generates the Mixed (Galileo/GLONASS) Observation data header. Example: galileo_bands("1C"), galileo_bands("1B 5X"), galileo_bands("5X"), ... Default: "1B".
|
|
|
|
|
*/
|
|
|
|
|
void rinex_obs_header(std::fstream& out, const Galileo_Ephemeris& galileo_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const double d_TOW_first_observation, const std::string& galileo_bands = "1B", const std::string& glonass_bands = "1C");
|
|
|
|
|
void rinex_obs_header(std::fstream& out, const Galileo_Ephemeris& galileo_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, double d_TOW_first_observation, const std::string& galileo_bands = "1B", const std::string& glonass_bands = "1C");
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Generates the Mixed (GPS L2C/GLONASS) Observation data header. Example: galileo_bands("1G")... Default: "1G".
|
|
|
|
|
*/
|
|
|
|
|
void rinex_obs_header(std::fstream& out, const Gps_CNAV_Ephemeris& gps_cnav_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const double d_TOW_first_observation, const std::string& glonass_bands = "1G");
|
|
|
|
|
void rinex_obs_header(std::fstream& out, const Gps_CNAV_Ephemeris& gps_cnav_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, double d_TOW_first_observation, const std::string& glonass_bands = "1G");
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Generates the a Beidou B1I Observation data header. Example: beidou_bands("B1")
|
|
|
|
|
*/
|
|
|
|
|
void rinex_obs_header(std::fstream& out, const Beidou_Dnav_Ephemeris& eph, const double d_TOW_first_observation, const std::string& bands);
|
|
|
|
|
void rinex_obs_header(std::fstream& out, const Beidou_Dnav_Ephemeris& eph, double d_TOW_first_observation, const std::string& bands);
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Generates the SBAS raw data header
|
|
|
|
|
*/
|
|
|
|
|
void rinex_sbs_header(std::fstream& out);
|
|
|
|
|
void rinex_sbs_header(std::fstream& out) const;
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Computes the BDS Time and returns a boost::posix_time::ptime object
|
|
|
|
@ -235,27 +227,27 @@ public:
|
|
|
|
|
* \param eph BeiDou DNAV Ephemeris object
|
|
|
|
|
* \param obs_time Observation time in BDT seconds of week
|
|
|
|
|
*/
|
|
|
|
|
boost::posix_time::ptime compute_BDS_time(const Beidou_Dnav_Ephemeris& eph, const double obs_time);
|
|
|
|
|
boost::posix_time::ptime compute_BDS_time(const Beidou_Dnav_Ephemeris& eph, double obs_time) const;
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Computes the UTC time and returns a boost::posix_time::ptime object
|
|
|
|
|
*/
|
|
|
|
|
boost::posix_time::ptime compute_UTC_time(const Gps_Navigation_Message& nav_msg);
|
|
|
|
|
boost::posix_time::ptime compute_UTC_time(const Gps_Navigation_Message& nav_msg) const;
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Computes the GPS time and returns a boost::posix_time::ptime object
|
|
|
|
|
*/
|
|
|
|
|
boost::posix_time::ptime compute_GPS_time(const Gps_Ephemeris& eph, const double obs_time);
|
|
|
|
|
boost::posix_time::ptime compute_GPS_time(const Gps_Ephemeris& eph, double obs_time) const;
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Computes the GPS time and returns a boost::posix_time::ptime object
|
|
|
|
|
*/
|
|
|
|
|
boost::posix_time::ptime compute_GPS_time(const Gps_CNAV_Ephemeris& eph, const double obs_time);
|
|
|
|
|
boost::posix_time::ptime compute_GPS_time(const Gps_CNAV_Ephemeris& eph, double obs_time) const;
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Computes the Galileo time and returns a boost::posix_time::ptime object
|
|
|
|
|
*/
|
|
|
|
|
boost::posix_time::ptime compute_Galileo_time(const Galileo_Ephemeris& eph, const double obs_time);
|
|
|
|
|
boost::posix_time::ptime compute_Galileo_time(const Galileo_Ephemeris& eph, double obs_time) const;
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Computes the UTC Time and returns a boost::posix_time::ptime object
|
|
|
|
@ -264,19 +256,19 @@ public:
|
|
|
|
|
* \param eph GLONASS GNAV Ephemeris object
|
|
|
|
|
* \param obs_time Observation time in GPS seconds of week
|
|
|
|
|
*/
|
|
|
|
|
boost::posix_time::ptime compute_UTC_time(const Glonass_Gnav_Ephemeris& eph, const double obs_time);
|
|
|
|
|
boost::posix_time::ptime compute_UTC_time(const Glonass_Gnav_Ephemeris& eph, double obs_time) const;
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Computes number of leap seconds of GPS relative to UTC
|
|
|
|
|
* \param eph GLONASS GNAV Ephemeris object
|
|
|
|
|
* \param gps_obs_time Observation time in GPS seconds of week
|
|
|
|
|
*/
|
|
|
|
|
double get_leap_second(const Glonass_Gnav_Ephemeris& eph, const double gps_obs_time);
|
|
|
|
|
double get_leap_second(const Glonass_Gnav_Ephemeris& eph, double gps_obs_time) const;
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Writes data from the GPS L1 C/A navigation message into the RINEX file
|
|
|
|
|
*/
|
|
|
|
|
void log_rinex_nav(std::fstream& out, const std::map<int32_t, Gps_Ephemeris>& eph_map);
|
|
|
|
|
void log_rinex_nav(std::fstream& out, const std::map<int32_t, Gps_Ephemeris>& eph_map) const;
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Writes data from the GPS L2 navigation message into the RINEX file
|
|
|
|
@ -286,7 +278,7 @@ public:
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Writes data from the Galileo navigation message into the RINEX file
|
|
|
|
|
*/
|
|
|
|
|
void log_rinex_nav(std::fstream& out, const std::map<int32_t, Galileo_Ephemeris>& eph_map);
|
|
|
|
|
void log_rinex_nav(std::fstream& out, const std::map<int32_t, Galileo_Ephemeris>& eph_map) const;
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Writes data from the Mixed (GPS/Galileo) navigation message into the RINEX file
|
|
|
|
@ -301,12 +293,12 @@ public:
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Writes data from the GLONASS GNAV navigation message into the RINEX file
|
|
|
|
|
*/
|
|
|
|
|
void log_rinex_nav(std::fstream& out, const std::map<int32_t, Glonass_Gnav_Ephemeris>& eph_map);
|
|
|
|
|
void log_rinex_nav(std::fstream& out, const std::map<int32_t, Glonass_Gnav_Ephemeris>& eph_map) const;
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Writes data from the Mixed (GPS/GLONASS GNAV) navigation message into the RINEX file
|
|
|
|
|
*/
|
|
|
|
|
void log_rinex_nav(std::fstream& out, const std::map<int32_t, Gps_Ephemeris>& gps_eph_map, const std::map<int32_t, Glonass_Gnav_Ephemeris>& glonass_gnav_eph_map);
|
|
|
|
|
void log_rinex_nav(std::fstream& out, const std::map<int32_t, Gps_Ephemeris>& gps_eph_map, const std::map<int32_t, Glonass_Gnav_Ephemeris>& glonass_gnav_eph_map) const;
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Writes data from the Mixed (GPS/GLONASS GNAV) navigation message into the RINEX file
|
|
|
|
@ -321,113 +313,118 @@ public:
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Writes data from the Beidou B1I navigation message into the RINEX file
|
|
|
|
|
*/
|
|
|
|
|
void log_rinex_nav(std::fstream& out, const std::map<int32_t, Beidou_Dnav_Ephemeris>& eph_map);
|
|
|
|
|
void log_rinex_nav(std::fstream& out, const std::map<int32_t, Beidou_Dnav_Ephemeris>& eph_map) const;
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Writes GPS L1 observables into the RINEX file
|
|
|
|
|
*/
|
|
|
|
|
void log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
|
|
|
|
|
void log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables) const;
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Writes GPS L2 observables into the RINEX file
|
|
|
|
|
*/
|
|
|
|
|
void log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
|
|
|
|
|
void log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables) const;
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Writes dual frequency GPS L1 and L2 observables into the RINEX file
|
|
|
|
|
*/
|
|
|
|
|
void log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, const Gps_CNAV_Ephemeris& eph_cnav, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables, bool triple_band = false);
|
|
|
|
|
void log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, const Gps_CNAV_Ephemeris& eph_cnav, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables, bool triple_band = false) const;
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Writes Galileo observables into the RINEX file. Example: galileo_bands("1B"), galileo_bands("1B 5X"), galileo_bands("5X"), ... Default: "1B".
|
|
|
|
|
*/
|
|
|
|
|
void log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables, const std::string& galileo_bands = "1B");
|
|
|
|
|
void log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables, const std::string& galileo_bands = "1B") const;
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Writes Mixed GPS / Galileo observables into the RINEX file
|
|
|
|
|
*/
|
|
|
|
|
void log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_eph, const Galileo_Ephemeris& galileo_eph, const double gps_obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
|
|
|
|
|
void log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_eph, const Galileo_Ephemeris& galileo_eph, double gps_obs_time, const std::map<int32_t, Gnss_Synchro>& observables) const;
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Writes Mixed GPS / Galileo observables into the RINEX file
|
|
|
|
|
*/
|
|
|
|
|
void log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& eph, const Galileo_Ephemeris& galileo_eph, double gps_obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
|
|
|
|
|
void log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& eph, const Galileo_Ephemeris& galileo_eph, double gps_obs_time, const std::map<int32_t, Gnss_Synchro>& observables) const;
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Writes Mixed GPS / Galileo observables into the RINEX file
|
|
|
|
|
*/
|
|
|
|
|
void log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_eph, const Gps_CNAV_Ephemeris& gps_cnav_eph, const Galileo_Ephemeris& galileo_eph, double gps_obs_time, const std::map<int32_t, Gnss_Synchro>& observables, bool triple_band = false);
|
|
|
|
|
void log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_eph, const Gps_CNAV_Ephemeris& gps_cnav_eph, const Galileo_Ephemeris& galileo_eph, double gps_obs_time, const std::map<int32_t, Gnss_Synchro>& observables, bool triple_band = false) const;
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Writes GLONASS GNAV observables into the RINEX file. Example: glonass_bands("1C"), galileo_bands("1B 5X"), galileo_bands("5X"), ... Default: "1B".
|
|
|
|
|
*/
|
|
|
|
|
void log_rinex_obs(std::fstream& out, const Glonass_Gnav_Ephemeris& eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables, const std::string& glonass_bands = "1C");
|
|
|
|
|
void log_rinex_obs(std::fstream& out, const Glonass_Gnav_Ephemeris& eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables, const std::string& glonass_bands = "1C") const;
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Writes Mixed GPS L1 C/A - GLONASS observables into the RINEX file
|
|
|
|
|
*/
|
|
|
|
|
void log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const double gps_obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
|
|
|
|
|
void log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, double gps_obs_time, const std::map<int32_t, Gnss_Synchro>& observables) const;
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Writes Mixed GPS L2C - GLONASS observables into the RINEX file
|
|
|
|
|
*/
|
|
|
|
|
void log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& gps_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const double gps_obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
|
|
|
|
|
void log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& gps_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, double gps_obs_time, const std::map<int32_t, Gnss_Synchro>& observables) const;
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Writes Mixed Galileo/GLONASS observables into the RINEX file
|
|
|
|
|
*/
|
|
|
|
|
void log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& galileo_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const double galileo_obs_time, const std::map<int32_t, Gnss_Synchro>& observables);
|
|
|
|
|
void log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& galileo_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, double galileo_obs_time, const std::map<int32_t, Gnss_Synchro>& observables) const;
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Writes BDS B1I observables into the RINEX file
|
|
|
|
|
*/
|
|
|
|
|
void log_rinex_obs(std::fstream& out, const Beidou_Dnav_Ephemeris& eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables, const std::string& bds_bands);
|
|
|
|
|
void log_rinex_obs(std::fstream& out, const Beidou_Dnav_Ephemeris& eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables, const std::string& bds_bands) const;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Represents GPS time in the date time format. Leap years are considered, but leap seconds are not.
|
|
|
|
|
*/
|
|
|
|
|
void to_date_time(int gps_week, int gps_tow, int& year, int& month, int& day, int& hour, int& minute, int& second);
|
|
|
|
|
void to_date_time(int gps_week, int gps_tow, int& year, int& month, int& day, int& hour, int& minute, int& second) const;
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Writes raw SBAS messages into the RINEX file
|
|
|
|
|
*/
|
|
|
|
|
// void log_rinex_sbs(std::fstream & out, const Sbas_Raw_Msg & sbs_message);
|
|
|
|
|
|
|
|
|
|
void update_nav_header(std::fstream& out, const Gps_Utc_Model& utc_model, const Gps_Iono& gps_iono, const Gps_Ephemeris& eph);
|
|
|
|
|
void update_nav_header(std::fstream& out, const Gps_Utc_Model& utc_model, const Gps_Iono& gps_iono, const Gps_Ephemeris& eph) const;
|
|
|
|
|
|
|
|
|
|
void update_nav_header(std::fstream& out, const Gps_CNAV_Utc_Model& utc_model, const Gps_CNAV_Iono& iono);
|
|
|
|
|
void update_nav_header(std::fstream& out, const Gps_CNAV_Utc_Model& utc_model, const Gps_CNAV_Iono& iono) const;
|
|
|
|
|
|
|
|
|
|
void update_nav_header(std::fstream& out, const Gps_Iono& gps_iono, const Gps_Utc_Model& gps_utc_model, const Gps_Ephemeris& eph, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model);
|
|
|
|
|
void update_nav_header(std::fstream& out, const Gps_Iono& gps_iono, const Gps_Utc_Model& gps_utc_model, const Gps_Ephemeris& eph, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model) const;
|
|
|
|
|
|
|
|
|
|
void update_nav_header(std::fstream& out, const Gps_CNAV_Utc_Model& utc_model, const Gps_CNAV_Iono& iono, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model);
|
|
|
|
|
void update_nav_header(std::fstream& out, const Gps_CNAV_Utc_Model& utc_model, const Gps_CNAV_Iono& iono, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model) const;
|
|
|
|
|
|
|
|
|
|
void update_nav_header(std::fstream& out, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& utc_model);
|
|
|
|
|
void update_nav_header(std::fstream& out, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& utc_model) const;
|
|
|
|
|
|
|
|
|
|
void update_nav_header(std::fstream& out, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac);
|
|
|
|
|
void update_nav_header(std::fstream& out, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac) const;
|
|
|
|
|
|
|
|
|
|
void update_nav_header(std::fstream& out, const Gps_Iono& gps_iono, const Gps_Utc_Model& gps_utc, const Gps_Ephemeris& eph, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac);
|
|
|
|
|
void update_nav_header(std::fstream& out, const Gps_Iono& gps_iono, const Gps_Utc_Model& gps_utc, const Gps_Ephemeris& eph, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac) const;
|
|
|
|
|
|
|
|
|
|
void update_nav_header(std::fstream& out, const Gps_CNAV_Iono& gps_iono, const Gps_CNAV_Utc_Model& gps_utc_model, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac);
|
|
|
|
|
void update_nav_header(std::fstream& out, const Gps_CNAV_Iono& gps_iono, const Gps_CNAV_Utc_Model& gps_utc_model, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac) const;
|
|
|
|
|
|
|
|
|
|
void update_nav_header(std::fstream& out, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac);
|
|
|
|
|
void update_nav_header(std::fstream& out, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac) const;
|
|
|
|
|
|
|
|
|
|
void update_nav_header(std::fstream& out, const Beidou_Dnav_Utc_Model& utc_model, const Beidou_Dnav_Iono& beidou_dnav_iono);
|
|
|
|
|
void update_nav_header(std::fstream& out, const Beidou_Dnav_Utc_Model& utc_model, const Beidou_Dnav_Iono& beidou_dnav_iono) const;
|
|
|
|
|
|
|
|
|
|
void update_obs_header(std::fstream& out, const Gps_Utc_Model& utc_model);
|
|
|
|
|
void update_obs_header(std::fstream& out, const Gps_Utc_Model& utc_model) const;
|
|
|
|
|
|
|
|
|
|
void update_obs_header(std::fstream& out, const Gps_CNAV_Utc_Model& utc_model);
|
|
|
|
|
void update_obs_header(std::fstream& out, const Gps_CNAV_Utc_Model& utc_model) const;
|
|
|
|
|
|
|
|
|
|
void update_obs_header(std::fstream& out, const Galileo_Utc_Model& galileo_utc_model);
|
|
|
|
|
void update_obs_header(std::fstream& out, const Galileo_Utc_Model& galileo_utc_model) const;
|
|
|
|
|
|
|
|
|
|
void update_obs_header(std::fstream& out, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model);
|
|
|
|
|
void update_obs_header(std::fstream& out, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model) const;
|
|
|
|
|
|
|
|
|
|
void update_obs_header(std::fstream& out, const Beidou_Dnav_Utc_Model& utc_model);
|
|
|
|
|
void update_obs_header(std::fstream& out, const Beidou_Dnav_Utc_Model& utc_model) const;
|
|
|
|
|
|
|
|
|
|
std::map<std::string, std::string> satelliteSystem; //!< GPS, GLONASS, SBAS payload, Galileo or Beidou
|
|
|
|
|
std::map<std::string, std::string> observationType; //!< PSEUDORANGE, CARRIER_PHASE, DOPPLER, SIGNAL_STRENGTH
|
|
|
|
|
std::map<std::string, std::string> observationCode; //!< GNSS observation descriptors
|
|
|
|
|
std::string stringVersion; //!< RINEX version (2.10/2.11 or 3.01/3.02)
|
|
|
|
|
void set_pre_2009_file(bool pre_2009_file);
|
|
|
|
|
|
|
|
|
|
std::fstream obsFile; //!< Output file stream for RINEX observation file
|
|
|
|
|
std::fstream navFile; //!< Output file stream for RINEX navigation data file
|
|
|
|
|
std::fstream sbsFile; //!< Output file stream for RINEX SBAS raw data file
|
|
|
|
|
std::fstream navGalFile; //!< Output file stream for RINEX Galileo navigation data file
|
|
|
|
|
std::fstream navGloFile; //!< Output file stream for RINEX GLONASS navigation data file
|
|
|
|
|
std::fstream navBdsFile; //!< Output file stream for RINEX Galileo navigation data file
|
|
|
|
|
std::fstream navMixFile; //!< Output file stream for RINEX Mixed navigation data file
|
|
|
|
|
|
|
|
|
|
std::string navfilename;
|
|
|
|
|
std::string obsfilename;
|
|
|
|
@ -437,13 +434,11 @@ public:
|
|
|
|
|
std::string navBdsfilename;
|
|
|
|
|
std::string navMixfilename;
|
|
|
|
|
|
|
|
|
|
void set_pre_2009_file(bool pre_2009_file);
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
/*
|
|
|
|
|
* Generation of RINEX signal strength indicators
|
|
|
|
|
*/
|
|
|
|
|
int signalStrength(const double snr);
|
|
|
|
|
int signalStrength(double snr) const;
|
|
|
|
|
|
|
|
|
|
/* Creates RINEX file names according to the naming convention
|
|
|
|
|
*
|
|
|
|
@ -461,17 +456,17 @@ private:
|
|
|
|
|
* "RINEX_FILE_TYPE_SBAS" - SBAS broadcast data file.
|
|
|
|
|
* "RINEX_FILE_TYPE_CLK" - Clock file.
|
|
|
|
|
*/
|
|
|
|
|
std::string createFilename(const std::string& type, const std::string& base_name);
|
|
|
|
|
std::string createFilename(const std::string& type, const std::string& base_name) const;
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Generates the data for the PGM / RUN BY / DATE line
|
|
|
|
|
*/
|
|
|
|
|
std::string getLocalTime();
|
|
|
|
|
std::string getLocalTime() const;
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Checks that the line is 80 characters length
|
|
|
|
|
*/
|
|
|
|
|
void lengthCheck(const std::string& line);
|
|
|
|
|
void lengthCheck(const std::string& line) const;
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* If the string is bigger than length, truncate it from the right.
|
|
|
|
@ -487,8 +482,8 @@ private:
|
|
|
|
|
* \param[in] pad character to pad string with (blank by default).
|
|
|
|
|
* \return a reference to \a s. */
|
|
|
|
|
inline std::string& leftJustify(std::string& s,
|
|
|
|
|
const std::string::size_type length,
|
|
|
|
|
const char pad = ' ');
|
|
|
|
|
std::string::size_type length,
|
|
|
|
|
char pad = ' ') const;
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* If the string is bigger than length, truncate it from the right.
|
|
|
|
@ -504,8 +499,8 @@ private:
|
|
|
|
|
* \param[in] pad character to pad string with (blank by default).
|
|
|
|
|
* \return a reference to \a s. */
|
|
|
|
|
inline std::string leftJustify(const std::string& s,
|
|
|
|
|
const std::string::size_type length,
|
|
|
|
|
const char pad = ' ')
|
|
|
|
|
std::string::size_type length,
|
|
|
|
|
char pad = ' ') const
|
|
|
|
|
{
|
|
|
|
|
std::string t(s);
|
|
|
|
|
return leftJustify(t, length, pad);
|
|
|
|
@ -519,8 +514,8 @@ private:
|
|
|
|
|
* the pad character (\a pad). The default pad
|
|
|
|
|
* character is a blank. */
|
|
|
|
|
inline std::string& rightJustify(std::string& s,
|
|
|
|
|
const std::string::size_type length,
|
|
|
|
|
const char pad = ' ');
|
|
|
|
|
std::string::size_type length,
|
|
|
|
|
char pad = ' ') const;
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Right-justifies the receiver in a string of the specified
|
|
|
|
@ -529,8 +524,8 @@ private:
|
|
|
|
|
* the pad character (\a pad). The default pad
|
|
|
|
|
* character is a blank.*/
|
|
|
|
|
inline std::string rightJustify(const std::string& s,
|
|
|
|
|
const std::string::size_type length,
|
|
|
|
|
const char pad = ' ')
|
|
|
|
|
std::string::size_type length,
|
|
|
|
|
char pad = ' ') const
|
|
|
|
|
{
|
|
|
|
|
std::string t(s);
|
|
|
|
|
return rightJustify(t, length, pad);
|
|
|
|
@ -547,11 +542,11 @@ private:
|
|
|
|
|
* exponentials above three characters in length. If false, it removes
|
|
|
|
|
* that check.
|
|
|
|
|
*/
|
|
|
|
|
inline std::string doub2sci(const double& d,
|
|
|
|
|
const std::string::size_type length,
|
|
|
|
|
const std::string::size_type expLen,
|
|
|
|
|
const bool showSign = true,
|
|
|
|
|
const bool checkSwitch = true);
|
|
|
|
|
inline std::string doub2sci(double d,
|
|
|
|
|
std::string::size_type length,
|
|
|
|
|
std::string::size_type expLen,
|
|
|
|
|
bool showSign = true,
|
|
|
|
|
bool checkSwitch = true) const;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
@ -569,10 +564,10 @@ private:
|
|
|
|
|
* zero. For example -> 0.87654E-0004 or -0.1234E00005.
|
|
|
|
|
*/
|
|
|
|
|
inline std::string& sci2for(std::string& aStr,
|
|
|
|
|
const std::string::size_type startPos = 0,
|
|
|
|
|
const std::string::size_type length = std::string::npos,
|
|
|
|
|
const std::string::size_type expLen = 3,
|
|
|
|
|
const bool checkSwitch = true);
|
|
|
|
|
std::string::size_type startPos = 0,
|
|
|
|
|
std::string::size_type length = std::string::npos,
|
|
|
|
|
std::string::size_type expLen = 3,
|
|
|
|
|
bool checkSwitch = true) const;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
@ -587,10 +582,10 @@ private:
|
|
|
|
|
* that check.
|
|
|
|
|
* @return a string containing \a d in FORTRAN notation.
|
|
|
|
|
*/
|
|
|
|
|
inline std::string doub2for(const double& d,
|
|
|
|
|
const std::string::size_type length,
|
|
|
|
|
const std::string::size_type expLen,
|
|
|
|
|
const bool checkSwitch = true);
|
|
|
|
|
inline std::string doub2for(double d,
|
|
|
|
|
std::string::size_type length,
|
|
|
|
|
std::string::size_type expLen,
|
|
|
|
|
bool checkSwitch = true) const;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
@ -598,20 +593,20 @@ private:
|
|
|
|
|
* @param s string containing a number.
|
|
|
|
|
* @return double representation of string.
|
|
|
|
|
*/
|
|
|
|
|
inline double asDouble(const std::string& s)
|
|
|
|
|
inline double asDouble(const std::string& s) const
|
|
|
|
|
{
|
|
|
|
|
return strtod(s.c_str(), nullptr);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inline int toInt(std::string bitString, int sLength);
|
|
|
|
|
inline int toInt(const std::string& bitString, int sLength) const;
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Convert a string to an integer.
|
|
|
|
|
* @param s string containing a number.
|
|
|
|
|
* @return int64_t integer representation of string.
|
|
|
|
|
*/
|
|
|
|
|
inline int64_t asInt(const std::string& s)
|
|
|
|
|
inline int64_t asInt(const std::string& s) const
|
|
|
|
|
{
|
|
|
|
|
return strtol(s.c_str(), nullptr, 10);
|
|
|
|
|
}
|
|
|
|
@ -623,8 +618,8 @@ private:
|
|
|
|
|
* @param precision the number of decimal places you want displayed.
|
|
|
|
|
* @return string representation of \a x.
|
|
|
|
|
*/
|
|
|
|
|
inline std::string asString(const double x,
|
|
|
|
|
const std::string::size_type precision = 17);
|
|
|
|
|
inline std::string asString(double x,
|
|
|
|
|
std::string::size_type precision = 17) const;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
@ -633,8 +628,8 @@ private:
|
|
|
|
|
* @param precision the number of decimal places you want displayed.
|
|
|
|
|
* @return string representation of \a x.
|
|
|
|
|
*/
|
|
|
|
|
inline std::string asString(const long double x,
|
|
|
|
|
const std::string::size_type precision = 21);
|
|
|
|
|
inline std::string asString(long double x,
|
|
|
|
|
std::string::size_type precision = 21) const;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
@ -644,9 +639,14 @@ private:
|
|
|
|
|
* @return string representation of \a x.
|
|
|
|
|
*/
|
|
|
|
|
template <class X>
|
|
|
|
|
inline std::string asString(const X x);
|
|
|
|
|
inline std::string asString(const X x) const;
|
|
|
|
|
|
|
|
|
|
inline std::string asFixWidthString(const int x, const int width, char fill_digit);
|
|
|
|
|
inline std::string asFixWidthString(int x, int width, char fill_digit) const;
|
|
|
|
|
|
|
|
|
|
std::map<std::string, std::string> satelliteSystem; // GPS, GLONASS, SBAS payload, Galileo or Beidou
|
|
|
|
|
std::map<std::string, std::string> observationType; // PSEUDORANGE, CARRIER_PHASE, DOPPLER, SIGNAL_STRENGTH
|
|
|
|
|
std::map<std::string, std::string> observationCode; // GNSS observation descriptors
|
|
|
|
|
std::string stringVersion; // RINEX version (2.10/2.11 or 3.01/3.02)
|
|
|
|
|
|
|
|
|
|
double fake_cnav_iode;
|
|
|
|
|
int version; // RINEX version (2 for 2.10/2.11 and 3 for 3.01)
|
|
|
|
@ -658,8 +658,8 @@ private:
|
|
|
|
|
// Implementation of inline functions (modified versions from GPSTk https://github.com/SGL-UT/GPSTk)
|
|
|
|
|
|
|
|
|
|
inline std::string& Rinex_Printer::leftJustify(std::string& s,
|
|
|
|
|
const std::string::size_type length,
|
|
|
|
|
const char pad)
|
|
|
|
|
std::string::size_type length,
|
|
|
|
|
char pad) const
|
|
|
|
|
{
|
|
|
|
|
if (length < s.length())
|
|
|
|
|
{
|
|
|
|
@ -676,8 +676,8 @@ inline std::string& Rinex_Printer::leftJustify(std::string& s,
|
|
|
|
|
// if the string is bigger than length, truncate it from the left.
|
|
|
|
|
// otherwise, add pad characters to its left.
|
|
|
|
|
inline std::string& Rinex_Printer::rightJustify(std::string& s,
|
|
|
|
|
const std::string::size_type length,
|
|
|
|
|
const char pad)
|
|
|
|
|
std::string::size_type length,
|
|
|
|
|
char pad) const
|
|
|
|
|
{
|
|
|
|
|
if (length < s.length())
|
|
|
|
|
{
|
|
|
|
@ -691,12 +691,12 @@ inline std::string& Rinex_Printer::rightJustify(std::string& s,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inline std::string Rinex_Printer::doub2for(const double& d,
|
|
|
|
|
const std::string::size_type length,
|
|
|
|
|
const std::string::size_type expLen,
|
|
|
|
|
const bool checkSwitch)
|
|
|
|
|
inline std::string Rinex_Printer::doub2for(double d,
|
|
|
|
|
std::string::size_type length,
|
|
|
|
|
std::string::size_type expLen,
|
|
|
|
|
bool checkSwitch) const
|
|
|
|
|
{
|
|
|
|
|
short exponentLength = expLen;
|
|
|
|
|
int16_t exponentLength = expLen;
|
|
|
|
|
|
|
|
|
|
/* Validate the assumptions regarding the input arguments */
|
|
|
|
|
if (exponentLength < 0)
|
|
|
|
@ -716,14 +716,14 @@ inline std::string Rinex_Printer::doub2for(const double& d,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inline std::string Rinex_Printer::doub2sci(const double& d,
|
|
|
|
|
const std::string::size_type length,
|
|
|
|
|
const std::string::size_type expLen,
|
|
|
|
|
const bool showSign,
|
|
|
|
|
const bool checkSwitch)
|
|
|
|
|
inline std::string Rinex_Printer::doub2sci(double d,
|
|
|
|
|
std::string::size_type length,
|
|
|
|
|
std::string::size_type expLen,
|
|
|
|
|
bool showSign,
|
|
|
|
|
bool checkSwitch) const
|
|
|
|
|
{
|
|
|
|
|
std::string toReturn;
|
|
|
|
|
short exponentLength = expLen;
|
|
|
|
|
int16_t exponentLength = expLen;
|
|
|
|
|
|
|
|
|
|
/* Validate the assumptions regarding the input arguments */
|
|
|
|
|
if (exponentLength < 0)
|
|
|
|
@ -758,10 +758,10 @@ inline std::string Rinex_Printer::doub2sci(const double& d,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inline std::string& Rinex_Printer::sci2for(std::string& aStr,
|
|
|
|
|
const std::string::size_type startPos,
|
|
|
|
|
const std::string::size_type length,
|
|
|
|
|
const std::string::size_type expLen,
|
|
|
|
|
const bool checkSwitch)
|
|
|
|
|
std::string::size_type startPos,
|
|
|
|
|
std::string::size_type length,
|
|
|
|
|
std::string::size_type expLen,
|
|
|
|
|
bool checkSwitch) const
|
|
|
|
|
{
|
|
|
|
|
std::string::size_type idx = aStr.find('.', startPos);
|
|
|
|
|
int expAdd = 0;
|
|
|
|
@ -854,7 +854,7 @@ inline std::string& Rinex_Printer::sci2for(std::string& aStr,
|
|
|
|
|
} // end sci2for
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inline std::string asString(const long double x, const std::string::size_type precision)
|
|
|
|
|
inline std::string asString(long double x, std::string::size_type precision)
|
|
|
|
|
{
|
|
|
|
|
std::ostringstream ss;
|
|
|
|
|
ss << std::fixed << std::setprecision(precision) << x;
|
|
|
|
@ -862,7 +862,7 @@ inline std::string asString(const long double x, const std::string::size_type pr
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inline std::string Rinex_Printer::asString(const double x, const std::string::size_type precision)
|
|
|
|
|
inline std::string Rinex_Printer::asString(double x, std::string::size_type precision) const
|
|
|
|
|
{
|
|
|
|
|
std::ostringstream ss;
|
|
|
|
|
ss << std::fixed << std::setprecision(precision) << x;
|
|
|
|
@ -870,7 +870,7 @@ inline std::string Rinex_Printer::asString(const double x, const std::string::si
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inline std::string Rinex_Printer::asFixWidthString(const int x, const int width, char fill_digit)
|
|
|
|
|
inline std::string Rinex_Printer::asFixWidthString(int x, int width, char fill_digit) const
|
|
|
|
|
{
|
|
|
|
|
std::ostringstream ss;
|
|
|
|
|
ss << std::setfill(fill_digit) << std::setw(width) << x;
|
|
|
|
@ -884,7 +884,7 @@ inline int64_t asInt(const std::string& s)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inline int Rinex_Printer::toInt(std::string bitString, int sLength)
|
|
|
|
|
inline int Rinex_Printer::toInt(const std::string& bitString, int sLength) const
|
|
|
|
|
{
|
|
|
|
|
int tempInt;
|
|
|
|
|
int num = 0;
|
|
|
|
@ -898,7 +898,7 @@ inline int Rinex_Printer::toInt(std::string bitString, int sLength)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
template <class X>
|
|
|
|
|
inline std::string Rinex_Printer::asString(const X x)
|
|
|
|
|
inline std::string Rinex_Printer::asString(const X x) const
|
|
|
|
|
{
|
|
|
|
|
std::ostringstream ss;
|
|
|
|
|
ss << x;
|
|
|
|
|