GNSS-SDR 0.0.21
An Open Source GNSS Software Defined Receiver
Loading...
Searching...
No Matches
kml_printer.h
Go to the documentation of this file.
1/*!
2 * \file kml_printer.h
3 * \brief Interface of a class that prints PVT information to a kml file
4 * \author Javier Arribas, 2011. jarribas(at)cttc.es
5 * Álvaro Cebrián Juan, 2018. acebrianjuan(at)gmail.com
6 *
7 * -----------------------------------------------------------------------------
8 *
9 * GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
10 * This file is part of GNSS-SDR.
11 *
12 * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
13 * SPDX-License-Identifier: GPL-3.0-or-later
14 *
15 * -----------------------------------------------------------------------------
16 */
17
18
19#ifndef GNSS_SDR_KML_PRINTER_H
20#define GNSS_SDR_KML_PRINTER_H
21
22#include <fstream> // for ofstream
23#include <string>
24
25/** \addtogroup PVT
26 * \{ */
27/** \addtogroup PVT_libs
28 * \{ */
29
30
31class Pvt_Solution;
32
33/*!
34 * \brief Prints PVT information to OGC KML format file (can be viewed with Google Earth)
35 *
36 * See https://www.opengeospatial.org/standards/kml
37 */
38class Kml_Printer
39{
40public:
41 explicit Kml_Printer(const std::string& base_path = std::string("."));
42 ~Kml_Printer();
43 bool set_headers(const std::string& filename, bool time_tag_name = true);
44 bool print_position(const Pvt_Solution* const position);
45 bool close_file();
46
47private:
48 std::ofstream kml_file;
49 std::ofstream tmp_file;
50 std::string kml_filename;
51 std::string kml_base_path;
52 std::string tmp_file_str;
53 std::string indent;
54 unsigned int point_id;
55 bool positions_printed;
56};
57
58
59/** \} */
60/** \} */
61#endif // GNSS_SDR_KML_PRINTER_H
Base class for a PVT solution.