GNSS-SDR  0.0.13
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  * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
9  *
10  * GNSS-SDR is a software defined Global Navigation
11  * Satellite Systems receiver
12  *
13  * This file is part of GNSS-SDR.
14  *
15  * SPDX-License-Identifier: GPL-3.0-or-later
16  *
17  * -----------------------------------------------------------------------------
18  */
19 
20 
21 #ifndef GNSS_SDR_RTKLIB_PVT_H
22 #define GNSS_SDR_RTKLIB_PVT_H
23 
24 #include "gnss_synchro.h"
25 #include "pvt_interface.h" // for PvtInterface
26 #include "rtklib.h" // for rtk_t
27 #include "rtklib_pvt_gs.h" // for rtklib_pvt_gs_sptr
28 #include <gnuradio/gr_complex.h> // for gr_complex
29 #include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
30 #include <cstddef> // for size_t
31 #include <ctime> // for time_t
32 #include <map> // for map
33 #include <string> // for string
34 
36 class Galileo_Almanac;
37 class Galileo_Ephemeris;
38 class Gps_Almanac;
39 class Gps_Ephemeris;
40 
41 /*!
42  * \brief This class implements a PvtInterface for the RTKLIB PVT block
43  */
44 class Rtklib_Pvt : public PvtInterface
45 {
46 public:
47  Rtklib_Pvt(const ConfigurationInterface* configuration,
48  const std::string& role,
49  unsigned int in_streams,
50  unsigned int out_streams);
51 
52  virtual ~Rtklib_Pvt();
53 
54  inline std::string role() override
55  {
56  return role_;
57  }
58 
59  //! Returns "RTKLIB_PVT"
60  inline std::string implementation() override
61  {
62  return "RTKLIB_PVT";
63  }
64 
65  void clear_ephemeris() override;
66  std::map<int, Gps_Ephemeris> get_gps_ephemeris() const override;
67  std::map<int, Galileo_Ephemeris> get_galileo_ephemeris() const override;
68  std::map<int, Gps_Almanac> get_gps_almanac() const override;
69  std::map<int, Galileo_Almanac> get_galileo_almanac() const override;
70 
71  void connect(gr::top_block_sptr top_block) override;
72  void disconnect(gr::top_block_sptr top_block) override;
73  gr::basic_block_sptr get_left_block() override;
74  gr::basic_block_sptr get_right_block() override;
75 
76  inline void reset() override
77  {
78  return;
79  }
80 
81  //! All blocks must have an item_size() function implementation
82  inline size_t item_size() override
83  {
84  return sizeof(Gnss_Synchro);
85  }
86 
87  bool get_latest_PVT(double* longitude_deg,
88  double* latitude_deg,
89  double* height_m,
90  double* ground_speed_kmh,
91  double* course_over_ground_deg,
92  time_t* UTC_time) override;
93 
94 private:
95  rtklib_pvt_gs_sptr pvt_;
96  rtk_t rtk{};
97  std::string role_;
98  unsigned int in_streams_;
99  unsigned int out_streams_;
100 };
101 
102 #endif
This class represents an interface to a PVT block.
Definition: pvt_interface.h:45
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:36
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:33
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:82
This class implements a PvtInterface for the RTKLIB PVT block.
Definition: rtklib_pvt.h:44
This class is a storage for the GPS SV ALMANAC data as described in IS-GPS-200K.
Definition: gps_almanac.h:32
std::string implementation() override
Returns "RTKLIB_PVT".
Definition: rtklib_pvt.h:60
Definition: rtklib.h:1059
Interface of the Gnss_Synchro class.