mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-11-20 00:34:57 +00:00
Compute PVT with E6 only and xml assistance
This commit is contained in:
parent
81d0098205
commit
657a7298f3
@ -651,6 +651,13 @@ rtklib_pvt_gs::~rtklib_pvt_gs()
|
|||||||
{
|
{
|
||||||
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);
|
||||||
|
// Annotate as GPS week number
|
||||||
|
for (auto gal_eph_iter = d_internal_pvt_solver->galileo_ephemeris_map.begin();
|
||||||
|
gal_eph_iter != d_internal_pvt_solver->galileo_ephemeris_map.end();
|
||||||
|
++gal_eph_iter)
|
||||||
|
{
|
||||||
|
gal_eph_iter->second.WN += 1024;
|
||||||
|
}
|
||||||
xml << boost::serialization::make_nvp("GNSS-SDR_gal_ephemeris_map", d_internal_pvt_solver->galileo_ephemeris_map);
|
xml << boost::serialization::make_nvp("GNSS-SDR_gal_ephemeris_map", d_internal_pvt_solver->galileo_ephemeris_map);
|
||||||
LOG(INFO) << "Saved Galileo E1 Ephemeris map data";
|
LOG(INFO) << "Saved Galileo E1 Ephemeris map data";
|
||||||
}
|
}
|
||||||
@ -2049,6 +2056,10 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
store_valid_observable = true;
|
store_valid_observable = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (std::string(in[i][epoch].Signal) == std::string("E6"))
|
||||||
|
{
|
||||||
|
store_valid_observable = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (store_valid_observable)
|
if (store_valid_observable)
|
||||||
{
|
{
|
||||||
|
@ -407,6 +407,7 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
|||||||
bool band1 = false;
|
bool band1 = false;
|
||||||
bool band2 = false;
|
bool band2 = false;
|
||||||
bool gal_e5_is_e5b = false;
|
bool gal_e5_is_e5b = false;
|
||||||
|
bool gal_e6 = false;
|
||||||
for (gnss_observables_iter = gnss_observables_map.cbegin();
|
for (gnss_observables_iter = gnss_observables_map.cbegin();
|
||||||
gnss_observables_iter != gnss_observables_map.cend();
|
gnss_observables_iter != gnss_observables_map.cend();
|
||||||
++gnss_observables_iter)
|
++gnss_observables_iter)
|
||||||
@ -514,6 +515,48 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
|||||||
gal_e5_is_e5b = true;
|
gal_e5_is_e5b = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (sig_ == "E6")
|
||||||
|
{
|
||||||
|
gal_e6 = true;
|
||||||
|
galileo_ephemeris_iter = galileo_ephemeris_map.find(gnss_observables_iter->second.PRN);
|
||||||
|
if (galileo_ephemeris_iter != galileo_ephemeris_map.cend())
|
||||||
|
{
|
||||||
|
bool found_E1_obs = false;
|
||||||
|
for (int i = 0; i < valid_obs; i++)
|
||||||
|
{
|
||||||
|
if (eph_data[i].sat == (static_cast<int>(gnss_observables_iter->second.PRN + NSATGPS + NSATGLO)))
|
||||||
|
{
|
||||||
|
d_obs_data[i + glo_valid_obs] = insert_obs_to_rtklib(d_obs_data[i + glo_valid_obs],
|
||||||
|
gnss_observables_iter->second,
|
||||||
|
galileo_ephemeris_iter->second.WN,
|
||||||
|
0); // Band 1 (E6)
|
||||||
|
found_E1_obs = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!found_E1_obs)
|
||||||
|
{
|
||||||
|
// insert Galileo E6 obs as new obs and also insert its ephemeris
|
||||||
|
// convert ephemeris from GNSS-SDR class to RTKLIB structure
|
||||||
|
eph_data[valid_obs] = eph_to_rtklib(galileo_ephemeris_iter->second);
|
||||||
|
// convert observation from GNSS-SDR class to RTKLIB structure
|
||||||
|
const auto default_code_ = static_cast<unsigned char>(CODE_NONE);
|
||||||
|
obsd_t newobs = {{0, 0}, '0', '0', {}, {},
|
||||||
|
{default_code_, default_code_, default_code_},
|
||||||
|
{}, {0.0, 0.0, 0.0}, {}};
|
||||||
|
d_obs_data[valid_obs + glo_valid_obs] = insert_obs_to_rtklib(newobs,
|
||||||
|
gnss_observables_iter->second,
|
||||||
|
galileo_ephemeris_iter->second.WN,
|
||||||
|
0); // Band 1 (E6)
|
||||||
|
// std::cout << "Week " << galileo_ephemeris_iter->second.WN << '\n';
|
||||||
|
valid_obs++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else // the ephemeris are not available for this SV
|
||||||
|
{
|
||||||
|
DLOG(INFO) << "No ephemeris data for SV " << gnss_observables_iter->second.PRN;
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'G':
|
case 'G':
|
||||||
@ -879,6 +922,11 @@ bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
|
|||||||
{
|
{
|
||||||
for (int j = 0; j < NFREQ; j++)
|
for (int j = 0; j < NFREQ; j++)
|
||||||
{
|
{
|
||||||
|
if (j == 0 && gal_e6)
|
||||||
|
{
|
||||||
|
// frq = 3 corresponds to E6 in that function
|
||||||
|
nav_data.lam[i][j] = satwavelen(i + 1, 3, &nav_data);
|
||||||
|
}
|
||||||
if (j == 2 && gal_e5_is_e5b)
|
if (j == 2 && gal_e5_is_e5b)
|
||||||
{
|
{
|
||||||
// frq = 4 corresponds to E5B in that function
|
// frq = 4 corresponds to E5B in that function
|
||||||
|
@ -75,6 +75,10 @@ obsd_t insert_obs_to_rtklib(obsd_t& rtklib_obs, const Gnss_Synchro& gnss_synchro
|
|||||||
{
|
{
|
||||||
rtklib_obs.code[band] = static_cast<unsigned char>(CODE_L7X);
|
rtklib_obs.code[band] = static_cast<unsigned char>(CODE_L7X);
|
||||||
}
|
}
|
||||||
|
if (sig_ == "E6")
|
||||||
|
{
|
||||||
|
rtklib_obs.code[band] = static_cast<unsigned char>(CODE_L6B);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'R':
|
case 'R':
|
||||||
rtklib_obs.sat = gnss_synchro.PRN + NSATGPS;
|
rtklib_obs.sat = gnss_synchro.PRN + NSATGPS;
|
||||||
|
@ -414,6 +414,13 @@ bool Gnss_Sdr_Supl_Client::load_gal_ephemeris_xml(const std::string& file_name)
|
|||||||
gal_ephemeris_map.clear();
|
gal_ephemeris_map.clear();
|
||||||
xml >> boost::serialization::make_nvp("GNSS-SDR_gal_ephemeris_map", this->gal_ephemeris_map);
|
xml >> boost::serialization::make_nvp("GNSS-SDR_gal_ephemeris_map", this->gal_ephemeris_map);
|
||||||
LOG(INFO) << "Loaded Ephemeris map data with " << this->gal_ephemeris_map.size() << " satellites";
|
LOG(INFO) << "Loaded Ephemeris map data with " << this->gal_ephemeris_map.size() << " satellites";
|
||||||
|
// Convert to GPS week number
|
||||||
|
for (auto gal_eph_iter = this->gal_ephemeris_map.begin();
|
||||||
|
gal_eph_iter != this->gal_ephemeris_map.end();
|
||||||
|
++gal_eph_iter)
|
||||||
|
{
|
||||||
|
gal_eph_iter->second.WN -= 1024;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (std::exception& e)
|
catch (std::exception& e)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user