diff --git a/src/algorithms/PVT/libs/has_simple_printer.cc b/src/algorithms/PVT/libs/has_simple_printer.cc index 5eebff8e6..a7a87b16a 100644 --- a/src/algorithms/PVT/libs/has_simple_printer.cc +++ b/src/algorithms/PVT/libs/has_simple_printer.cc @@ -29,7 +29,6 @@ #include // for std::exception #include // for std::setw, std::setprecision #include // for std::cout, std::cerr -#include // for std::mutex #include // for std::stringstream @@ -308,17 +307,6 @@ bool Has_Simple_Printer::print_message(const Galileo_HAS_data* const has_data) } -bool Has_Simple_Printer::close_file() -{ - if (d_has_file.is_open()) - { - d_has_file.close(); - return true; - } - return false; -} - - template std::string Has_Simple_Printer::print_vector(const std::vector& vec, float scale_factor) const { @@ -403,3 +391,14 @@ std::string Has_Simple_Printer::print_matrix(const std::vector>& msg += ss.str(); return msg; } + + +bool Has_Simple_Printer::close_file() +{ + if (d_has_file.is_open()) + { + d_has_file.close(); + return true; + } + return false; +} diff --git a/src/algorithms/PVT/libs/has_simple_printer.h b/src/algorithms/PVT/libs/has_simple_printer.h index 58f50967e..2d14aec3b 100644 --- a/src/algorithms/PVT/libs/has_simple_printer.h +++ b/src/algorithms/PVT/libs/has_simple_printer.h @@ -14,27 +14,25 @@ * ----------------------------------------------------------------------------- */ - #ifndef GNSS_SDR_HAS_SIMPLE_PRINTER_H #define GNSS_SDR_HAS_SIMPLE_PRINTER_H #include // for size_t #include // for std::ofstream -#include -#include +#include // for std::mutex +#include // for std::string +#include // for std::vector /** \addtogroup PVT * \{ */ /** \addtogroup PVT_libs * \{ */ - class Galileo_HAS_data; /*! - * \brief Prints PVT information to OGC KML format file (can be viewed with Google Earth) - * - * See https://www.opengeospatial.org/standards/kml + * \brief Prints HAS messages content in a txt file. See HAS-SIS-ICD for a + * message description. */ class Has_Simple_Printer { @@ -42,7 +40,6 @@ public: explicit Has_Simple_Printer(const std::string& base_path = std::string("."), const std::string& filename = std::string("HAS_Messages"), bool time_tag_name = true); ~Has_Simple_Printer(); bool print_message(const Galileo_HAS_data* const has_data); - bool close_file(); private: template @@ -54,6 +51,8 @@ private: template std::string print_matrix(const std::vector>& mat, const std::string& filler, float scale_factor = 1) const; + bool close_file(); + std::mutex d_mutex; std::ofstream d_has_file; std::string d_has_filename; @@ -61,7 +60,6 @@ private: bool d_data_printed; }; - /** \} */ /** \} */ -#endif // GNSS_SDR_KML_PRINTER_H +#endif // GNSS_SDR_HAS_SIMPLE_PRINTER_H