INSTINCT Code Coverage Report


Directory: src/
File: Navigation/GNSS/SystemModel/SystemModel.cpp
Date: 2025-02-07 16:54:41
Exec Total Coverage
Lines: 0 17 0.0%
Functions: 0 5 0.0%
Branches: 0 16 0.0%

Line Branch Exec Source
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"
16 #include "InterFrequencyBiasModel.hpp"
17 #include "ReceiverClockModel.hpp"
18
19 #include "util/Logger.hpp"
20
21 bool 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
37 std::ostream& operator<<(std::ostream& os, const NAV::Keys::MotionModelKey& obj)
38 {
39 return os << fmt::format("{}", obj);
40 }
41 std::ostream& operator<<(std::ostream& os, const NAV::Keys::RecvClkBias& obj)
42 {
43 return os << fmt::format("{}", obj);
44 }
45 std::ostream& operator<<(std::ostream& os, const NAV::Keys::RecvClkDrift& obj)
46 {
47 return os << fmt::format("{}", obj);
48 }
49 std::ostream& operator<<(std::ostream& os, const NAV::Keys::InterFreqBias& obj)
50 {
51 return os << fmt::format("{}", obj);
52 }
53