2018-05-05 05:44:20 +00:00
|
|
|
/*!
|
|
|
|
* \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
|
|
|
* -----------------------------------------------------------------------------
|
2018-05-05 05:44:20 +00:00
|
|
|
*
|
2020-12-30 12:35:06 +00:00
|
|
|
* GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
|
2018-05-05 05:44:20 +00:00
|
|
|
* This file is part of GNSS-SDR.
|
|
|
|
*
|
2020-12-30 12:35:06 +00:00
|
|
|
* Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
|
2020-02-08 00:20:02 +00:00
|
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
2018-05-05 05:44:20 +00:00
|
|
|
*
|
2020-07-28 14:57:15 +00:00
|
|
|
* -----------------------------------------------------------------------------
|
2018-05-05 05:44:20 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2020-02-08 09:10:46 +00:00
|
|
|
#ifndef GNSS_SDR_GPX_PRINTER_H
|
|
|
|
#define GNSS_SDR_GPX_PRINTER_H
|
2018-05-05 05:44:20 +00:00
|
|
|
|
2019-03-06 17:45:27 +00:00
|
|
|
|
2018-05-05 05:44:20 +00:00
|
|
|
#include <fstream>
|
|
|
|
#include <string>
|
|
|
|
|
2020-11-01 12:37:19 +00:00
|
|
|
/** \addtogroup PVT
|
|
|
|
* \{ */
|
|
|
|
/** \addtogroup PVT_libs
|
|
|
|
* \{ */
|
|
|
|
|
|
|
|
|
2020-06-18 09:49:28 +00:00
|
|
|
class Pvt_Solution;
|
2018-05-05 05:44:20 +00:00
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Prints PVT information to GPX format file
|
|
|
|
*
|
2020-02-05 09:20:32 +00:00
|
|
|
* See https://www.topografix.com/gpx.asp
|
2018-05-05 05:44:20 +00:00
|
|
|
*/
|
|
|
|
class Gpx_Printer
|
|
|
|
{
|
|
|
|
public:
|
2019-08-23 19:25:44 +00:00
|
|
|
explicit Gpx_Printer(const std::string& base_path = ".");
|
2018-05-05 05:44:20 +00:00
|
|
|
~Gpx_Printer();
|
2018-12-02 14:42:38 +00:00
|
|
|
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);
|
2018-05-05 05:44:20 +00:00
|
|
|
bool close_file();
|
2019-07-01 21:44:42 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
std::ofstream gpx_file;
|
|
|
|
std::string gpx_filename;
|
|
|
|
std::string indent;
|
|
|
|
std::string gpx_base_path;
|
2020-06-23 07:47:58 +00:00
|
|
|
bool positions_printed;
|
2018-05-05 05:44:20 +00:00
|
|
|
};
|
|
|
|
|
2020-11-01 12:37:19 +00:00
|
|
|
|
|
|
|
/** \} */
|
|
|
|
/** \} */
|
|
|
|
#endif // GNSS_SDR_GPX_PRINTER_H
|