mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-31 03:14:56 +00:00
Adding RINEX support for GLONASS GNAV processing
Adds RINEX v2 and v3 support for GLONASS satellites processing including observation and navigation data records. Also adds conversion of ephemeris records in GNSS-SDR format to RTKLib format
This commit is contained in:
parent
c445ac261b
commit
2d40780689
@ -365,7 +365,7 @@ rtklib_pvt_cc::~rtklib_pvt_cc()
|
||||
msgctl(sysv_msqid, IPC_RMID, NULL);
|
||||
|
||||
//save GPS L2CM ephemeris to XML file
|
||||
std::string file_name = "eph_GPS_L2CM.xml";
|
||||
std::string file_name="eph_GPS_L2CM.xml";
|
||||
|
||||
if (d_ls_pvt->gps_cnav_ephemeris_map.size() > 0)
|
||||
{
|
||||
@ -377,7 +377,7 @@ rtklib_pvt_cc::~rtklib_pvt_cc()
|
||||
ofs.close();
|
||||
LOG(INFO) << "Saved GPS L2CM Ephemeris map data";
|
||||
}
|
||||
catch (const std::exception & e)
|
||||
catch (std::exception& e)
|
||||
{
|
||||
LOG(WARNING) << e.what();
|
||||
}
|
||||
@ -520,7 +520,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
|
||||
std::map<int,Gps_Ephemeris>::const_iterator tmp_eph_iter_gps = d_ls_pvt->gps_ephemeris_map.find(in[i][epoch].PRN);
|
||||
std::map<int,Galileo_Ephemeris>::const_iterator tmp_eph_iter_gal = d_ls_pvt->galileo_ephemeris_map.find(in[i][epoch].PRN);
|
||||
std::map<int,Gps_CNAV_Ephemeris>::const_iterator tmp_eph_iter_cnav = d_ls_pvt->gps_cnav_ephemeris_map.find(in[i][epoch].PRN);
|
||||
std::map<int,Glonass_Gnav_Ephemeris>::const_iterator tmp_eph_iter_glo_gnav = d_ls_pvt->glonass_gnav_ephemeris_map.find(in[i][epoch].PRN);
|
||||
std::map<int,Glonass_Gnav_Ephemeris>::const_iterator tmp_eph_iter_glo_gnav = d_ls_pvt->glonass_gnav_ephemeris_map.find(in[i][epoch].PRN);
|
||||
if(((tmp_eph_iter_gps->second.i_satellite_PRN == in[i][epoch].PRN) && (std::string(in[i][epoch].Signal).compare("1C") == 0))
|
||||
|| ((tmp_eph_iter_cnav->second.i_satellite_PRN == in[i][epoch].PRN) && (std::string(in[i][epoch].Signal).compare("2S") == 0))
|
||||
|| ((tmp_eph_iter_gal->second.i_satellite_PRN == in[i][epoch].PRN) && (std::string(in[i][epoch].Signal).compare("1B") == 0))
|
||||
@ -680,12 +680,8 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
|
||||
* 23 | GLONASS L1 C/A
|
||||
* 24 | GLONASS L2 C/A
|
||||
* 25 | GLONASS L1 C/A + GLONASS L2 C/A
|
||||
* 26 | GLONASS L1 C/A + GPS L1 C/A
|
||||
* 27 | GLONASS L1 C/A + GPS L2C
|
||||
* 28 | GLONASS L1 C/A + GPS L5
|
||||
* 29 | GLONASS L1 C/A + Galileo E1B
|
||||
* 30 | GLONASS L1 C/A + Galileo E5a
|
||||
* 31 | GLONASS L1 C/A + Galileo E5b
|
||||
* 26 | GPS L1 C/A + GLONASS L1 C/A
|
||||
* 27 | Galileo E1B + GLONASS L1 C/A
|
||||
*/
|
||||
|
||||
// ####################### RINEX FILES #################
|
||||
@ -842,53 +838,23 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
|
||||
}
|
||||
}
|
||||
|
||||
if(type_of_rx == 26) // GLONASS L1 C/A + GPS L1 C/A
|
||||
{
|
||||
if ((glonass_gnav_ephemeris_iter != d_ls_pvt->glonass_gnav_ephemeris_map.end()) && (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.cend()) )
|
||||
{
|
||||
std::string gps_signal("1C 1C");
|
||||
rp->rinex_obs_header(rp->obsFile, glonass_gnav_ephemeris_iter->second, gps_ephemeris_iter->second, d_rx_time, gps_signal);
|
||||
rp->rinex_nav_header(rp->navMixFile, d_ls_pvt->glonass_gnav_utc_model, d_ls_pvt->glonass_gnav_almanac, d_ls_pvt->gps_iono, d_ls_pvt->gps_utc_model);
|
||||
b_rinex_header_written = true; // do not write header anymore
|
||||
}
|
||||
}
|
||||
if(type_of_rx == 27) // GLONASS L1 C/A + GPS L2C
|
||||
if(type_of_rx == 26) // GPS L1 C/A + GLONASS L1 C/A
|
||||
{
|
||||
if ((glonass_gnav_ephemeris_iter != d_ls_pvt->glonass_gnav_ephemeris_map.cend()) && (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.cend()) )
|
||||
{
|
||||
std::string gps_signal("1C 1C");
|
||||
rp->rinex_obs_header(rp->obsFile, glonass_gnav_ephemeris_iter->second, gps_ephemeris_iter->second, d_rx_time, gps_signal);
|
||||
rp->rinex_nav_header(rp->navMixFile, d_ls_pvt->glonass_gnav_utc_model, d_ls_pvt->glonass_gnav_almanac, d_ls_pvt->gps_iono, d_ls_pvt->gps_utc_model);
|
||||
std::string glo_signal("1C");
|
||||
rp->rinex_obs_header(rp->obsFile, gps_ephemeris_iter->second, glonass_gnav_ephemeris_iter->second, d_rx_time, glo_signal);
|
||||
rp->rinex_nav_header(rp->navMixFile, d_ls_pvt->gps_iono, d_ls_pvt->gps_utc_model, d_ls_pvt->glonass_gnav_utc_model, d_ls_pvt->glonass_gnav_almanac);
|
||||
b_rinex_header_written = true; // do not write header anymore
|
||||
}
|
||||
}
|
||||
if(type_of_rx == 29) // GLONASS L1 C/A + Galileo E1B
|
||||
if(type_of_rx == 27) // Galileo E1B + GLONASS L1 C/A
|
||||
{
|
||||
if ((glonass_gnav_ephemeris_iter != d_ls_pvt->glonass_gnav_ephemeris_map.cend()) && (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.cend()) )
|
||||
{
|
||||
std::string gal_signal("1C 1B");
|
||||
rp->rinex_obs_header(rp->obsFile, glonass_gnav_ephemeris_iter->second, galileo_ephemeris_iter->second, d_rx_time, gal_signal);
|
||||
rp->rinex_nav_header(rp->navMixFile, d_ls_pvt->glonass_gnav_utc_model, d_ls_pvt->glonass_gnav_almanac, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->galileo_almanac);
|
||||
b_rinex_header_written = true; // do not write header anymore
|
||||
}
|
||||
}
|
||||
if(type_of_rx == 30) // GLONASS L1 C/A + Galileo E5a
|
||||
{
|
||||
if ((glonass_gnav_ephemeris_iter != d_ls_pvt->glonass_gnav_ephemeris_map.cend()) && (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.cend()) )
|
||||
{
|
||||
std::string gal_signal("1C 5X");
|
||||
rp->rinex_obs_header(rp->obsFile, glonass_gnav_ephemris_iter->second, galileo_ephemeris_iter->second, d_rx_time, gal_signal);
|
||||
rp->rinex_nav_header(rp->navMixFile, d_ls_pvt->glonass_gnav_utc_model, d_ls_pvt->glonass_gnav_almanac, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->galileo_almanac);
|
||||
b_rinex_header_written = true; // do not write header anymore
|
||||
}
|
||||
}
|
||||
if(type_of_rx == 31) // GLONASS L1 C/A + Galileo E5b
|
||||
{
|
||||
if ((glonass_gnav_ephemeris_iter != d_ls_pvt->glonass_gnav_ephemeris_map.cend()) && (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.cend()) )
|
||||
{
|
||||
std::string gal_signal("1C 7X");
|
||||
rp->rinex_obs_header(rp->obsFile, glonass_gnav_ephemris_iter->second, galileo_ephemeris_iter->second, d_rx_time, gal_signal);
|
||||
rp->rinex_nav_header(rp->navMixFile, d_ls_pvt->glonass_gnav_utc_model, d_ls_pvt->glonass_gnav_almanac, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->galileo_almanac);
|
||||
std::string glo_signal("1C");
|
||||
rp->rinex_obs_header(rp->obsFile, galileo_ephemeris_iter->second, glonass_gnav_ephemeris_iter->second, d_rx_time, glo_signal);
|
||||
rp->rinex_nav_header(rp->navMixFile, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->galileo_almanac, d_ls_pvt->glonass_gnav_utc_model, d_ls_pvt->glonass_gnav_almanac);
|
||||
b_rinex_header_written = true; // do not write header anymore
|
||||
}
|
||||
}
|
||||
@ -925,17 +891,13 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
|
||||
{
|
||||
rp->log_rinex_nav(rp->navGloFile, d_ls_pvt->glonass_gnav_ephemeris_map);
|
||||
}
|
||||
if((type_of_rx == 26)) // GLONASS L1 C/A + GPS L1 C/A
|
||||
if((type_of_rx == 26)) // GPS L1 C/A + GLONASS L1 C/A
|
||||
{
|
||||
rp->log_rinex_nav(rp->navMixFile, d_ls_pvt->glonass_gnav_ephemeris_map, d_ls_pvt->gps_ephemeris_map);
|
||||
rp->log_rinex_nav(rp->navMixFile, d_ls_pvt->gps_ephemeris_map, d_ls_pvt->glonass_gnav_ephemeris_map);
|
||||
}
|
||||
if((type_of_rx == 27)) // GLONASS L1 C/A + GPS L2C
|
||||
if((type_of_rx == 27)) // Galileo E1B + GLONASS L1 C/A
|
||||
{
|
||||
rp->log_rinex_nav(rp->navMixFile, d_ls_pvt->glonass_gnav_ephemeris_map, d_ls_pvt->gps_cnav_ephemeris_map);
|
||||
}
|
||||
if((type_of_rx == 29) || (type_of_rx == 30) || (type_of_rx == 31)) // GLONASS L1 C/A + Galileo
|
||||
{
|
||||
rp->log_rinex_nav(rp->navMixFile, d_ls_pvt->glonass_gnav_ephemeris_map, d_ls_pvt->galileo_ephemeris_map);
|
||||
rp->log_rinex_nav(rp->navMixFile, d_ls_pvt->galileo_ephemeris_map, d_ls_pvt->glonass_gnav_ephemeris_map);
|
||||
}
|
||||
}
|
||||
galileo_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.cbegin();
|
||||
@ -1102,78 +1064,33 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
|
||||
b_rinex_header_updated = true;
|
||||
}
|
||||
}
|
||||
if(type_of_rx == 26) // GLONASS L1 C/A + GPS L1 C/A
|
||||
if(type_of_rx == 26) // GPS L1 C/A + GLONASS L1 C/A
|
||||
{
|
||||
if ((glonass_gnav_ephemeris_iter != d_ls_pvt->glonass_gnav_ephemeris_map.end()) && (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end()) )
|
||||
{
|
||||
std::string gps_signal("1C 1C");
|
||||
rp->log_rinex_obs(rp->obsFile, glonass_gnav_ephemeris_iter->second, gps_ephemeris_iter->second, d_rx_time, gps_signal);
|
||||
std::string glo_signal("1C");
|
||||
rp->log_rinex_obs(rp->obsFile, gps_ephemeris_iter->second, glonass_gnav_ephemeris_iter->second, d_rx_time, glo_signal);
|
||||
|
||||
}
|
||||
if (!b_rinex_header_updated && (d_ls_pvt->glonass_gnav_utc_model.d_tau_c != 0))
|
||||
if (!b_rinex_header_updated && (d_ls_pvt->gps_utc_model.d_A0 != 0))
|
||||
{
|
||||
rp->update_obs_header(rp->obsFile, d_ls_pvt->glonass_gnav_utc_model, d_ls_pvt->glonass_gnav_almanac, d_ls_pvt->gps_iono, d_ls_pvt->gps_utc_model);
|
||||
rp->update_nav_header(rp->navMixFile, d_ls_pvt->glonass_gnav_utc_model, d_ls_pvt->glonass_gnav_almanac, d_ls_pvt->gps_iono, d_ls_pvt->gps_utc_model);
|
||||
rp->update_obs_header(rp->obsFile, d_ls_pvt->gps_utc_model);
|
||||
rp->update_nav_header(rp->navMixFile, d_ls_pvt->gps_iono, d_ls_pvt->gps_utc_model, d_ls_pvt->glonass_gnav_utc_model, d_ls_pvt->glonass_gnav_almanac);
|
||||
b_rinex_header_updated = true; // do not write header anymore
|
||||
}
|
||||
}
|
||||
if(type_of_rx == 27) // GLONASS L1 C/A + GPS L1 C/A
|
||||
{
|
||||
if ((glonass_gnav_ephemeris_iter != d_ls_pvt->glonass_gnav_ephemeris_map.end()) && (gps_cnav_ephemeris_iter != d_ls_pvt->gps_cnav_ephemeris_map.end()) )
|
||||
{
|
||||
std::string gps_signal("1C 2S");
|
||||
rp->log_rinex_obs(rp->obsFile, glonass_gnav_ephemeris_iter->second, gps_cnav_ephemeris_iter->second, d_rx_time, gps_signal);
|
||||
|
||||
}
|
||||
if (!b_rinex_header_updated && (d_ls_pvt->glonass_gnav_utc_model.d_tau_c != 0))
|
||||
{
|
||||
rp->update_obs_header(rp->navMixFile, d_ls_pvt->glonass_gnav_utc_model, d_ls_pvt->glonass_gnav_almanac, d_ls_pvt->gps_cnav_iono, d_ls_pvt->gps_cnav_utc_model);
|
||||
rp->update_nav_header(rp->navMixFile, d_ls_pvt->glonass_gnav_utc_model, d_ls_pvt->glonass_gnav_almanac, d_ls_pvt->gps_cnav_iono, d_ls_pvt->gps_cnav_utc_model);
|
||||
b_rinex_header_updated = true; // do not write header anymore
|
||||
}
|
||||
}
|
||||
if(type_of_rx == 29) // GLONASS L1 C/A + Galileo E1B
|
||||
if(type_of_rx == 27) // Galileo E1B + GLONASS L1 C/A
|
||||
{
|
||||
if ((glonass_gnav_ephemeris_iter != d_ls_pvt->glonass_gnav_ephemeris_map.end()) && (gal_ephemeris_iter != d_ls_pvt->gal_ephemeris_map.end()) )
|
||||
{
|
||||
std::string gal_signal("1C 1B");
|
||||
rp->log_rinex_obs(rp->obsFile, glonass_gnav_ephemeris_iter->second, galileo_ephemeris_iter->second, d_rx_time, gal_signal);
|
||||
std::string glo_signal("1C");
|
||||
rp->log_rinex_obs(rp->obsFile, galileo_ephemeris_iter->second, glonass_gnav_ephemeris_iter->second, d_rx_time, glo_signal);
|
||||
|
||||
}
|
||||
if (!b_rinex_header_updated && (d_ls_pvt->glonass_gnav_utc_model.d_tau_c != 0))
|
||||
if (!b_rinex_header_updated && (d_ls_pvt->galileo_utc_model.A0_6 != 0))
|
||||
{
|
||||
rp->update_obs_header(rp->obsFile, d_ls_pvt->glonass_gnav_utc_model);
|
||||
rp->update_nav_header(rp->navMixFile, d_ls_pvt->glonass_gnav_utc_model, d_ls_pvt->glonass_gnav_almanac, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->galileo_almanac);
|
||||
b_rinex_header_updated = true; // do not write header anymore
|
||||
}
|
||||
}
|
||||
if(type_of_rx == 30) // GLONASS L1 C/A + Galileo E5a
|
||||
{
|
||||
if ((glonass_gnav_ephemeris_iter != d_ls_pvt->glonass_gnav_ephemeris_map.end()) && (gal_ephemeris_iter != d_ls_pvt->gal_ephemeris_map.end()) )
|
||||
{
|
||||
std::string gal_signal("1C 5X");
|
||||
rp->log_rinex_obs(rp->obsFile, glonass_gnav_ephemeris_iter->second, galileo_ephemeris_iter->second, d_rx_time, gal_signal);
|
||||
|
||||
}
|
||||
if (!b_rinex_header_updated && (d_ls_pvt->glonass_gnav_utc_model.d_tau_c != 0))
|
||||
{
|
||||
rp->update_obs_header(rp->obsFile, d_ls_pvt->glonass_gnav_utc_model);
|
||||
rp->update_nav_header(rp->navMixFile, d_ls_pvt->glonass_gnav_utc_model, d_ls_pvt->glonass_gnav_almanac, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->galileo_almanac);
|
||||
b_rinex_header_updated = true; // do not write header anymore
|
||||
}
|
||||
}
|
||||
if(type_of_rx == 31) // GLONASS L1 C/A + Galileo E5b
|
||||
{
|
||||
if ((glonass_gnav_ephemeris_iter != d_ls_pvt->glonass_gnav_ephemeris_map.end()) && (gal_ephemeris_iter != d_ls_pvt->gal_ephemeris_map.end()) )
|
||||
{
|
||||
std::string gal_signal("1C 7X");
|
||||
rp->log_rinex_obs(rp->obsFile, glonass_gnav_ephemeris_iter->second, galileo_ephemeris_iter->second, d_rx_time, gal_signal);
|
||||
|
||||
}
|
||||
if (!b_rinex_header_updated && (d_ls_pvt->glonass_gnav_utc_model.d_tau_c != 0))
|
||||
{
|
||||
rp->update_obs_header(rp->obsFile, d_ls_pvt->glonass_gnav_utc_model);
|
||||
rp->update_nav_header(rp->navMixFile, d_ls_pvt->glonass_gnav_utc_model, d_ls_pvt->glonass_gnav_almanac, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->galileo_almanac);
|
||||
rp->update_obs_header(rp->obsFile, d_ls_pvt->galileo_utc_model);
|
||||
rp->update_nav_header(rp->navMixFile, d_ls_pvt->galileo_iono, d_ls_pvt->galileo_utc_model, d_ls_pvt->galileo_almanac, d_ls_pvt->glonass_gnav_utc_model, d_ls_pvt->glonass_gnav_almanac);
|
||||
b_rinex_header_updated = true; // do not write header anymore
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -119,19 +119,14 @@ public:
|
||||
void rinex_nav_header(std::fstream & out, const Glonass_Gnav_Utc_Model & utc_model, const Glonass_Gnav_Almanac & glonass_gnav_almanac);
|
||||
|
||||
/*!
|
||||
* \brief Generates the Mixed (GLONASS/Galileo) Navigation Data header
|
||||
* \brief Generates the Mixed (Galileo/GLONASS) Navigation Data header
|
||||
*/
|
||||
void rinex_nav_header(std::fstream & out, const Glonass_Gnav_Utc_Model & glonass_gnav_utc_model, const Glonass_Gnav_Almanac & glonass_gnav_almanac, const Galileo_Iono & galileo_iono, const Galileo_Utc_Model & galileo_utc_model, const Galileo_Almanac & galileo_almanac);
|
||||
void rinex_nav_header(std::fstream & out, const Galileo_Iono & galileo_iono, const Galileo_Utc_Model & galileo_utc_model, const Galileo_Almanac & galileo_almanac, const Glonass_Gnav_Utc_Model & glonass_gnav_utc_model, const Glonass_Gnav_Almanac & glonass_gnav_almanac);
|
||||
|
||||
/*!
|
||||
* \brief Generates the Mixed (GLONASS L1, L2/GPS L1 C/A) Navigation Data header
|
||||
*/
|
||||
void rinex_nav_header(std::fstream & out, const Glonass_Gnav_Utc_Model & glonass_gnav_utc_model, const Glonass_Gnav_Almanac & glonass_gnav_almanac, const Gps_Iono & gps_iono, const Gps_Utc_Model & gps_utc_model);
|
||||
|
||||
/*!
|
||||
* \brief Generates the Mixed (GLONASS L1, L2/GPS L2C ) Navigation Data header
|
||||
*/
|
||||
void rinex_nav_header(std::fstream & out, const Glonass_Gnav_Utc_Model & glonass_gnav_utc_model, const Glonass_Gnav_Almanac & glonass_gnav_almanac, const Gps_CNAV_Iono & gps_CNAV_iono, const Gps_CNAV_Utc_Model & gps_CNAV_utc_model);
|
||||
void rinex_nav_header(std::fstream & out, const Gps_Iono & gps_iono, const Gps_Utc_Model & gps_utc_model, const Glonass_Gnav_Utc_Model & glonass_gnav_utc_model, const Glonass_Gnav_Almanac & glonass_gnav_almanac);
|
||||
|
||||
/*!
|
||||
* \brief Generates the GPS Observation data header
|
||||
@ -166,17 +161,12 @@ public:
|
||||
/*!
|
||||
* \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 Glonass_Gnav_Ephemeris & glonass_gnav_eph, const Gps_Ephemeris & gps_eph, const double d_TOW_first_observation, const std::string gps_bands = "1C");
|
||||
|
||||
/*!
|
||||
* \brief Generates the Mixed (GPS L2C/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 Glonass_Gnav_Ephemeris & glonass_gnav_eph, const Gps_Ephemeris & gps_CNAV_eph, const double d_TOW_first_observation, const std::string gps_bands = "1C");
|
||||
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 glo_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 Glonass_Gnav_Ephemeris & glonass_gnav_eph, const Galileo_Ephemeris & galileo_eph, const double d_TOW_first_observation, const std::string gps_bands = "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 glo_bands = "1C");
|
||||
|
||||
/*!
|
||||
* \brief Generates the SBAS raw data header
|
||||
@ -259,19 +249,14 @@ public:
|
||||
void log_rinex_obs(std::fstream & out, const Glonass_Gnav_Ephemeris & eph, double obs_time, const std::map<int, Gnss_Synchro> & observables, const std::string glonass_bands = "1C");
|
||||
|
||||
/*!
|
||||
* \brief Writes Mixed GLONASS / GPS L1 C/A observables into the RINEX file
|
||||
* \brief Writes Mixed GPS L1 C/A - GLONASS observables into the RINEX file
|
||||
*/
|
||||
void log_rinex_obs(std::fstream & out, const Glonass_Gnav_Ephemeris & glonass_gnav_eph, const Gps_Ephemeris & gps_eph, const double gps_obs_time, const std::map<int, Gnss_Synchro> & observables);
|
||||
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<int, Gnss_Synchro> & observables);
|
||||
|
||||
/*!
|
||||
* \brief Writes Mixed GLONASS / GPS L2C observables into the RINEX file
|
||||
* \brief Writes Mixed Galileo/GLONASS observables into the RINEX file
|
||||
*/
|
||||
void log_rinex_obs(std::fstream & out, const Glonass_Gnav_Ephemeris & glonass_gnav_eph, const Gps_CNAV_Ephemeris & gps_CNAV_eph, const double gps_obs_time, const std::map<int, Gnss_Synchro> & observables);
|
||||
|
||||
/*!
|
||||
* \brief Writes Mixed GLONASS / Galileo observables into the RINEX file
|
||||
*/
|
||||
void log_rinex_obs(std::fstream & out, const Glonass_Gnav_Ephemeris & glonass_gnav_eph, const Galileo_Ephemeris & galileo_eph, const double gps_obs_time, const std::map<int, Gnss_Synchro> & observables);
|
||||
void log_rinex_obs(std::fstream & out, const Galileo_Ephemeris & galileo_eph, const Glonass_Gnav_Ephemeris & glonass_gnav_eph, const double gps_obs_time, const std::map<int, Gnss_Synchro> & observables);
|
||||
|
||||
/*!
|
||||
* \brief Represents GPS time in the date time format. Leap years are considered, but leap seconds are not.
|
||||
@ -293,11 +278,9 @@ public:
|
||||
|
||||
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 Gps_Utc_Model & gps_utc, const Gps_Iono & gps_iono);
|
||||
void update_nav_header(std::fstream & out, const Gps_Utc_Model & gps_utc, const Gps_Iono & gps_iono, 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 Gps_CNAV_Utc_Model & gps_CNAV_utc, const Gps_CNAV_Iono & gps_CNAV_iono);
|
||||
|
||||
void update_nav_header(std::fstream & out, const Glonass_Gnav_Utc_Model & glonass_gnav_utc_model, const Glonass_Gnav_Almanac & glonass_gnav_almanac, const Galileo_Iono & galileo_iono, const Galileo_Utc_Model & galileo_utc_model, const Galileo_Almanac& galileo_almanac);
|
||||
void update_nav_header(std::fstream & out, const Galileo_Iono & galileo_iono, const Galileo_Utc_Model & galileo_utc_model, const Galileo_Almanac& galileo_almanac, const Glonass_Gnav_Utc_Model & glonass_gnav_utc_model, const Glonass_Gnav_Almanac & glonass_gnav_almanac);
|
||||
|
||||
void update_obs_header(std::fstream & out, const Gps_Utc_Model & utc_model);
|
||||
|
||||
|
@ -51,6 +51,10 @@ obsd_t insert_obs_to_rtklib(obsd_t & rtklib_obs, const Gnss_Synchro & gnss_synch
|
||||
case 'E':
|
||||
rtklib_obs.sat = gnss_synchro.PRN+NSATGPS+NSATGLO;
|
||||
break;
|
||||
case 'R':
|
||||
rtklib_obs.sat = gnss_synchro.PRN;
|
||||
break;
|
||||
|
||||
default:
|
||||
rtklib_obs.sat = gnss_synchro.PRN;
|
||||
}
|
||||
@ -60,6 +64,61 @@ obsd_t insert_obs_to_rtklib(obsd_t & rtklib_obs, const Gnss_Synchro & gnss_synch
|
||||
return rtklib_obs;
|
||||
}
|
||||
|
||||
geph_t eph_to_rtklib(const Glonass_Gnav_Ephemeris & glonass_gnav_eph)
|
||||
{
|
||||
geph_t rtklib_sat = {0, 0, 0, 0, 0, 0, {0, 0}, {0, 0}, {0.0, 0.0, 0.0}, {0.0, 0.0,
|
||||
0.0}, {0.0, 0.0, 0.0}, 0.0, 0.0, 0.0};
|
||||
|
||||
int iode; /* IODE (0-6 bit of tb field) */
|
||||
int frq; /* satellite frequency number */
|
||||
int svh,sva,age; /* satellite health, accuracy, age of operation */
|
||||
gtime_t toe; /* epoch of epherides (gpst) */
|
||||
gtime_t tof; /* message frame time (gpst) */
|
||||
double pos[3]; /* satellite position (ecef) (m) */
|
||||
double vel[3]; /* satellite velocity (ecef) (m/s) */
|
||||
double acc[3]; /* satellite acceleration (ecef) (m/s^2) */
|
||||
double taun,gamn; /* SV clock bias (s)/relative freq bias */
|
||||
double dtaun;
|
||||
|
||||
rtklib_sat.sat = glonass_gnav_eph.i_satellite_PRN; /* satellite number */
|
||||
rtklib_sat.iode = glonass_gnav_eph.d_sqrt_A;
|
||||
rtklib_sat.frq = glonass_gnav_eph.;
|
||||
rtklib_sat.svh = glonass_gnav_eph.;
|
||||
rtklib_sat.sva = glonass_gnav_eph.
|
||||
rtklib_sat.age = glonass_gnav_eph.
|
||||
|
||||
rtklib_sat.toe = gpst2time(rtklib_sat.week, gps_eph.d_Toc);
|
||||
rtklib_sat.toc = gpst2time(rtklib_sat.week, gps_eph.d_TOW);
|
||||
|
||||
rtklib_sat.pos[0] = glonass_gnav_eph.d_Xn;
|
||||
rtklib_sat.pos[1] = glonass_gnav_eph.d_Yn;
|
||||
rtklib_sat.pos[2] = glonass_gnav_eph.d_Zn;
|
||||
|
||||
rtklib_sat.vel[0] = glonass_gnav_eph.d_VXn;
|
||||
rtklib_sat.vel[1] = glonass_gnav_eph.d_VYn;
|
||||
rtklib_sat.vel[2] = glonass_gnav_eph.d_VZn;
|
||||
|
||||
rtklib_sat.acc[0] = glonass_gnav_eph.d_AXn;
|
||||
rtklib_sat.acc[1] = glonass_gnav_eph.d_AYn;
|
||||
rtklib_sat.acc[2] = glonass_gnav_eph.d_AZn;
|
||||
|
||||
rtklib_sat.taun = glonass_gnav_eph.d_tau_n; /* SV clock bias (s) */
|
||||
rtklib_sat.gann = glonass_gnav_eph.d_gamma_n; /* SV relative freq bias */
|
||||
rtklib_sat.gann = glonass_gnav_eph.d_gamma_n;
|
||||
|
||||
/* adjustment for week handover */
|
||||
double tow, toc;
|
||||
tow = time2gpst(rtklib_sat.ttr, &rtklib_sat.week);
|
||||
toc = time2gpst(rtklib_sat.toc, NULL);
|
||||
if (rtklib_sat.toes < tow - 302400.0) {rtklib_sat.week++; tow -= 604800.0;}
|
||||
else if (rtklib_sat.toes > tow + 302400.0) {rtklib_sat.week--; tow += 604800.0;}
|
||||
rtklib_sat.toe = gpst2time(rtklib_sat.week, rtklib_sat.toes);
|
||||
rtklib_sat.toc = gpst2time(rtklib_sat.week, toc);
|
||||
rtklib_sat.ttr = gpst2time(rtklib_sat.week, tow);
|
||||
|
||||
return rtklib_sat;
|
||||
}
|
||||
|
||||
eph_t eph_to_rtklib(const Galileo_Ephemeris & gal_eph)
|
||||
{
|
||||
eph_t rtklib_sat = {0, 0, 0, 0, 0, 0, 0, 0, {0, 0}, {0, 0}, {0, 0}, 0.0, 0.0, 0.0, 0.0, 0.0,
|
||||
|
@ -36,10 +36,17 @@
|
||||
#include "galileo_ephemeris.h"
|
||||
#include "gps_ephemeris.h"
|
||||
#include "gps_cnav_ephemeris.h"
|
||||
#include "glonass_gnav_ephemeris.h"
|
||||
|
||||
eph_t eph_to_rtklib(const Galileo_Ephemeris & gal_eph);
|
||||
eph_t eph_to_rtklib(const Gps_Ephemeris & gps_eph);
|
||||
eph_t eph_to_rtklib(const Gps_CNAV_Ephemeris & gps_cnav_eph);
|
||||
/*!
|
||||
* \brief Transforms a Glonass_Gnav_Ephemeris to its RTKLIB counterpart
|
||||
* \param glonass_gnav_eph GLONASS GNAV Ephemeris structure
|
||||
* \return Ephemeris structure for RTKLIB parsing
|
||||
*/
|
||||
geph_t eph_to_rtklib(const Glonass_Gnav_Ephemeris & glonass_gnav_eph);
|
||||
|
||||
obsd_t insert_obs_to_rtklib(obsd_t & rtklib_obs, const Gnss_Synchro & gnss_synchro, int week, int band);
|
||||
|
||||
|
@ -68,7 +68,7 @@ private:
|
||||
double d_Jz_sun; //!< Sun gravitational perturbation
|
||||
|
||||
public:
|
||||
unsigned int i_satellite_freq_channel; // SV Frequency Channel Number
|
||||
int i_satellite_freq_channel; // SV Frequency Channel Number
|
||||
double d_m; //!< String number within frame [dimensionless]
|
||||
double d_t_k; //!< Time referenced to the beginning of the frame within the current day [hours, minutes, seconds]
|
||||
double d_t_b; //!< Index of a time interval within current day according to UTC(SU) + 03 hours 00 min. [minutes]
|
||||
|
Loading…
Reference in New Issue
Block a user