0.2.0
Loading...
Searching...
No Matches
CommonLog.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 <mutex>
17#include <vector>
18
19#include "util/Eigen.hpp"
21
22namespace NAV
23{
26{
27 public:
29 virtual ~CommonLog();
31 CommonLog(const CommonLog&) = delete;
33 CommonLog(CommonLog&&) = delete;
35 CommonLog& operator=(const CommonLog&) = delete;
38
40 void initialize() const;
41
45 static double calcTimeIntoRun(const InsTime& insTime);
46
49 {
50 double northSouth = 0.0;
51 double eastWest = 0.0;
52 };
53
57 static LocalPosition calcLocalPosition(const Eigen::Vector3d& lla_position);
58
59 protected:
62
64 static inline InsTime _startTime;
66 static inline double _originLatitude = std::nan("");
68 static inline double _originLongitude = std::nan("");
69
70 private:
72 static inline std::mutex _mutex;
74 static inline std::vector<bool> _wantsInit;
76 size_t _index = 0;
77};
78
79} // namespace NAV
Vector space operations.
The class is responsible for all time-related tasks.
Common logging variables like time into run and local positions.
Definition CommonLog.hpp:26
CommonLog & operator=(const CommonLog &)=delete
Copy assignment operator.
virtual ~CommonLog()
Destructor.
CommonLog(CommonLog &&)=delete
Move constructor.
CommonLog()
Default constructor.
static double _originLongitude
Start Longitude [rad] for calculation of relative East-West.
Definition CommonLog.hpp:68
static double calcTimeIntoRun(const InsTime &insTime)
Calculates the relative time into he run.
CommonLog(const CommonLog &)=delete
Copy constructor.
void initialize() const
Initialize the common log variables.
static LocalPosition calcLocalPosition(const Eigen::Vector3d &lla_position)
Calculate the local position offset from a reference point.
CommonLog & operator=(CommonLog &&)=delete
Move assignment operator.
static InsTime _startTime
Start Time for calculation of relative time.
Definition CommonLog.hpp:64
static double _originLatitude
Start Latitude [rad] for calculation of relative North-South.
Definition CommonLog.hpp:66
The class is responsible for all time-related tasks.
Definition InsTime.hpp:667
Local position offset from a reference point.
Definition CommonLog.hpp:49
double northSouth
North/South deviation from the reference point [m].
Definition CommonLog.hpp:50
double eastWest
East/West deviation from the reference point [m].
Definition CommonLog.hpp:51