mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-15 20:50:33 +00:00
Remove old KML reader
This commit is contained in:
parent
66c3a9ed3a
commit
2db629a6c1
@ -37,7 +37,6 @@
|
|||||||
DEFINE_string(config_file_ptest, std::string(""), "File containing the configuration parameters for the position test.");
|
DEFINE_string(config_file_ptest, std::string(""), "File containing the configuration parameters for the position test.");
|
||||||
DEFINE_bool(plot_position_test, false, "Plots results of with gnuplot");
|
DEFINE_bool(plot_position_test, false, "Plots results of with gnuplot");
|
||||||
DEFINE_bool(static_scenario, true, "Compute figures of merit for static user position (DRMS, CEP, etc..)");
|
DEFINE_bool(static_scenario, true, "Compute figures of merit for static user position (DRMS, CEP, etc..)");
|
||||||
DEFINE_bool(use_pvt_solver_dump, false, "Use PVT solver binary dump or fall back to KML PVT file (contains only position information)");
|
|
||||||
DEFINE_bool(use_ref_motion_file, false, "Enable or disable the use of a reference file containing the true receiver position, velocity and acceleration.");
|
DEFINE_bool(use_ref_motion_file, false, "Enable or disable the use of a reference file containing the true receiver position, velocity and acceleration.");
|
||||||
DEFINE_int32(ref_motion_file_type, 1, "Type of reference motion file: 1- Spirent CSV motion file");
|
DEFINE_int32(ref_motion_file_type, 1, "Type of reference motion file: 1- Spirent CSV motion file");
|
||||||
DEFINE_string(ref_motion_filename, std::string("motion.csv"), "Path and filename for the reference motion file");
|
DEFINE_string(ref_motion_filename, std::string("motion.csv"), "Path and filename for the reference motion file");
|
||||||
|
@ -455,70 +455,7 @@ void PositionSystemTest::check_results()
|
|||||||
ref_R_eb_e.insert_cols(0, true_r_eb_e);
|
ref_R_eb_e.insert_cols(0, true_r_eb_e);
|
||||||
arma::vec ref_r_enu = {0, 0, 0};
|
arma::vec ref_r_enu = {0, 0, 0};
|
||||||
cart2utm(true_r_eb_e, utm_zone, ref_r_enu);
|
cart2utm(true_r_eb_e, utm_zone, ref_r_enu);
|
||||||
if (!FLAGS_use_pvt_solver_dump)
|
|
||||||
{
|
|
||||||
//fall back to read receiver KML output (position only)
|
|
||||||
std::fstream myfile(PositionSystemTest::generated_kml_file, std::ios_base::in);
|
|
||||||
ASSERT_TRUE(myfile.is_open()) << "No valid kml file could be opened";
|
|
||||||
std::string line;
|
|
||||||
// Skip header
|
|
||||||
std::getline(myfile, line);
|
|
||||||
bool is_header = true;
|
|
||||||
while (is_header)
|
|
||||||
{
|
|
||||||
std::getline(myfile, line);
|
|
||||||
ASSERT_FALSE(myfile.eof()) << "No valid kml file found.";
|
|
||||||
std::size_t found = line.find("<coordinates>");
|
|
||||||
if (found != std::string::npos) is_header = false;
|
|
||||||
}
|
|
||||||
bool is_data = true;
|
|
||||||
//read data
|
|
||||||
int64_t current_epoch = 0;
|
|
||||||
while (is_data)
|
|
||||||
{
|
|
||||||
if (!std::getline(myfile, line))
|
|
||||||
{
|
|
||||||
is_data = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
std::size_t found = line.find("</coordinates>");
|
|
||||||
if (found != std::string::npos)
|
|
||||||
is_data = false;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
std::string str2;
|
|
||||||
std::istringstream iss(line);
|
|
||||||
double value;
|
|
||||||
double lat = 0.0;
|
|
||||||
double longitude = 0.0;
|
|
||||||
double h = 0.0;
|
|
||||||
for (int i = 0; i < 3; i++)
|
|
||||||
{
|
|
||||||
std::getline(iss, str2, ',');
|
|
||||||
value = std::stod(str2);
|
|
||||||
if (i == 0) longitude = value;
|
|
||||||
if (i == 1) lat = value;
|
|
||||||
if (i == 2) h = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
arma::vec tmp_v_ecef;
|
|
||||||
arma::vec tmp_r_ecef;
|
|
||||||
pv_Geo_to_ECEF(degtorad(lat), degtorad(longitude), h, arma::vec{0, 0, 0}, tmp_r_ecef, tmp_v_ecef);
|
|
||||||
R_eb_e.insert_cols(current_epoch, tmp_r_ecef);
|
|
||||||
arma::vec tmp_r_enu = {0, 0, 0};
|
|
||||||
cart2utm(tmp_r_ecef, utm_zone, tmp_r_enu);
|
|
||||||
R_eb_enu.insert_cols(current_epoch, tmp_r_enu);
|
|
||||||
// std::cout << "lat = " << lat << ", longitude = " << longitude << " h = " << h << std::endl;
|
|
||||||
// std::cout << "E = " << east << ", N = " << north << " U = " << up << std::endl;
|
|
||||||
// getchar();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
myfile.close();
|
|
||||||
ASSERT_FALSE(R_eb_e.n_cols == 0) << "KML file is empty";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//use complete binary dump from pvt solver
|
|
||||||
rtklib_solver_dump_reader pvt_reader;
|
rtklib_solver_dump_reader pvt_reader;
|
||||||
pvt_reader.open_obs_file(FLAGS_pvt_solver_dump_filename);
|
pvt_reader.open_obs_file(FLAGS_pvt_solver_dump_filename);
|
||||||
int64_t n_epochs = pvt_reader.num_epochs();
|
int64_t n_epochs = pvt_reader.num_epochs();
|
||||||
@ -552,10 +489,8 @@ void PositionSystemTest::check_results()
|
|||||||
current_epoch++;
|
current_epoch++;
|
||||||
}
|
}
|
||||||
ASSERT_FALSE(current_epoch == 0) << "PVT dump is empty";
|
ASSERT_FALSE(current_epoch == 0) << "PVT dump is empty";
|
||||||
}
|
|
||||||
|
|
||||||
// compute results
|
// compute results
|
||||||
|
|
||||||
if (FLAGS_static_scenario)
|
if (FLAGS_static_scenario)
|
||||||
{
|
{
|
||||||
double sigma_E_2_precision = arma::var(R_eb_enu.row(0));
|
double sigma_E_2_precision = arma::var(R_eb_enu.row(0));
|
||||||
|
Loading…
Reference in New Issue
Block a user