0.4.1
Loading...
Searching...
No Matches
WiFiPositioningSolution.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 WiFiPositioningSolution.hpp
10/// @brief WiFi Positioning Algorithm output
11/// @author R. Lintz (r-lintz@gmx.de) (master thesis)
12/// @author T. Topp (topp@ins.uni-stuttgart.de)
13/// @date 2024-03-12
14
15#pragma once
16
18#include <Eigen/Dense>
19
20namespace NAV
21{
22
23/// WiFi Positioning Algorithm Solution
25{
26 public:
27 /// @brief Returns the type of the data class
28 /// @return The data type
29 [[nodiscard]] static std::string type()
30 {
31 return "WiFiPositioningSolution";
32 }
33
34 /// @brief Returns the type of the data class
35 /// @return The data type
36 [[nodiscard]] std::string getType() const override { return type(); }
37
38 /// @brief Returns the parent types of the data class
39 /// @return The parent data types
40 [[nodiscard]] static std::vector<std::string> parentTypes()
41 {
42 auto parent = PosVel::parentTypes();
43 parent.push_back(PosVel::type());
44 return parent;
45 }
46
47 /// @brief Returns a vector of data descriptors
48 [[nodiscard]] static std::vector<std::string> GetStaticDataDescriptors()
49 {
51 desc.reserve(GetStaticDescriptorCount());
52 desc.emplace_back("Bias [m]");
53 desc.emplace_back("Bias StDev [m]");
54 return desc;
55 }
56
57 /// @brief Get the amount of descriptors
58 [[nodiscard]] static constexpr size_t GetStaticDescriptorCount() { return PosVel::GetStaticDescriptorCount() + 2; }
59
60 /// @brief Returns a vector of data descriptors
61 [[nodiscard]] std::vector<std::string> staticDataDescriptors() const override { return GetStaticDataDescriptors(); }
62
63 /// @brief Get the amount of descriptors
64 [[nodiscard]] size_t staticDescriptorCount() const override { return GetStaticDescriptorCount(); }
65
66 /// @brief Get the value at the index
67 /// @param idx Index corresponding to data descriptor order
68 /// @return Value if in the observation
69 [[nodiscard]] std::optional<double> getValueAt(size_t idx) const override
70 {
72 if (idx < PosVel::GetStaticDescriptorCount()) { return PosVel::getValueAt(idx); }
73 switch (idx)
74 {
75 case PosVel::GetStaticDescriptorCount() + 0: // Bias [m]
76 return bias;
77 break;
78 case PosVel::GetStaticDescriptorCount() + 1: // Bias StDev [m]
79 return biasStdev;
80 break;
81 default:
82 return std::nullopt;
83 }
84 return std::nullopt;
85 }
86
87 //--------------------------------------------------------- Public Members ------------------------------------------------------------
88
89 /// Bias [m]
90 double bias = std::nan("");
91 /// Standard deviation of Bias [m]
92 double biasStdev = std::nan("");
93};
94
95} // namespace NAV
#define INS_ASSERT(_EXPR)
Assert function wrapper.
Definition Assert.h:19
Position and Velocity Storage Class.
Position and Velocity Storage Class.
Definition PosVel.hpp:23
static constexpr size_t GetStaticDescriptorCount()
Get the amount of descriptors.
Definition PosVel.hpp:73
static std::vector< std::string > parentTypes()
Returns the parent types of the data class.
Definition PosVel.hpp:38
static std::vector< std::string > GetStaticDataDescriptors()
Returns a vector of data descriptors.
Definition PosVel.hpp:46
static std::string type()
Returns the type of the data class.
Definition PosVel.hpp:27
std::optional< double > getValueAt(size_t idx) const override
Get the value at the index.
Definition PosVel.hpp:84
WiFi Positioning Algorithm Solution.
size_t staticDescriptorCount() const override
Get the amount of descriptors.
static std::vector< std::string > GetStaticDataDescriptors()
Returns a vector of data descriptors.
std::string getType() const override
Returns the type of the data class.
static std::vector< std::string > parentTypes()
Returns the parent types of the data class.
double biasStdev
Standard deviation of Bias [m].
std::optional< double > getValueAt(size_t idx) const override
Get the value at the index.
static constexpr size_t GetStaticDescriptorCount()
Get the amount of descriptors.
static std::string type()
Returns the type of the data class.
std::vector< std::string > staticDataDescriptors() const override
Returns a vector of data descriptors.