mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-31 07:13:03 +00:00 
			
		
		
		
	Cosmetics
This commit is contained in:
		| @@ -59,7 +59,7 @@ | |||||||
| concurrent_queue<Gps_Acq_Assist> global_gps_acq_assist_queue; | concurrent_queue<Gps_Acq_Assist> global_gps_acq_assist_queue; | ||||||
| concurrent_map<Gps_Acq_Assist> global_gps_acq_assist_map; | concurrent_map<Gps_Acq_Assist> global_gps_acq_assist_map; | ||||||
|  |  | ||||||
| class StaticPositionSystemTest : public ::testing::Test | class PositionSystemTest : public ::testing::Test | ||||||
| { | { | ||||||
| public: | public: | ||||||
|     int configure_generator(); |     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) |     double* x, double* y, double* z) | ||||||
| { | { | ||||||
|     const double a = 6378137.0;       // WGS84 |     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* east, double* north, double* up) | ||||||
| { | { | ||||||
|     double x, y, z; |     double x, y, z; | ||||||
| @@ -169,7 +169,7 @@ void StaticPositionSystemTest::geodetic2Enu(double latitude, double longitude, d | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| double StaticPositionSystemTest::compute_stdev_precision(const std::vector<double>& vec) | double PositionSystemTest::compute_stdev_precision(const std::vector<double>& vec) | ||||||
| { | { | ||||||
|     double sum__ = std::accumulate(vec.begin(), vec.end(), 0.0); |     double sum__ = std::accumulate(vec.begin(), vec.end(), 0.0); | ||||||
|     double mean__ = sum__ / vec.size(); |     double mean__ = sum__ / vec.size(); | ||||||
| @@ -182,7 +182,7 @@ double StaticPositionSystemTest::compute_stdev_precision(const std::vector<doubl | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| double StaticPositionSystemTest::compute_stdev_accuracy(const std::vector<double>& vec, const double ref) | double PositionSystemTest::compute_stdev_accuracy(const std::vector<double>& vec, const double ref) | ||||||
| { | { | ||||||
|     const double mean__ = ref; |     const double mean__ = ref; | ||||||
|     double accum__ = 0.0; |     double accum__ = 0.0; | ||||||
| @@ -194,7 +194,7 @@ double StaticPositionSystemTest::compute_stdev_accuracy(const std::vector<double | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| int StaticPositionSystemTest::configure_generator() | int PositionSystemTest::configure_generator() | ||||||
| { | { | ||||||
|     // Configure signal generator |     // Configure signal generator | ||||||
|     generator_binary = FLAGS_generator_binary; |     generator_binary = FLAGS_generator_binary; | ||||||
| @@ -216,7 +216,7 @@ int StaticPositionSystemTest::configure_generator() | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| int StaticPositionSystemTest::generate_signal() | int PositionSystemTest::generate_signal() | ||||||
| { | { | ||||||
|     pid_t wait_result; |     pid_t wait_result; | ||||||
|     int child_status; |     int child_status; | ||||||
| @@ -239,7 +239,7 @@ int StaticPositionSystemTest::generate_signal() | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| int StaticPositionSystemTest::configure_receiver() | int PositionSystemTest::configure_receiver() | ||||||
| { | { | ||||||
|     if (FLAGS_config_file_ptest.empty()) |     if (FLAGS_config_file_ptest.empty()) | ||||||
|         { |         { | ||||||
| @@ -408,7 +408,7 @@ int StaticPositionSystemTest::configure_receiver() | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| int StaticPositionSystemTest::run_receiver() | int PositionSystemTest::run_receiver() | ||||||
| { | { | ||||||
|     std::shared_ptr<ControlThread> control_thread; |     std::shared_ptr<ControlThread> control_thread; | ||||||
|     if (FLAGS_config_file_ptest.empty()) |     if (FLAGS_config_file_ptest.empty()) | ||||||
| @@ -449,15 +449,15 @@ int StaticPositionSystemTest::run_receiver() | |||||||
|         { |         { | ||||||
|             std::string aux = std::string(buffer); |             std::string aux = std::string(buffer); | ||||||
|             EXPECT_EQ(aux.empty(), false); |             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); |     pclose(fp); | ||||||
|     EXPECT_EQ(StaticPositionSystemTest::generated_kml_file.empty(), false); |     EXPECT_EQ(PositionSystemTest::generated_kml_file.empty(), false); | ||||||
|     return 0; |     return 0; | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| void StaticPositionSystemTest::check_results() | void PositionSystemTest::check_results() | ||||||
| { | { | ||||||
|     std::vector<double> pos_e; |     std::vector<double> pos_e; | ||||||
|     std::vector<double> pos_n; |     std::vector<double> pos_n; | ||||||
| @@ -488,7 +488,7 @@ void StaticPositionSystemTest::check_results() | |||||||
|     if (!FLAGS_use_pvt_solver_dump) |     if (!FLAGS_use_pvt_solver_dump) | ||||||
|         { |         { | ||||||
|             //fall back to read receiver KML output (position only) |             //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"; |             ASSERT_TRUE(myfile.is_open()) << "No valid kml file could be opened"; | ||||||
|             std::string line; |             std::string line; | ||||||
|             // Skip header |             // 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; |             stm << "SEP = " << 0.51 * (sigma_E_2_precision + sigma_N_2_precision + sigma_U_2_precision) << " [m]" << std::endl; | ||||||
|  |  | ||||||
|             std::cout << stm.rdbuf(); |             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()); |             position_test_file.open(output_filename.c_str()); | ||||||
|             if (position_test_file.is_open()) |             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; |             std::cout << "----- Position and Velocity 3D ECEF error statistics -----" << std::endl; | ||||||
|             if (!FLAGS_config_file_ptest.empty()) |             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::streamsize ss = std::cout.precision(); | ||||||
|             std::cout << std::setprecision(10) << "---- 3D ECEF Position RMSE = " |             std::cout << std::setprecision(10) << "---- 3D ECEF Position RMSE = " | ||||||
| @@ -843,7 +843,7 @@ void StaticPositionSystemTest::check_results() | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| void StaticPositionSystemTest::print_results(const std::vector<double>& east, | void PositionSystemTest::print_results(const std::vector<double>& east, | ||||||
|     const std::vector<double>& north, |     const std::vector<double>& north, | ||||||
|     const std::vector<double>& up) |     const std::vector<double>& up) | ||||||
| { | { | ||||||
| @@ -961,7 +961,7 @@ void StaticPositionSystemTest::print_results(const std::vector<double>& east, | |||||||
|         } |         } | ||||||
| } | } | ||||||
|  |  | ||||||
| TEST_F(StaticPositionSystemTest, Position_system_test) | TEST_F(PositionSystemTest, Position_system_test) | ||||||
| { | { | ||||||
|     if (FLAGS_config_file_ptest.empty()) |     if (FLAGS_config_file_ptest.empty()) | ||||||
|         { |         { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Carles Fernandez
					Carles Fernandez