21#ifndef SIMULATION_SIM_TIME_MANAGER_H
22#define SIMULATION_SIM_TIME_MANAGER_H
95 double str2tdb(
const std::string &time_input);
Class for inter-object communication.
Definition DataIO.hpp:60
Base class for object organization.
Definition GraphTreeObject.h:98
GraphTreeObject(const char *gt_nme="", GraphTreeObject **storage_array=nullptr, uint32 storage_size=0)
Name-based constructor for GraphTreeObject which will have no children by default.
Definition GraphTreeObject.cpp:23
Wrapper to manage and convert time as timespce.
Definition Time.h:53
SimTimeManager()
Base constructor – time manager should initialize to zeros and then be set.
Definition SimTimeManager.cpp:44
clockwerk::DataIO< clockwerk::Time > step_end_time
This is the time at the end of a given scheduler step.
Definition SimTimeManager.h:150
clockwerk::Time * _gps_time_ptr
Definition SimTimeManager.h:190
void setTime(clockwerk::Time set_val)
Set time to val set_val (to something different than sim time manager).
Definition SimTimeManager.h:176
clockwerk::DataIO< clockwerk::Time > base_time
This is the exact current time as the scheduler steps forward.
Definition SimTimeManager.h:152
void unsetTime()
Set time to unset system time (return to SimTimeManager value).
Definition SimTimeManager.h:179
std::string tdbTime()
Function to return the TDB time as a string.
Definition SimTimeManager.h:104
clockwerk::Time * _tdb_time_ptr
Definition SimTimeManager.h:189
clockwerk::Time _now
Definition SimTimeManager.h:197
std::string jdTime()
Function to return the Julian date as a string.
Definition SimTimeManager.cpp:122
std::string utcTime()
Function to return the TDB time as a string.
Definition SimTimeManager.cpp:116
bool _started
Definition SimTimeManager.h:195
clockwerk::DataIO< clockwerk::Time > gps_time
Definition SimTimeManager.h:159
clockwerk::Time _system_time_offset
Definition SimTimeManager.h:200
clockwerk::DataIO< clockwerk::Time > navigation_time
Definition SimTimeManager.h:168
struct timespec _tmp
Definition SimTimeManager.h:183
clockwerk::DataIO< clockwerk::Time > system_time
Definition SimTimeManager.h:165
clockwerk::Time _nav_base_time
Definition SimTimeManager.h:203
clockwerk::Time * _base_time_ptr
Definition SimTimeManager.h:188
void setTime(const std::string &time_input=DEFAULT_SIMULATION_TIME)
Function to set time by string input.
Definition SimTimeManager.cpp:193
double decimalYear()
Function to return the decimal year as a double.
Definition SimTimeManager.cpp:132
clockwerk::DataIO< clockwerk::Time > step_start_time
Definition SimTimeManager.h:148
bool wallClockIsStarted()
Function to return whether the wall clock timer is started.
Definition SimTimeManager.h:172
void configureNavigationTime(const std::string &source="SYSTEM")
Configure the os.navigationTime() and navigation_time outputs.
Definition SimTimeManager.cpp:176
void stepTime(const clockwerk::Time &step)
Function to increment all times.
Definition SimTimeManager.cpp:64
std::string gpsTime()
Function to return the GPS time as a string.
Definition SimTimeManager.cpp:128
clockwerk::DataIO< clockwerk::Time > tdb_time
Definition SimTimeManager.h:156
clockwerk::Time * _start_step_ptr
Pointers to our time objects.
Definition SimTimeManager.h:186
double str2tdb(const std::string &time_input)
Definition SimTimeManager.cpp:110
clockwerk::Time _diff
Definition SimTimeManager.h:182
nav_time_sources_e _nav_time_source
Definition SimTimeManager.h:202
uint32 _system_time_resolution
Definition SimTimeManager.h:201
clockwerk::Time * _system_time_ptr
Definition SimTimeManager.h:192
clockwerk::Time wallClockTimer()
Function to return the wall clock time since run start.
Definition SimTimeManager.cpp:95
clockwerk::Time * _end_step_ptr
Definition SimTimeManager.h:187
virtual ~SimTimeManager()
Definition SimTimeManager.h:74
clockwerk::DataIO< clockwerk::Time > utc_time
Definition SimTimeManager.h:162
GraphTreeObject * _children[MAXIMUM_APP_CHILDREN]
Definition SimTimeManager.h:206
clockwerk::Time * _utc_time_ptr
Definition SimTimeManager.h:191
void updateStep(const clockwerk::Time &step)
Function to increment step start and end time.
Definition SimTimeManager.cpp:84
bool _sys_time_set
Definition SimTimeManager.h:204
int configureSystemTime(const clockwerk::Time &offset, uint32 resolution_nsec=1)
Configure the os.systemTime() and system_time outputs.
Definition SimTimeManager.cpp:159
clockwerk::Time _start
Definition SimTimeManager.h:196
Class to propagate CR3BP dynamics in characteristic units.
Definition statistics.hpp:22
nav_time_sources_e
Definition SimTimeManager.h:36
@ NAV_SRC_SYSTEM
Definition SimTimeManager.h:37
@ NAV_SRC_TDB
Definition SimTimeManager.h:40
@ NAV_SRC_UTC
Definition SimTimeManager.h:39
@ NAV_SRC_GPS
Definition SimTimeManager.h:38
const double GPS_TO_J2000_ET_OFFSET
This is the offset between the GPS and J2000 epochs for calculation of GPS time The GPS epoch is Janu...
Definition SimTimeManager.h:34
const std::string DEFAULT_SIMULATION_TIME
This is the default simulation time.
Definition SimTimeManager.h:30