0.3.0
Loading...
Searching...
No Matches
SystemModel.cpp
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#include "SystemModel.hpp"
10
11#include <iostream>
12#include <fmt/format.h>
13#include <imgui.h>
14
15#include "MotionModel.hpp"
18
19#include "util/Logger.hpp"
20
21bool NAV::SystemModelGui(SystemModelCalcAlgorithm& algorithm, float itemWidth, const char* id)
22{
23 bool changed = false;
24
25 ImGui::SetNextItemWidth(itemWidth);
26 if (auto alg = static_cast<int>(algorithm);
27 ImGui::Combo(fmt::format("Q calculation algorithm##{}", id).c_str(), &alg, "Van Loan\0Taylor 1st Order (Groves 2013)\0\0"))
28 {
29 algorithm = static_cast<SystemModelCalcAlgorithm>(alg);
30 LOG_DEBUG("{}: Q calculation algorithm changed to {}", id, fmt::underlying(algorithm));
31 changed = true;
32 }
33
34 return changed;
35}
36
37std::ostream& operator<<(std::ostream& os, const NAV::Keys::MotionModelKey& obj)
38{
39 return os << fmt::format("{}", obj);
40}
41std::ostream& operator<<(std::ostream& os, const NAV::Keys::RecvClkBias& obj)
42{
43 return os << fmt::format("{}", obj);
44}
45std::ostream& operator<<(std::ostream& os, const NAV::Keys::RecvClkDrift& obj)
46{
47 return os << fmt::format("{}", obj);
48}
49std::ostream& operator<<(std::ostream& os, const NAV::Keys::InterFreqBias& obj)
50{
51 return os << fmt::format("{}", obj);
52}
Inter Frequency Bias System Model.
Utility class for logging to console and file.
#define LOG_DEBUG
Debug information. Should not be called on functions which receive observations (spamming)
Definition Logger.hpp:67
Motion System Model.
Receiver Clock System Model.
std::ostream & operator<<(std::ostream &os, const NAV::Keys::MotionModelKey &obj)
Stream insertion operator overload.
System Model.
MotionModelKey
Keys used in the model.
bool SystemModelGui(SystemModelCalcAlgorithm &algorithm, float itemWidth, const char *id)
Shows a GUI.
SystemModelCalcAlgorithm
Algorithms to calculate the system model with.
Receiver clock error [m].
Receiver clock drift [m/s].