Class TimeKeeper#
Defined in File TimeKeeper.h
Inheritance Relationships#
Base Type#
public Karana::Core::Base(Class Base)
Class Documentation#
-
class TimeKeeper : public Karana::Core::Base#
Keeps track of time.
Public Functions
-
TimeKeeper(const kc::ks_ptr<kf::FrameContainer> &fc)#
Constructor.
- Parameters:
fc – FrameContainer. Used to update ephemeris in derived classes. The _initial_ephemeris will also be set to the fc’s current ephemeris.
-
TimeKeeper(const TimeKeeper &other)#
Copy constructor.
- Parameters:
The – TimeKeeper instance to copy from.
-
const km::Ktime &getTime() const#
Get the time from TimeKeeper.
- Returns:
The current time.
-
virtual void setTime(const km::Ktime &time)#
Set the TimeKeeper’s time.
- Parameters:
time – The current time.
-
virtual bool isFinalized() const override#
Determine if the TimeKeeper is initialized.
- Returns:
true if initialized, false otherwise.
-
void setInitialEphemeris(double initial_ephemeris)#
Set the initial ephemeris.
- Parameters:
initial_ephemeris – The initial ephemeris.
-
void setInitialEphemeris(const std::string &utc_time)#
Set the initial ephemeris.
- Parameters:
utc_time – The UTC time as a string in the form “YYYY-MM-DDThh:mm:ss.ss” where Y is the year, M is the month, D is the day, h is the hour, m is the minute, and s is the second. The seconds can have decimals.
Public Static Functions
-
static double utcTimeToEphemeris(const std::string &utc_time)#
Convert a time in UTC to an ephemeris.
- Parameters:
utc_time – The utc_time given as a string in the form “YYYY-MM-DDThh:mm:ss.ss” where Y is the year, M is the month, D is the day, h is the hour, m is the minute, and s is the second. The seconds can have decimals.
- Returns:
The utc_time as an ephemeris.
-
TimeKeeper(const kc::ks_ptr<kf::FrameContainer> &fc)#