diff --git a/src/tests/system-tests/position_test.cc b/src/tests/system-tests/position_test.cc index 0f1f4ed80..6d099075b 100644 --- a/src/tests/system-tests/position_test.cc +++ b/src/tests/system-tests/position_test.cc @@ -59,7 +59,7 @@ concurrent_queue global_gps_acq_assist_queue; concurrent_map global_gps_acq_assist_map; -class StaticPositionSystemTest : public ::testing::Test +class PositionSystemTest : public ::testing::Test { public: int configure_generator(); @@ -101,7 +101,7 @@ private: }; -void StaticPositionSystemTest::geodetic2Ecef(const double latitude, const double longitude, const double altitude, +void PositionSystemTest::geodetic2Ecef(const double latitude, const double longitude, const double altitude, double* x, double* y, double* z) { const double a = 6378137.0; // WGS84 @@ -126,7 +126,7 @@ void StaticPositionSystemTest::geodetic2Ecef(const double latitude, const double } -void StaticPositionSystemTest::geodetic2Enu(double latitude, double longitude, double altitude, +void PositionSystemTest::geodetic2Enu(double latitude, double longitude, double altitude, double* east, double* north, double* up) { double x, y, z; @@ -169,7 +169,7 @@ void StaticPositionSystemTest::geodetic2Enu(double latitude, double longitude, d } -double StaticPositionSystemTest::compute_stdev_precision(const std::vector& vec) +double PositionSystemTest::compute_stdev_precision(const std::vector& vec) { double sum__ = std::accumulate(vec.begin(), vec.end(), 0.0); double mean__ = sum__ / vec.size(); @@ -182,7 +182,7 @@ double StaticPositionSystemTest::compute_stdev_precision(const std::vector& vec, const double ref) +double PositionSystemTest::compute_stdev_accuracy(const std::vector& vec, const double ref) { const double mean__ = ref; double accum__ = 0.0; @@ -194,7 +194,7 @@ double StaticPositionSystemTest::compute_stdev_accuracy(const std::vector control_thread; if (FLAGS_config_file_ptest.empty()) @@ -449,15 +449,15 @@ int StaticPositionSystemTest::run_receiver() { std::string aux = std::string(buffer); EXPECT_EQ(aux.empty(), false); - StaticPositionSystemTest::generated_kml_file = aux.erase(aux.length() - 1, 1); + PositionSystemTest::generated_kml_file = aux.erase(aux.length() - 1, 1); } pclose(fp); - EXPECT_EQ(StaticPositionSystemTest::generated_kml_file.empty(), false); + EXPECT_EQ(PositionSystemTest::generated_kml_file.empty(), false); return 0; } -void StaticPositionSystemTest::check_results() +void PositionSystemTest::check_results() { std::vector pos_e; std::vector pos_n; @@ -488,7 +488,7 @@ void StaticPositionSystemTest::check_results() if (!FLAGS_use_pvt_solver_dump) { //fall back to read receiver KML output (position only) - std::fstream myfile(StaticPositionSystemTest::generated_kml_file, std::ios_base::in); + 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 @@ -638,7 +638,7 @@ void StaticPositionSystemTest::check_results() stm << "SEP = " << 0.51 * (sigma_E_2_precision + sigma_N_2_precision + sigma_U_2_precision) << " [m]" << std::endl; std::cout << stm.rdbuf(); - std::string output_filename = "position_test_output_" + StaticPositionSystemTest::generated_kml_file.erase(StaticPositionSystemTest::generated_kml_file.length() - 3, 3) + "txt"; + std::string output_filename = "position_test_output_" + PositionSystemTest::generated_kml_file.erase(PositionSystemTest::generated_kml_file.length() - 3, 3) + "txt"; position_test_file.open(output_filename.c_str()); if (position_test_file.is_open()) { @@ -732,7 +732,7 @@ void StaticPositionSystemTest::check_results() std::cout << "----- Position and Velocity 3D ECEF error statistics -----" << std::endl; if (!FLAGS_config_file_ptest.empty()) { - std::cout << "Configuration file: " << FLAGS_config_file_ptest << std::endl; + std::cout << "----- Configuration file: " << FLAGS_config_file_ptest << std::endl; } std::streamsize ss = std::cout.precision(); std::cout << std::setprecision(10) << "---- 3D ECEF Position RMSE = " @@ -843,7 +843,7 @@ void StaticPositionSystemTest::check_results() } -void StaticPositionSystemTest::print_results(const std::vector& east, +void PositionSystemTest::print_results(const std::vector& east, const std::vector& north, const std::vector& up) { @@ -961,7 +961,7 @@ void StaticPositionSystemTest::print_results(const std::vector& east, } } -TEST_F(StaticPositionSystemTest, Position_system_test) +TEST_F(PositionSystemTest, Position_system_test) { if (FLAGS_config_file_ptest.empty()) {