GNSS-SDR 0.0.21
An Open Source GNSS Software Defined Receiver
Loading...
Searching...
No Matches
geojson_printer.h
Go to the documentation of this file.
1/*!
2 * \file geojson_printer.h
3 * \brief Interface of a class that prints PVT solutions in GeoJSON format
4 * \author Carles Fernandez-Prades, 2015. cfernandez(at)cttc.es
5 *
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_GEOJSON_PRINTER_H
20#define GNSS_SDR_GEOJSON_PRINTER_H
21
22
23#include <fstream>
24#include <string>
25
26/** \addtogroup PVT
27 * \{ */
28/** \addtogroup PVT_libs
29 * \{ */
30
31
32class Pvt_Solution;
33
34/*!
35 * \brief Prints PVT solutions in GeoJSON format file
36 *
37 * See https://tools.ietf.org/html/rfc7946
38 */
39class GeoJSON_Printer
40{
41public:
42 explicit GeoJSON_Printer(const std::string& base_path = ".");
43 ~GeoJSON_Printer();
44 bool set_headers(const std::string& filename, bool time_tag_name = true);
45 bool print_position(const Pvt_Solution* const position);
46 bool close_file();
47
48private:
49 std::ofstream geojson_file;
50 std::string filename_;
51 std::string geojson_base_path;
52 bool first_pos;
53};
54
55
56/** \} */
57/** \} */
58#endif // GNSS_SDR_GEOJSON_PRINTER_H
Base class for a PVT solution.