mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 12:10:34 +00:00
Fix include what you use
Fix doxygen documentation Move close_file() to a private method
This commit is contained in:
parent
b648571b6d
commit
1b74afe640
@ -29,7 +29,6 @@
|
||||
#include <exception> // for std::exception
|
||||
#include <iomanip> // for std::setw, std::setprecision
|
||||
#include <iostream> // for std::cout, std::cerr
|
||||
#include <mutex> // for std::mutex
|
||||
#include <sstream> // 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 <class T>
|
||||
std::string Has_Simple_Printer::print_vector(const std::vector<T>& vec, float scale_factor) const
|
||||
{
|
||||
@ -403,3 +391,14 @@ std::string Has_Simple_Printer::print_matrix(const std::vector<std::vector<T>>&
|
||||
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;
|
||||
}
|
||||
|
@ -14,27 +14,25 @@
|
||||
* -----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#ifndef GNSS_SDR_HAS_SIMPLE_PRINTER_H
|
||||
#define GNSS_SDR_HAS_SIMPLE_PRINTER_H
|
||||
|
||||
#include <cstddef> // for size_t
|
||||
#include <fstream> // for std::ofstream
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <mutex> // for std::mutex
|
||||
#include <string> // for std::string
|
||||
#include <vector> // 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 <class T>
|
||||
@ -54,6 +51,8 @@ private:
|
||||
template <class T>
|
||||
std::string print_matrix(const std::vector<std::vector<T>>& 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
|
||||
|
Loading…
Reference in New Issue
Block a user