0.2.0
Loading...
Searching...
No Matches
UbloxGnssOrbitCollector.hpp
Go to the documentation of this file.
1// This file is part of INSTINCT, the INS Toolkit for Integrated
2// Navigation Concepts and Training by the Institute of Navigation of
3// the University of Stuttgart, Germany.
4//
5// This Source Code Form is subject to the terms of the Mozilla Public
6// License, v. 2.0. If a copy of the MPL was not distributed with this
7// file, You can obtain one at https://mozilla.org/MPL/2.0/.
8
13
14#pragma once
15
16#include <mutex>
17#include <bitset>
18#include <memory>
19#include <unordered_map>
20#include <set>
21
25
27
28namespace ubx = NAV::vendor::ublox;
29
30namespace NAV
31{
34{
35 public:
48
50 [[nodiscard]] static std::string typeStatic();
51
53 [[nodiscard]] std::string type() const override;
54
56 [[nodiscard]] static std::string category();
57
58 private:
59 constexpr static size_t INPUT_PORT_INDEX_UBLOX_OBS = 0;
60 constexpr static size_t OUTPUT_PORT_INDEX_GNSS_NAV_INFO = 0;
61
63 bool initialize() override;
64
68 void onDeleteLink(OutputPin& startPin, InputPin& endPin) override;
69
71 GnssNavInfo _gnssNavInfo;
72
74 std::optional<std::unique_lock<std::mutex>> _postProcessingLock;
75
77 struct EphemerisBuilder
78 {
82 EphemerisBuilder(const SatId& satId, std::shared_ptr<SatNavData> navData)
83 : satId(satId), navData(std::move(navData))
84 {
85 subframes.reset();
86 }
87
88 SatId satId;
89 std::shared_ptr<SatNavData> navData;
90 std::bitset<5> subframes;
91 };
92
94 std::vector<EphemerisBuilder> _ephemerisBuilder;
95
97 std::unordered_map<SatId, size_t> _lastAccessedBuilder;
98
100 std::set<SatelliteSystem> _warningsNotImplemented;
101
107 EphemerisBuilder& getEphemerisBuilder(const SatId& satId, const InsTime& insTime, size_t IOD = 0);
108
113 std::optional<std::reference_wrapper<EphemerisBuilder>> getEphemerisBuilder(const SatId& satId, size_t IOD);
114
118 std::optional<std::reference_wrapper<EphemerisBuilder>> getLastEphemerisBuilder(const SatId& satId);
119
123 void receiveObs(InputPin::NodeDataQueue& queue, size_t pinIdx);
124
129 void decryptGPS(const SatId& satId, const ubx::UbxRxmSfrbx& sfrbx, const InsTime& insTime);
130
135 void decryptGalileo(const SatId& satId, const ubx::UbxRxmSfrbx& sfrbx, const InsTime& insTime);
136
141 void decryptGLONASS(const SatId& satId, const ubx::UbxRxmSfrbx& sfrbx, const InsTime& insTime);
142
147 void decryptBeiDou(const SatId& satId, const ubx::UbxRxmSfrbx& sfrbx, const InsTime& insTime);
148
153 void decryptQZSS(const SatId& satId, const ubx::UbxRxmSfrbx& sfrbx, const InsTime& insTime);
154
159 void decryptIRNSS(const SatId& satId, const ubx::UbxRxmSfrbx& sfrbx, const InsTime& insTime);
160
165 void decryptSBAS(const SatId& satId, const ubx::UbxRxmSfrbx& sfrbx, const InsTime& insTime);
166};
167
168} // namespace NAV
Navigation message information.
Node Class.
Satellite Navigation data (to calculate SatNavData and clock)
ublox Observation Class
void move(std::vector< T > &v, size_t sourceIdx, size_t targetIdx)
Moves an element within a vector to a new position.
Definition Vector.hpp:26
GNSS Navigation message information.
Definition GnssNavInfo.hpp:30
Input pins of nodes.
Definition Pin.hpp:491
TsDeque< std::shared_ptr< const NAV::NodeData > > NodeDataQueue
Node data queue type.
Definition Pin.hpp:703
Abstract parent class for all nodes.
Definition Node.hpp:86
Output pins of nodes.
Definition Pin.hpp:338
Collects UBX-RXM-SFRBX messages and provides the Orbit information.
Definition UbloxGnssOrbitCollector.hpp:34
UbloxGnssOrbitCollector & operator=(const UbloxGnssOrbitCollector &)=delete
Copy assignment operator.
UbloxGnssOrbitCollector(UbloxGnssOrbitCollector &&)=delete
Move constructor.
UbloxGnssOrbitCollector()
Default constructor.
static std::string typeStatic()
String representation of the Class Type.
UbloxGnssOrbitCollector & operator=(UbloxGnssOrbitCollector &&)=delete
Move assignment operator.
static std::string category()
String representation of the Class Category.
~UbloxGnssOrbitCollector() override
Destructor.
std::string type() const override
String representation of the Class Type.
UbloxGnssOrbitCollector(const UbloxGnssOrbitCollector &)=delete
Copy constructor.
Identifies a satellite (satellite system and number)
Definition SatelliteIdentifier.hpp:32
Broadcast Navigation Data Subframe.
Definition UbloxTypes.hpp:707