0.5.0
Loading...
Searching...
No Matches
NAV::CommonLog Class Reference

Common logging variables like time into run and local positions. More...

Data Structures

struct  LocalPosition
 Local position offset from a reference point. More...

Public Member Functions

 CommonLog (CommonLog &&)=delete
 Move constructor.
 CommonLog (const CommonLog &)=delete
 Copy constructor.
void initialize () const
 Initialize the common log variables.
CommonLogoperator= (CommonLog &&)=delete
 Move assignment operator.
CommonLogoperator= (const CommonLog &)=delete
 Copy assignment operator.
virtual ~CommonLog ()
 Destructor.

Static Public Member Functions

static LocalPosition calcLocalPosition (const Eigen::Vector3d &lla_position)
 Calculate the local position offset from a reference point.
static double calcTimeIntoRun (const InsTime &insTime)
 Calculates the relative time into he run.
static void restore (const json &j)
 Read info from a json object.
static json save ()
 Returns a json object of the common log.
static bool ShowOriginInput (const char *id)
 Shows a GUI to input a origin location.

Protected Member Functions

 CommonLog ()
 Default constructor.

Static Protected Attributes

static std::optional< gui::widgets::PositionWithFrame_originPosition
 Origin for calculation of relative position.
static InsTime _startTime
 Start Time for calculation of relative time.
static bool _useGuiInputs
 Use GUI inputs.

Private Attributes

size_t _index
 Index which common log node this is.

Static Private Attributes

static std::mutex _mutex
 Mutex to lock before writing.
static std::vector< bool > _wantsInit
 Vector on which nodes want to initialize.

Detailed Description

Common logging variables like time into run and local positions.

Definition at line 30 of file CommonLog.hpp.

Constructor & Destructor Documentation

◆ ~CommonLog()

NAV::CommonLog::~CommonLog ( )
virtual

Destructor.

Definition at line 45 of file CommonLog.cpp.

◆ CommonLog() [1/3]

NAV::CommonLog::CommonLog ( const CommonLog & )
delete

Copy constructor.

◆ CommonLog() [2/3]

NAV::CommonLog::CommonLog ( CommonLog && )
delete

Move constructor.

◆ CommonLog() [3/3]

NAV::CommonLog::CommonLog ( )
protected

Default constructor.

Definition at line 38 of file CommonLog.cpp.

Member Function Documentation

◆ calcLocalPosition()

CommonLog::LocalPosition NAV::CommonLog::calcLocalPosition ( const Eigen::Vector3d & lla_position)
static

Calculate the local position offset from a reference point.

Parameters
[in]lla_position[𝜙, λ, h] Latitude, Longitude, Altitude in [rad, rad, m]
Returns
Local positions in north/south and east/west directions in [m]

Definition at line 81 of file CommonLog.cpp.

◆ calcTimeIntoRun()

double NAV::CommonLog::calcTimeIntoRun ( const InsTime & insTime)
static

Calculates the relative time into he run.

Parameters
[in]insTimeAbsolute Time
Returns
Relative

Definition at line 70 of file CommonLog.cpp.

◆ initialize()

void NAV::CommonLog::initialize ( ) const

Initialize the common log variables.

Definition at line 51 of file CommonLog.cpp.

◆ operator=() [1/2]

CommonLog & NAV::CommonLog::operator= ( CommonLog && )
delete

Move assignment operator.

◆ operator=() [2/2]

CommonLog & NAV::CommonLog::operator= ( const CommonLog & )
delete

Copy assignment operator.

◆ restore()

void NAV::CommonLog::restore ( const json & j)
static

Read info from a json object.

Parameters
[in]jJson variable to read info from

Definition at line 30 of file CommonLog.cpp.

◆ save()

json NAV::CommonLog::save ( )
staticnodiscard

Returns a json object of the common log.

Definition at line 21 of file CommonLog.cpp.

◆ ShowOriginInput()

bool NAV::CommonLog::ShowOriginInput ( const char * id)
static

Shows a GUI to input a origin location.

Parameters
[in]idUnique id for ImGui
Returns
True if something was changed

Definition at line 115 of file CommonLog.cpp.

Field Documentation

◆ _index

size_t NAV::CommonLog::_index
private

Index which common log node this is.

Definition at line 92 of file CommonLog.hpp.

◆ _mutex

std::mutex NAV::CommonLog::_mutex
inlinestaticprivate

Mutex to lock before writing.

Definition at line 88 of file CommonLog.hpp.

◆ _originPosition

std::optional<gui::widgets::PositionWithFrame> NAV::CommonLog::_originPosition
inlinestaticprotected

Origin for calculation of relative position.

Definition at line 82 of file CommonLog.hpp.

◆ _startTime

InsTime NAV::CommonLog::_startTime
inlinestaticprotected

Start Time for calculation of relative time.

Definition at line 80 of file CommonLog.hpp.

◆ _useGuiInputs

bool NAV::CommonLog::_useGuiInputs
inlinestaticprotected

Use GUI inputs.

Definition at line 84 of file CommonLog.hpp.

◆ _wantsInit

std::vector<bool> NAV::CommonLog::_wantsInit
inlinestaticprivate

Vector on which nodes want to initialize.

Definition at line 90 of file CommonLog.hpp.


The documentation for this class was generated from the following files:
  • /home/runner/work/INSTINCT/INSTINCT/src/util/Logger/CommonLog.hpp
  • /home/runner/work/INSTINCT/INSTINCT/src/util/Logger/CommonLog.cpp