mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-15 19:55:47 +00:00
Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into next
This commit is contained in:
commit
e8efd981ac
@ -370,13 +370,13 @@ void gnss_sdr_supl_client::read_supl_data()
|
||||
|
||||
bool gnss_sdr_supl_client::load_ephemeris_xml(const std::string file_name)
|
||||
{
|
||||
std::ifstream ifs;
|
||||
try
|
||||
{
|
||||
std::ifstream ifs(file_name.c_str(), std::ifstream::binary | std::ifstream::in);
|
||||
ifs.open(file_name.c_str(), std::ifstream::binary | std::ifstream::in);
|
||||
boost::archive::xml_iarchive xml(ifs);
|
||||
gps_ephemeris_map.clear();
|
||||
xml >> boost::serialization::make_nvp("GNSS-SDR_ephemeris_map", this->gps_ephemeris_map);
|
||||
ifs.close();
|
||||
LOG(INFO) << "Loaded Ephemeris map data with " << this->gps_ephemeris_map.size() << " satellites";
|
||||
}
|
||||
catch (std::exception& e)
|
||||
@ -384,6 +384,7 @@ bool gnss_sdr_supl_client::load_ephemeris_xml(const std::string file_name)
|
||||
LOG(WARNING) << e.what() << "File: " << file_name;
|
||||
return false;
|
||||
}
|
||||
ifs.close();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -392,12 +393,13 @@ bool gnss_sdr_supl_client::save_ephemeris_map_xml(const std::string file_name, s
|
||||
{
|
||||
if (eph_map.empty() == false)
|
||||
{
|
||||
std::ofstream ofs;
|
||||
try
|
||||
{
|
||||
std::ofstream ofs(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);
|
||||
xml << boost::serialization::make_nvp("GNSS-SDR_ephemeris_map", eph_map);
|
||||
ofs.close();
|
||||
|
||||
LOG(INFO) << "Saved Ephemeris map data";
|
||||
}
|
||||
catch (std::exception& e)
|
||||
@ -405,6 +407,7 @@ bool gnss_sdr_supl_client::save_ephemeris_map_xml(const std::string file_name, s
|
||||
LOG(WARNING) << e.what();
|
||||
return false;
|
||||
}
|
||||
ofs.close();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@ -417,12 +420,13 @@ bool gnss_sdr_supl_client::save_ephemeris_map_xml(const std::string file_name, s
|
||||
|
||||
bool gnss_sdr_supl_client::load_utc_xml(const std::string file_name)
|
||||
{
|
||||
std::ifstream ifs;
|
||||
try
|
||||
{
|
||||
std::ifstream ifs(file_name.c_str(), std::ifstream::binary | std::ifstream::in);
|
||||
ifs.open(file_name.c_str(), std::ifstream::binary | std::ifstream::in);
|
||||
boost::archive::xml_iarchive xml(ifs);
|
||||
xml >> boost::serialization::make_nvp("GNSS-SDR_utc_map", this->gps_utc);
|
||||
ifs.close();
|
||||
|
||||
LOG(INFO) << "Loaded UTC model data";
|
||||
}
|
||||
catch (std::exception& e)
|
||||
@ -430,6 +434,7 @@ bool gnss_sdr_supl_client::load_utc_xml(const std::string file_name)
|
||||
LOG(WARNING) << e.what() << "File: " << file_name;
|
||||
return false;
|
||||
}
|
||||
ifs.close();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -438,12 +443,12 @@ bool gnss_sdr_supl_client::save_utc_map_xml(const std::string file_name, std::ma
|
||||
{
|
||||
if (utc_map.empty() == false)
|
||||
{
|
||||
std::ofstream ofs;
|
||||
try
|
||||
{
|
||||
std::ofstream ofs(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);
|
||||
xml << boost::serialization::make_nvp("GNSS-SDR_utc_map", utc_map);
|
||||
ofs.close();
|
||||
LOG(INFO) << "Saved UTC Model data";
|
||||
}
|
||||
catch (std::exception& e)
|
||||
@ -451,6 +456,7 @@ bool gnss_sdr_supl_client::save_utc_map_xml(const std::string file_name, std::ma
|
||||
LOG(WARNING) << e.what();
|
||||
return false;
|
||||
}
|
||||
ofs.close();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@ -463,12 +469,12 @@ bool gnss_sdr_supl_client::save_utc_map_xml(const std::string file_name, std::ma
|
||||
|
||||
bool gnss_sdr_supl_client::load_iono_xml(const std::string file_name)
|
||||
{
|
||||
std::ifstream ifs;
|
||||
try
|
||||
{
|
||||
std::ifstream ifs(file_name.c_str(), std::ifstream::binary | std::ifstream::in);
|
||||
ifs.open(file_name.c_str(), std::ifstream::binary | std::ifstream::in);
|
||||
boost::archive::xml_iarchive xml(ifs);
|
||||
xml >> boost::serialization::make_nvp("GNSS-SDR_iono_map", this->gps_iono);
|
||||
ifs.close();
|
||||
LOG(INFO) << "Loaded IONO model data";
|
||||
}
|
||||
catch (std::exception& e)
|
||||
@ -476,6 +482,7 @@ bool gnss_sdr_supl_client::load_iono_xml(const std::string file_name)
|
||||
LOG(WARNING) << e.what() << "File: " << file_name;
|
||||
return false;
|
||||
}
|
||||
ifs.close();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -484,12 +491,12 @@ bool gnss_sdr_supl_client::save_iono_map_xml(const std::string file_name, std::m
|
||||
{
|
||||
if (iono_map.empty() == false)
|
||||
{
|
||||
std::ofstream ofs;
|
||||
try
|
||||
{
|
||||
std::ofstream ofs(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);
|
||||
xml << boost::serialization::make_nvp("GNSS-SDR_iono_map", iono_map);
|
||||
ofs.close();
|
||||
LOG(INFO) << "Saved IONO Model data";
|
||||
}
|
||||
catch (std::exception& e)
|
||||
@ -497,6 +504,7 @@ bool gnss_sdr_supl_client::save_iono_map_xml(const std::string file_name, std::m
|
||||
LOG(WARNING) << e.what();
|
||||
return false;
|
||||
}
|
||||
ofs.close();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@ -509,12 +517,12 @@ bool gnss_sdr_supl_client::save_iono_map_xml(const std::string file_name, std::m
|
||||
|
||||
bool gnss_sdr_supl_client::load_ref_time_xml(const std::string file_name)
|
||||
{
|
||||
std::ifstream ifs;
|
||||
try
|
||||
{
|
||||
std::ifstream ifs(file_name.c_str(), std::ifstream::binary | std::ifstream::in);
|
||||
ifs.open(file_name.c_str(), std::ifstream::binary | std::ifstream::in);
|
||||
boost::archive::xml_iarchive xml(ifs);
|
||||
xml >> boost::serialization::make_nvp("GNSS-SDR_ref_time_map", this->gps_time);
|
||||
ifs.close();
|
||||
LOG(INFO) << "Loaded Ref Time data";
|
||||
}
|
||||
catch (std::exception& e)
|
||||
@ -522,6 +530,7 @@ bool gnss_sdr_supl_client::load_ref_time_xml(const std::string file_name)
|
||||
LOG(WARNING) << e.what() << "File: " << file_name;
|
||||
return false;
|
||||
}
|
||||
ifs.close();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -530,12 +539,13 @@ bool gnss_sdr_supl_client::save_ref_time_map_xml(const std::string file_name, st
|
||||
{
|
||||
if (ref_time_map.empty() == false)
|
||||
{
|
||||
std::ofstream ofs;
|
||||
try
|
||||
{
|
||||
std::ofstream ofs(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);
|
||||
xml << boost::serialization::make_nvp("GNSS-SDR_ref_time_map", ref_time_map);
|
||||
ofs.close();
|
||||
|
||||
LOG(INFO) << "Saved Ref Time data";
|
||||
}
|
||||
catch (std::exception& e)
|
||||
@ -543,6 +553,7 @@ bool gnss_sdr_supl_client::save_ref_time_map_xml(const std::string file_name, st
|
||||
LOG(WARNING) << e.what();
|
||||
return false;
|
||||
}
|
||||
ofs.close();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@ -555,12 +566,12 @@ bool gnss_sdr_supl_client::save_ref_time_map_xml(const std::string file_name, st
|
||||
|
||||
bool gnss_sdr_supl_client::load_ref_location_xml(const std::string file_name)
|
||||
{
|
||||
std::ifstream ifs;
|
||||
try
|
||||
{
|
||||
std::ifstream ifs(file_name.c_str(), std::ifstream::binary | std::ifstream::in);
|
||||
ifs.open(file_name.c_str(), std::ifstream::binary | std::ifstream::in);
|
||||
boost::archive::xml_iarchive xml(ifs);
|
||||
xml >> boost::serialization::make_nvp("GNSS-SDR_ref_location_map", this->gps_ref_loc);
|
||||
ifs.close();
|
||||
LOG(INFO) << "Loaded Ref Location data";
|
||||
}
|
||||
catch (std::exception& e)
|
||||
@ -568,6 +579,7 @@ bool gnss_sdr_supl_client::load_ref_location_xml(const std::string file_name)
|
||||
LOG(WARNING) << e.what() << "File: " << file_name;
|
||||
return false;
|
||||
}
|
||||
ifs.close();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -576,12 +588,12 @@ bool gnss_sdr_supl_client::save_ref_location_map_xml(const std::string file_name
|
||||
{
|
||||
if (ref_location_map.empty() == false)
|
||||
{
|
||||
std::ofstream ofs;
|
||||
try
|
||||
{
|
||||
std::ofstream ofs(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);
|
||||
xml << boost::serialization::make_nvp("GNSS-SDR_ref_location_map", ref_location_map);
|
||||
ofs.close();
|
||||
LOG(INFO) << "Saved Ref Location data";
|
||||
}
|
||||
catch (std::exception& e)
|
||||
@ -589,6 +601,7 @@ bool gnss_sdr_supl_client::save_ref_location_map_xml(const std::string file_name
|
||||
LOG(WARNING) << e.what();
|
||||
return false;
|
||||
}
|
||||
ofs.close();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
@ -179,6 +179,7 @@ endif(ENABLE_UNIT_TESTING_MINIMAL)
|
||||
################################################################################
|
||||
# Optional generator
|
||||
################################################################################
|
||||
option(ENABLE_GNSS_SIM_INSTALL "Enable the installation of gnss_sim on the fly" ON)
|
||||
if(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA)
|
||||
if(ENABLE_FPGA)
|
||||
set(CROSS_INSTALL_DIR "-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}")
|
||||
@ -189,11 +190,11 @@ if(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA)
|
||||
set(CROSS_INSTALL_DIR "")
|
||||
endif(ENABLE_FPGA)
|
||||
find_package(GnssSimulator QUIET)
|
||||
if(GNSS-SIMULATOR_FOUND)
|
||||
if(GNSS-SIMULATOR_FOUND OR NOT ENABLE_GNSS_SIM_INSTALL)
|
||||
add_definitions(-DSW_GENERATOR_BIN="${SW_GENERATOR_BIN}")
|
||||
add_definitions(-DDEFAULT_RINEX_NAV="${CMAKE_INSTALL_PREFIX}/share/gnss-sim/brdc3540.14n")
|
||||
add_definitions(-DDEFAULT_POSITION_FILE="${CMAKE_INSTALL_PREFIX}/share/gnss-sim/circle.csv")
|
||||
else(GNSS-SIMULATOR_FOUND)
|
||||
else(GNSS-SIMULATOR_FOUND OR NOT ENABLE_GNSS_SIM_INSTALL)
|
||||
ExternalProject_Add(
|
||||
gnss-sim
|
||||
GIT_REPOSITORY https://bitbucket.org/jarribas/gnss-simulator
|
||||
@ -219,7 +220,7 @@ if(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA)
|
||||
add_definitions(-DDEFAULT_RINEX_NAV="${CMAKE_CURRENT_BINARY_DIR}/../../../thirdparty/gnss-sim/brdc3540.14n")
|
||||
add_definitions(-DDEFAULT_POSITION_FILE="${CMAKE_CURRENT_BINARY_DIR}/../../../thirdparty/gnss-sim/circle.csv")
|
||||
endif(ENABLE_INSTALL_TESTS)
|
||||
endif(GNSS-SIMULATOR_FOUND)
|
||||
endif(GNSS-SIMULATOR_FOUND OR NOT ENABLE_GNSS_SIM_INSTALL)
|
||||
|
||||
################################################################################
|
||||
# Local installation of GPSTk http://www.gpstk.org/
|
||||
|
@ -478,3 +478,4 @@
|
||||
</second>
|
||||
</item>
|
||||
</GNSS-SDR_ephemeris_map>
|
||||
</boost_serialization>
|
||||
|
@ -355,3 +355,4 @@
|
||||
</second>
|
||||
</item>
|
||||
</GNSS-SDR_gnss_synchro_map>
|
||||
</boost_serialization>
|
||||
|
@ -318,6 +318,8 @@ rtk_t configure_rtklib_options()
|
||||
rtkinit(&rtk, &rtklib_configuration_options);
|
||||
return rtk;
|
||||
}
|
||||
|
||||
|
||||
//todo: add test cases for Galileo E1, E5 and GPS L5
|
||||
TEST(RTKLibSolverTest, test1)
|
||||
{
|
||||
@ -371,20 +373,21 @@ TEST(RTKLibSolverTest, test1)
|
||||
|
||||
//load from xml (boost serialize)
|
||||
std::string file_name = path + "data/rtklib_test/obs_test1.xml";
|
||||
|
||||
std::ifstream ifs;
|
||||
try
|
||||
{
|
||||
std::ifstream ifs(file_name.c_str(), std::ifstream::binary | std::ifstream::in);
|
||||
ifs.open(file_name.c_str(), std::ifstream::binary | std::ifstream::in);
|
||||
boost::archive::xml_iarchive xml(ifs);
|
||||
gnss_synchro_map.clear();
|
||||
xml >> boost::serialization::make_nvp("GNSS-SDR_gnss_synchro_map", gnss_synchro_map);
|
||||
ifs.close();
|
||||
std::cout << "Loaded gnss_synchro map data with " << gnss_synchro_map.size() << " pseudoranges" << std::endl;
|
||||
}
|
||||
catch (std::exception& e)
|
||||
{
|
||||
std::cout << e.what() << "File: " << file_name;
|
||||
}
|
||||
|
||||
ifs.close();
|
||||
|
||||
// solve
|
||||
bool pvt_valid = false;
|
||||
|
Loading…
Reference in New Issue
Block a user