GNSS-SDR  0.0.19
An Open Source GNSS Software Defined Receiver
rtklib_conversions.h
Go to the documentation of this file.
1 /*!
2  * \file rtklib_conversions.h
3  * \brief GNSS-SDR to RTKLIB data structures conversion functions
4  * \author 2017, Javier Arribas
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 #ifndef GNSS_SDR_RTKLIB_CONVERSIONS_H
18 #define GNSS_SDR_RTKLIB_CONVERSIONS_H
19 
20 #include "rtklib.h"
21 #include <cstdint>
22 #include <map>
23 #include <string>
24 
25 /** \addtogroup PVT
26  * \{ */
27 /** \addtogroup RTKLIB_Library
28  * \{ */
29 
30 
32 class Galileo_Almanac;
33 class Galileo_Ephemeris;
36 class Gnss_Synchro;
37 class Gps_Almanac;
38 class Gps_CNAV_Ephemeris;
39 class Gps_Ephemeris;
40 
42 {
43 public:
44  HAS_clock_corrections() = default;
45  float clock_correction_m{};
46  uint32_t valid_until{};
47 };
48 
50 {
51 public:
52  HAS_orbit_corrections() = default;
53  float radial_m{};
54  float in_track_m{};
55  float cross_track_m{};
56  uint32_t valid_until{};
57  uint16_t iod{};
58 };
59 
61 {
62 public:
63  HAS_obs_corrections() = default;
64  float code_bias_m{};
65  float phase_bias_cycle{};
66 };
67 
68 
69 eph_t eph_to_rtklib(const Galileo_Ephemeris& gal_eph);
70 
72  const std::map<int, HAS_orbit_corrections>& orbit_correction_map,
73  const std::map<int, HAS_clock_corrections>& clock_correction_map);
74 
75 eph_t eph_to_rtklib(const Gps_Ephemeris& gps_eph,
76  bool pre_2009_file = false);
77 
78 eph_t eph_to_rtklib(const Gps_Ephemeris& gps_eph,
79  const std::map<int, HAS_orbit_corrections>& orbit_correction_map,
80  const std::map<int, HAS_clock_corrections>& clock_correction_map,
81  bool pre_2009_file = false);
82 
83 eph_t eph_to_rtklib(const Gps_CNAV_Ephemeris& gps_cnav_eph);
85 
86 alm_t alm_to_rtklib(const Gps_Almanac& gps_alm);
87 alm_t alm_to_rtklib(const Galileo_Almanac& gal_alm);
88 
89 /*!
90  * \brief Transforms a Glonass_Gnav_Ephemeris to its RTKLIB counterpart
91  * \param glonass_gnav_eph GLONASS GNAV Ephemeris structure
92  * \return Ephemeris structure for RTKLIB parsing
93  */
94 geph_t eph_to_rtklib(const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const Glonass_Gnav_Utc_Model& gnav_clock_model);
95 
96 obsd_t insert_obs_to_rtklib(obsd_t& rtklib_obs,
97  const Gnss_Synchro& gnss_synchro,
98  const std::map<std::string, std::map<int, HAS_obs_corrections>>& has_obs_corr,
99  int week,
100  int band,
101  bool pre_2009_file = false);
102 
103 obsd_t insert_obs_to_rtklib(obsd_t& rtklib_obs, const Gnss_Synchro& gnss_synchro, int week, int band, bool pre_2009_file = false);
104 
105 
106 /** \} */
107 /** \} */
108 #endif // GNSS_SDR_RTKLIB_CONVERSIONS_H
This is a storage class for the GPS CNAV ephemeris data as described in IS-GPS-200M.
This class is a storage and orbital model functions for the GPS SV ephemeris data as described in IS-...
Definition: gps_ephemeris.h:40
Definition: rtklib.h:362
Definition: rtklib.h:462
Definition: rtklib.h:432
This class is a storage for the Galileo SV ALMANAC data.
This class is a storage and orbital model functions for the GLONASS SV ephemeris data as described in...
This is a storage class for the Beidou SV ephemeris data as described in BeiDou Navigation Satellite ...
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 class is a storage and orbital model functions for the Galileo SV ephemeris data as described in...
This class is a storage for the GLONASS GNAV UTC MODEL data as described in GLONASS ICD (Edition 5...
Definition: rtklib.h:418
This class is a storage for the GPS SV ALMANAC data as described in IS-GPS-200M.
Definition: gps_almanac.h:35
geph_t eph_to_rtklib(const Glonass_Gnav_Ephemeris &glonass_gnav_eph, const Glonass_Gnav_Utc_Model &gnav_clock_model)
Transforms a Glonass_Gnav_Ephemeris to its RTKLIB counterpart.