0.2.0
Loading...
Searching...
No Matches
Mechanization.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
17#include <type_traits>
18
20
21namespace NAV
22{
23
25template<typename Scalar, typename = std::enable_if_t<std::is_floating_point_v<Scalar>>>
35
39template<typename Scalar, typename = std::enable_if_t<std::is_floating_point_v<Scalar>>>
40void to_json(json& j, const PosVelAttDerivativeConstants<Scalar>& data)
41{
42 j = json{
43 { "gravitationModel", data.gravitationModel },
44 { "coriolisAccelerationCompensationEnabled", data.coriolisAccelerationCompensationEnabled },
45 { "centrifgalAccelerationCompensationEnabled", data.centrifgalAccelerationCompensationEnabled },
46 { "angularRateEarthRotationCompensationEnabled", data.angularRateEarthRotationCompensationEnabled },
47 { "angularRateTransportRateCompensationEnabled", data.angularRateTransportRateCompensationEnabled },
48 };
49}
53template<typename Scalar, typename = std::enable_if_t<std::is_floating_point_v<Scalar>>>
54void from_json(const json& j, PosVelAttDerivativeConstants<Scalar>& data)
55{
56 if (j.contains("gravitationModel")) { j.at("gravitationModel").get_to(data.gravitationModel); }
57 if (j.contains("coriolisAccelerationCompensationEnabled")) { j.at("coriolisAccelerationCompensationEnabled").get_to(data.coriolisAccelerationCompensationEnabled); }
58 if (j.contains("centrifgalAccelerationCompensationEnabled")) { j.at("centrifgalAccelerationCompensationEnabled").get_to(data.centrifgalAccelerationCompensationEnabled); }
59 if (j.contains("angularRateEarthRotationCompensationEnabled")) { j.at("angularRateEarthRotationCompensationEnabled").get_to(data.angularRateEarthRotationCompensationEnabled); }
60 if (j.contains("angularRateTransportRateCompensationEnabled")) { j.at("angularRateTransportRateCompensationEnabled").get_to(data.angularRateTransportRateCompensationEnabled); }
61}
62
63} // namespace NAV
nlohmann::json json
json namespace
Definition FlowManager.hpp:21
Different Gravity Models.
GravitationModel
Available Gravitation Models.
Definition Gravity.hpp:30
Values needed to calculate the PosVelAttDerivative for the local-navigation frame.
Definition Mechanization.hpp:27
bool centrifgalAccelerationCompensationEnabled
Apply the centrifugal acceleration compensation to the measured accelerations.
Definition Mechanization.hpp:30
bool angularRateTransportRateCompensationEnabled
Apply the transport rate compensation to the measured angular rates.
Definition Mechanization.hpp:32
bool angularRateEarthRotationCompensationEnabled
Apply the Earth rotation rate compensation to the measured angular rates.
Definition Mechanization.hpp:31
GravitationModel gravitationModel
Gravity Model to use.
Definition Mechanization.hpp:28
Scalar timeDifferenceSec
Time difference over the whole integration step [s].
Definition Mechanization.hpp:33
bool coriolisAccelerationCompensationEnabled
Apply the Coriolis acceleration compensation to the measured accelerations.
Definition Mechanization.hpp:29