gnss-sdr/src/algorithms/PVT/libs/gpx_printer.h

63 lines
1.4 KiB
C
Raw Normal View History

/*!
* \file gpx_printer.h
* \brief Interface of a class that prints PVT information to a gpx file
* \author Álvaro Cebrián Juan, 2018. acebrianjuan(at)gmail.com
*
*
2020-07-28 14:57:15 +00:00
* -----------------------------------------------------------------------------
*
2020-07-28 14:57:15 +00:00
* Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
*
* GNSS-SDR is a software defined Global Navigation
* Satellite Systems receiver
*
* This file is part of GNSS-SDR.
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
2020-07-28 14:57:15 +00:00
* -----------------------------------------------------------------------------
*/
#ifndef GNSS_SDR_GPX_PRINTER_H
#define GNSS_SDR_GPX_PRINTER_H
2019-03-06 17:45:27 +00:00
#include <fstream>
#include <string>
/** \addtogroup PVT
* \{ */
/** \addtogroup PVT_libs
* \{ */
class Pvt_Solution;
/*!
* \brief Prints PVT information to GPX format file
*
2020-02-05 09:20:32 +00:00
* See https://www.topografix.com/gpx.asp
*/
class Gpx_Printer
{
public:
explicit Gpx_Printer(const std::string& base_path = ".");
~Gpx_Printer();
bool set_headers(const std::string& filename, bool time_tag_name = true);
2020-07-26 21:56:36 +00:00
bool print_position(const Pvt_Solution* const position, bool print_average_values);
bool close_file();
private:
std::ofstream gpx_file;
std::string gpx_filename;
std::string indent;
std::string gpx_base_path;
bool positions_printed;
};
/** \} */
/** \} */
#endif // GNSS_SDR_GPX_PRINTER_H