0.5.0
Loading...
Searching...
No Matches
InsGnssTCKFSolution.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
9/// @file InsGnssTCKFSolution.hpp
10/// @brief Tightly-coupled Kalman Filter INS/GNSS errors
11/// @author M. Maier (marcel.maier@ins.uni-stuttgart.de)
12/// @date 2023-02-24
13
14#pragma once
15
17
18namespace NAV
19{
20/// Tightly-coupled Kalman Filter INS/GNSS errors
22{
23 public:
24 /// @brief Returns the type of the data class
25 /// @return The data type
26 [[nodiscard]] static std::string type()
27 {
28 return "InsGnssTCKFSolution";
29 }
30
31 /// @brief Returns the type of the data class
32 /// @return The data type
33 [[nodiscard]] std::string getType() const override { return type(); }
34
35 /// @brief Returns the parent types of the data class
36 /// @return The parent data types
37 [[nodiscard]] static std::vector<std::string> parentTypes()
38 {
40 parent.push_back(InsGnssLCKFSolution::type());
41 return parent;
42 }
43
44 /// @brief Returns a vector of data descriptors
45 [[nodiscard]] static std::vector<std::string> GetStaticDataDescriptors()
46 {
48 desc.reserve(GetStaticDescriptorCount());
49 desc.emplace_back("Receiver clock offset [m]");
50 desc.emplace_back("Receiver clock drift [m/s]");
51 desc.emplace_back("Receiver clock offset [s]");
52 desc.emplace_back("Receiver clock drift [s/s]");
53 return desc;
54 }
55
56 /// @brief Get the amount of descriptors
57 [[nodiscard]] static constexpr size_t GetStaticDescriptorCount() { return InsGnssLCKFSolution::GetStaticDescriptorCount() + 4; }
58
59 /// @brief Returns a vector of data descriptors
60 [[nodiscard]] std::vector<std::string> staticDataDescriptors() const override { return GetStaticDataDescriptors(); }
61
62 /// @brief Get the amount of descriptors
63 [[nodiscard]] size_t staticDescriptorCount() const override { return GetStaticDescriptorCount(); }
64
65 /// @brief Get the value at the index
66 /// @param idx Index corresponding to data descriptor order
67 /// @return Value if in the observation
68 [[nodiscard]] std::optional<double> getValueAt(size_t idx) const override
69 {
72 switch (idx)
73 {
74 case InsGnssLCKFSolution::GetStaticDescriptorCount() + 0: // Receiver clock offset [m]
75 return recvClkOffset;
76 case InsGnssLCKFSolution::GetStaticDescriptorCount() + 1: // Receiver clock drift [m/s]
77 return recvClkDrift;
78 case InsGnssLCKFSolution::GetStaticDescriptorCount() + 2: // Receiver clock offset [s]
80 case InsGnssLCKFSolution::GetStaticDescriptorCount() + 3: // Receiver clock drift [s/s]
82 default:
83 return std::nullopt;
84 }
85 }
86
87 /// δϱ The receiver clock offset in [m]
88 double recvClkOffset{};
89
90 /// δϱ_dot The receiver clock drift in [m/s]
91 double recvClkDrift{};
92};
93
94} // namespace NAV
#define INS_ASSERT(_EXPR)
Assert function wrapper.
Definition Assert.h:19
Loosely-coupled Kalman Filter INS/GNSS errors.
static constexpr double C
Speed of light [m/s].
Definition Constants.hpp:34
Loosely-coupled Kalman Filter INS/GNSS errors.
static std::vector< std::string > GetStaticDataDescriptors()
Returns a vector of data descriptors.
static std::string type()
Returns the type of the data class.
static constexpr size_t GetStaticDescriptorCount()
Get the number of descriptors.
std::optional< double > getValueAt(size_t idx) const override
Get the value at the index.
static std::vector< std::string > parentTypes()
Returns the parent types of the data class.
Tightly-coupled Kalman Filter INS/GNSS errors.
static std::vector< std::string > GetStaticDataDescriptors()
Returns a vector of data descriptors.
static constexpr size_t GetStaticDescriptorCount()
Get the amount of descriptors.
static std::string type()
Returns the type of the data class.
double recvClkDrift
δϱ_dot The receiver clock drift in [m/s]
std::vector< std::string > staticDataDescriptors() const override
Returns a vector of data descriptors.
double recvClkOffset
δϱ The receiver clock offset in [m]
static std::vector< std::string > parentTypes()
Returns the parent types of the data class.
std::optional< double > getValueAt(size_t idx) const override
Get the value at the index.
std::string getType() const override
Returns the type of the data class.
size_t staticDescriptorCount() const override
Get the amount of descriptors.