GNSS-SDR  0.0.13
An Open Source GNSS Software Defined Receiver
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  * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
10  *
11  * GNSS-SDR is a software defined Global Navigation
12  * Satellite Systems receiver
13  *
14  * This file is part of GNSS-SDR.
15  *
16  * SPDX-License-Identifier: GPL-3.0-or-later
17  *
18  * -----------------------------------------------------------------------------
19  */
20 
21 
22 #ifndef GNSS_SDR_KML_PRINTER_H
23 #define GNSS_SDR_KML_PRINTER_H
24 
25 #include <fstream> // for ofstream
26 #include <string>
27 
28 class Pvt_Solution;
29 
30 /*!
31  * \brief Prints PVT information to OGC KML format file (can be viewed with Google Earth)
32  *
33  * See https://www.opengeospatial.org/standards/kml
34  */
36 {
37 public:
38  explicit Kml_Printer(const std::string& base_path = std::string("."));
39  ~Kml_Printer();
40  bool set_headers(const std::string& filename, bool time_tag_name = true);
41  bool print_position(const Pvt_Solution* const position, bool print_average_values);
42  bool close_file();
43 
44 private:
45  std::ofstream kml_file;
46  std::ofstream tmp_file;
47  std::string kml_filename;
48  std::string kml_base_path;
49  std::string tmp_file_str;
50  std::string indent;
51  unsigned int point_id;
52  bool positions_printed;
53 };
54 
55 #endif
Prints PVT information to OGC KML format file (can be viewed with Google Earth)
Definition: kml_printer.h:35
Base class for a PVT solution.
Definition: pvt_solution.h:33