0.3.0
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
14
15#pragma once
16
18#include <Eigen/Dense>
19
20namespace NAV
21{
22
25{
26 public:
29 [[nodiscard]] static std::string type()
30 {
31 return "WiFiPositioningSolution";
32 }
33
36 [[nodiscard]] std::string getType() const override { return type(); }
37
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
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
58 [[nodiscard]] static constexpr size_t GetStaticDescriptorCount() { return PosVel::GetStaticDescriptorCount() + 2; }
59
61 [[nodiscard]] std::vector<std::string> staticDataDescriptors() const override { return GetStaticDataDescriptors(); }
62
64 [[nodiscard]] size_t staticDescriptorCount() const override { return GetStaticDescriptorCount(); }
65
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
90 double bias = std::nan("");
92 double biasStdev = std::nan("");
93};
94
95} // namespace NAV
#define INS_ASSERT(_EXPR)
Assert function wrapper.
Definition Assert.h:19
Position, Velocity and Attitude Storage Class.
Position, Velocity and Attitude 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.
Definition WiFiPositioningSolution.hpp:25
size_t staticDescriptorCount() const override
Get the amount of descriptors.
Definition WiFiPositioningSolution.hpp:64
static std::vector< std::string > GetStaticDataDescriptors()
Returns a vector of data descriptors.
Definition WiFiPositioningSolution.hpp:48
std::string getType() const override
Returns the type of the data class.
Definition WiFiPositioningSolution.hpp:36
double bias
Bias [m].
Definition WiFiPositioningSolution.hpp:90
static std::vector< std::string > parentTypes()
Returns the parent types of the data class.
Definition WiFiPositioningSolution.hpp:40
double biasStdev
Standard deviation of Bias [m].
Definition WiFiPositioningSolution.hpp:92
std::optional< double > getValueAt(size_t idx) const override
Get the value at the index.
Definition WiFiPositioningSolution.hpp:69
static constexpr size_t GetStaticDescriptorCount()
Get the amount of descriptors.
Definition WiFiPositioningSolution.hpp:58
static std::string type()
Returns the type of the data class.
Definition WiFiPositioningSolution.hpp:29
std::vector< std::string > staticDataDescriptors() const override
Returns a vector of data descriptors.
Definition WiFiPositioningSolution.hpp:61