0.2.0
Loading...
Searching...
No Matches
SNRMask.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 <array>
17
19#include "Navigation/Transformations/Units.hpp"
20
21namespace NAV
22{
23
26{
27 public:
30
33 bool ShowGuiWidgets(const char* label = nullptr);
34
36 [[nodiscard]] bool isInactive() const;
37
43 [[nodiscard]] bool checkSNRMask(Frequency freq, double elevation, double SNR) const;
44
45 private:
47 static constexpr std::array<double, 10> elevations = {
48 deg2rad(5.0),
49 deg2rad(15.0),
50 deg2rad(25.0),
51 deg2rad(35.0),
52 deg2rad(45.0),
53 deg2rad(55.0),
54 deg2rad(65.0),
55 deg2rad(75.0),
56 deg2rad(85.0),
57 deg2rad(90.0),
58 };
59
61 std::pair<std::array<double, elevations.size()>, bool> allOverride = { {}, true };
62
64 std::array<std::pair<Frequency, std::pair<std::array<double, elevations.size()>, bool>>, Frequency::GetAll().size()> mask;
65
66 friend void to_json(json& j, const SNRMask& obj);
67 friend void from_json(const json& j, SNRMask& obj);
68};
69
73void to_json(json& j, const SNRMask& obj);
77void from_json(const json& j, SNRMask& obj);
78
79} // namespace NAV
nlohmann::json json
json namespace
Definition FlowManager.hpp:21
Frequency definition for different satellite systems.
Frequency definition for different satellite systems.
Definition Frequency.hpp:59
static constexpr std::array< Frequency, 27 > GetAll()
Returns a list with all possible frequencies.
Definition Frequency.hpp:183
Signal to Noise Ratio Mask.
Definition SNRMask.hpp:26
friend void from_json(const json &j, SNRMask &obj)
Converts the provided json object into a node object.
bool checkSNRMask(Frequency freq, double elevation, double SNR) const
Checks wether the SNR values passes the SNR mask.
friend void to_json(json &j, const SNRMask &obj)
Converts the provided object into json.
bool ShowGuiWidgets(const char *label=nullptr)
Shows a button to select the SNR Mask.
SNRMask()
Default Constructor.
bool isInactive() const
Checks wether all SNR values are 0.