1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-06-25 22:43:14 +00:00

Fix triple-band RINEX obs when not all signals are present

This commit is contained in:
Carles Fernandez 2019-09-17 16:43:08 +02:00
parent 837dcc6859
commit 5fc16677ed
3 changed files with 30 additions and 8 deletions

View File

@ -3040,7 +3040,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
if ((gps_ephemeris_iter != d_user_pvt_solver->gps_ephemeris_map.cend()) and
(gps_cnav_ephemeris_iter != d_user_pvt_solver->gps_cnav_ephemeris_map.cend()))
{
rp->log_rinex_obs(rp->obsFile, gps_ephemeris_iter->second, gps_cnav_ephemeris_iter->second, d_rx_time, gnss_observables_map);
rp->log_rinex_obs(rp->obsFile, gps_ephemeris_iter->second, gps_cnav_ephemeris_iter->second, d_rx_time, gnss_observables_map, true);
}
if (!b_rinex_header_updated and (d_user_pvt_solver->gps_utc_model.d_A0 != 0))
{
@ -3054,7 +3054,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
(gps_ephemeris_iter != d_user_pvt_solver->gps_ephemeris_map.cend()) and
(gps_cnav_ephemeris_iter != d_user_pvt_solver->gps_cnav_ephemeris_map.cend()))
{
rp->log_rinex_obs(rp->obsFile, gps_ephemeris_iter->second, gps_cnav_ephemeris_iter->second, galileo_ephemeris_iter->second, d_rx_time, gnss_observables_map);
rp->log_rinex_obs(rp->obsFile, gps_ephemeris_iter->second, gps_cnav_ephemeris_iter->second, galileo_ephemeris_iter->second, d_rx_time, gnss_observables_map, true);
}
if (!b_rinex_header_updated and (d_user_pvt_solver->gps_utc_model.d_A0 != 0) and (d_user_pvt_solver->galileo_utc_model.A0_6 != 0))
{

View File

@ -10086,7 +10086,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& e
}
void Rinex_Printer::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)
void Rinex_Printer::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)
{
if (eph_cnav.d_i_0)
{
@ -10255,8 +10255,19 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c
}
lineObs += std::to_string(static_cast<int32_t>(*it));
ret = total_mmap.equal_range(*it);
bool have_l2 = false;
for (auto iter = ret.first; iter != ret.second; ++iter)
{
std::string sig_(iter->second.Signal);
if (sig_ == "2S")
{
have_l2 = true;
}
if (triple_band and sig_ == "L5" and have_l2 == false)
{
lineObs += std::string(62, ' ');
}
lineObs += Rinex_Printer::rightJustify(asString(iter->second.Pseudorange_m, 3), 14);
// Loss of lock indicator (LLI)
@ -11123,7 +11134,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& e
}
void Rinex_Printer::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)
void Rinex_Printer::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)
{
if (galileo_eph.e_1)
{
@ -11323,8 +11334,19 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
}
lineObs += std::to_string(static_cast<int32_t>(*it));
ret = total_gps_map.equal_range(*it);
bool have_l2 = false;
for (auto iter = ret.first; iter != ret.second; ++iter)
{
std::string sig_(iter->second.Signal);
if (sig_ == "2S")
{
have_l2 = true;
}
if (triple_band and sig_ == "L5" and have_l2 == false)
{
lineObs += std::string(62, ' ');
}
lineObs += Rinex_Printer::rightJustify(asString(iter->second.Pseudorange_m, 3), 14);
// Loss of lock indicator (LLI)
@ -11795,7 +11817,7 @@ boost::posix_time::ptime Rinex_Printer::compute_UTC_time(const Gps_Navigation_Me
}
else
{
//assume receiver operating in between 1999 to 2008
// assume receiver operating in between 1999 to 2008
boost::posix_time::ptime p_time(boost::gregorian::date(1999, 8, 22), t);
return p_time;
}
@ -11842,7 +11864,7 @@ boost::posix_time::ptime Rinex_Printer::compute_GPS_time(const Gps_Ephemeris& ep
}
else
{
//assume receiver operating in between 1999 to 2008
// assume receiver operating in between 1999 to 2008
boost::posix_time::ptime p_time(boost::gregorian::date(1999, 8, 22), t);
return p_time;
}

View File

@ -347,7 +347,7 @@ public:
/*!
* \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);
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);
/*!
* \brief Writes Galileo observables into the RINEX file. Example: galileo_bands("1B"), galileo_bands("1B 5X"), galileo_bands("5X"), ... Default: "1B".
@ -367,7 +367,7 @@ public:
/*!
* \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);
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);
/*!
* \brief Writes GLONASS GNAV observables into the RINEX file. Example: glonass_bands("1C"), galileo_bands("1B 5X"), galileo_bands("5X"), ... Default: "1B".