mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-31 15:23:04 +00:00 
			
		
		
		
	Code uniformization
This commit is contained in:
		| @@ -117,6 +117,44 @@ Rtklib_Solver::Rtklib_Solver(int nchannels, std::string dump_filename, bool flag | ||||
|         } | ||||
| } | ||||
|  | ||||
|  | ||||
| Rtklib_Solver::~Rtklib_Solver() | ||||
| { | ||||
|     if (d_dump_file.is_open() == true) | ||||
|         { | ||||
|             auto pos = d_dump_file.tellp(); | ||||
|             try | ||||
|                 { | ||||
|                     d_dump_file.close(); | ||||
|                 } | ||||
|             catch (const std::exception &ex) | ||||
|                 { | ||||
|                     LOG(WARNING) << "Exception in destructor closing the RTKLIB dump file " << ex.what(); | ||||
|                 } | ||||
|             if (pos == 0) | ||||
|                 { | ||||
|                     errorlib::error_code ec; | ||||
|                     if (!fs::remove(fs::path(d_dump_filename), ec)) | ||||
|                         { | ||||
|                             std::cerr << "Problem removing temporary file " << d_dump_filename << '\n'; | ||||
|                         } | ||||
|                     d_flag_dump_mat_enabled = false; | ||||
|                 } | ||||
|         } | ||||
|     if (d_flag_dump_mat_enabled) | ||||
|         { | ||||
|             try | ||||
|                 { | ||||
|                     save_matfile(); | ||||
|                 } | ||||
|             catch (const std::exception &ex) | ||||
|                 { | ||||
|                     LOG(WARNING) << "Exception in destructor saving the PVT .mat dump file " << ex.what(); | ||||
|                 } | ||||
|         } | ||||
| } | ||||
|  | ||||
|  | ||||
| bool Rtklib_Solver::save_matfile() | ||||
| { | ||||
|     // READ DUMP FILE | ||||
| @@ -356,43 +394,6 @@ bool Rtklib_Solver::save_matfile() | ||||
| } | ||||
|  | ||||
|  | ||||
| Rtklib_Solver::~Rtklib_Solver() | ||||
| { | ||||
|     if (d_dump_file.is_open() == true) | ||||
|         { | ||||
|             auto pos = d_dump_file.tellp(); | ||||
|             try | ||||
|                 { | ||||
|                     d_dump_file.close(); | ||||
|                 } | ||||
|             catch (const std::exception &ex) | ||||
|                 { | ||||
|                     LOG(WARNING) << "Exception in destructor closing the RTKLIB dump file " << ex.what(); | ||||
|                 } | ||||
|             if (pos == 0) | ||||
|                 { | ||||
|                     errorlib::error_code ec; | ||||
|                     if (!fs::remove(fs::path(d_dump_filename), ec)) | ||||
|                         { | ||||
|                             std::cerr << "Problem removing temporary file " << d_dump_filename << '\n'; | ||||
|                         } | ||||
|                     d_flag_dump_mat_enabled = false; | ||||
|                 } | ||||
|         } | ||||
|     if (d_flag_dump_mat_enabled) | ||||
|         { | ||||
|             try | ||||
|                 { | ||||
|                     save_matfile(); | ||||
|                 } | ||||
|             catch (const std::exception &ex) | ||||
|                 { | ||||
|                     LOG(WARNING) << "Exception in destructor saving the PVT .mat dump file " << ex.what(); | ||||
|                 } | ||||
|         } | ||||
| } | ||||
|  | ||||
|  | ||||
| double Rtklib_Solver::get_gdop() const | ||||
| { | ||||
|     return dop_[0]; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Carles Fernandez
					Carles Fernandez