GNSS-SDR  0.0.14
An Open Source GNSS Software Defined Receiver
rtklib_pvt.h
Go to the documentation of this file.
1 /*!
2  * \file rtklib_pvt.h
3  * \brief Interface of a Position Velocity and Time computation block
4  * \author Javier Arribas, 2017. jarribas(at)cttc.es
5  *
6  * -----------------------------------------------------------------------------
7  *
8  * GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
9  * This file is part of GNSS-SDR.
10  *
11  * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
12  * SPDX-License-Identifier: GPL-3.0-or-later
13  *
14  * -----------------------------------------------------------------------------
15  */
16 
17 
18 #ifndef GNSS_SDR_RTKLIB_PVT_H
19 #define GNSS_SDR_RTKLIB_PVT_H
20 
21 #include "gnss_synchro.h"
22 #include "pvt_interface.h" // for PvtInterface
23 #include "rtklib.h" // for rtk_t
24 #include "rtklib_pvt_gs.h" // for rtklib_pvt_gs_sptr
25 #include <gnuradio/gr_complex.h> // for gr_complex
26 #include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
27 #include <cstddef> // for size_t
28 #include <ctime> // for time_t
29 #include <map> // for map
30 #include <string> // for string
31 
32 /** \addtogroup PVT
33  * Computation of Position, Velocity and Time from GNSS observables.
34  * \{ */
35 /** \addtogroup PVT_adapters pvt_adapters
36  * Wrap GNU Radio PVT solvers with a PvtInterface
37  * \{ */
38 
40 class Galileo_Almanac;
41 class Galileo_Ephemeris;
42 class Gps_Almanac;
43 class Gps_Ephemeris;
44 
45 /*!
46  * \brief This class implements a PvtInterface for the RTKLIB PVT block
47  */
48 class Rtklib_Pvt : public PvtInterface
49 {
50 public:
51  Rtklib_Pvt(const ConfigurationInterface* configuration,
52  const std::string& role,
53  unsigned int in_streams,
54  unsigned int out_streams);
55 
56  virtual ~Rtklib_Pvt();
57 
58  inline std::string role() override
59  {
60  return role_;
61  }
62 
63  //! Returns "RTKLIB_PVT"
64  inline std::string implementation() override
65  {
66  return "RTKLIB_PVT";
67  }
68 
69  void clear_ephemeris() override;
70  std::map<int, Gps_Ephemeris> get_gps_ephemeris() const override;
71  std::map<int, Galileo_Ephemeris> get_galileo_ephemeris() const override;
72  std::map<int, Gps_Almanac> get_gps_almanac() const override;
73  std::map<int, Galileo_Almanac> get_galileo_almanac() const override;
74 
75  void connect(gr::top_block_sptr top_block) override;
76  void disconnect(gr::top_block_sptr top_block) override;
77  gr::basic_block_sptr get_left_block() override;
78  gr::basic_block_sptr get_right_block() override;
79 
80  inline void reset() override
81  {
82  return;
83  }
84 
85  //! All blocks must have an item_size() function implementation
86  inline size_t item_size() override
87  {
88  return sizeof(Gnss_Synchro);
89  }
90 
91  bool get_latest_PVT(double* longitude_deg,
92  double* latitude_deg,
93  double* height_m,
94  double* ground_speed_kmh,
95  double* course_over_ground_deg,
96  time_t* UTC_time) override;
97 
98 private:
99  rtklib_pvt_gs_sptr pvt_;
100  rtk_t rtk{};
101  std::string role_;
102  unsigned int in_streams_;
103  unsigned int out_streams_;
104 };
105 
106 /** \} */
107 /** \} */
108 #endif // GNSS_SDR_RTKLIB_PVT_H
This class represents an interface to a PVT block.
Definition: pvt_interface.h:48
Interface of a Position Velocity and Time computation block.
This class is a storage and orbital model functions for the GPS SV ephemeris data as described in IS-...
Definition: gps_ephemeris.h:38
This class is a storage for the Galileo SV ALMANAC data.
This class represents an interface to a PVT block.
This is the class that contains the information that is shared by the processing blocks.
Definition: gnss_synchro.h:38
main header file for the rtklib library
This abstract class represents an interface to configuration parameters.
This class is a storage and orbital model functions for the Galileo SV ephemeris data as described in...
size_t item_size() override
All blocks must have an item_size() function implementation.
Definition: rtklib_pvt.h:86
This class implements a PvtInterface for the RTKLIB PVT block.
Definition: rtklib_pvt.h:48
This class is a storage for the GPS SV ALMANAC data as described in IS-GPS-200K.
Definition: gps_almanac.h:35
std::string implementation() override
Returns "RTKLIB_PVT".
Definition: rtklib_pvt.h:64
Definition: rtklib.h:1067
Interface of the Gnss_Synchro class.