0.2.0
|
The class is responsible for all time-related tasks. More...
Public Member Functions | |
constexpr int | differenceToUTC (TimeSystem timesys) const |
Returns the time difference in [s] of a time system and UTC. | |
constexpr bool | empty () const |
Checks if the Time object has a value. | |
constexpr | InsTime ()=default |
Default Constructor. | |
constexpr | InsTime (const InsTime &)=default |
Copy constructor. | |
constexpr | InsTime (const InsTime_GPSweekTow &gpsWeekTow, TimeSystem timesys=GPST) |
Constructor. | |
constexpr | InsTime (const InsTime_JD &jd, TimeSystem timesys=UTC) |
Constructor. | |
constexpr | InsTime (const InsTime_MJD &mjd, TimeSystem timesys=UTC) |
Constructor. | |
constexpr | InsTime (const InsTime_YDoySod &yearDoySod, TimeSystem timesys=UTC) |
Constructor. | |
constexpr | InsTime (const InsTime_YMDHMS &yearMonthDayHMS, TimeSystem timesys=UTC) |
Constructor. | |
constexpr | InsTime (InsTime &&)=default |
Move constructor. | |
constexpr | InsTime (int32_t gpsCycle, int32_t gpsWeek, long double tow, TimeSystem timesys=GPST) |
Constructor. | |
constexpr | InsTime (int32_t year, int32_t month, int32_t day, int32_t hour, int32_t min, long double sec, TimeSystem timesys=UTC) |
Constructor. | |
constexpr bool | isLeapYear () const |
Checks if the current time is a leap year. | |
constexpr uint16_t | leapGps2UTC () const |
Returns the current number of leap seconds (offset GPST to UTC) | |
void | MakeTimeFromGloOrbit (double UTC_sec) |
Adds the difference [seconds] between toe (OBRIT-0 last element) and toc (ORBIT-0 first element) to the current time (Changes time, so that it corresponds to the time of GLONASS ORBIT last element) | |
operator std::string () const | |
Converts the object into a readable string. | |
constexpr bool | operator!= (const InsTime &rhs) const |
Inequal comparison operator (takes double precision into account) | |
constexpr InsTime & | operator+= (const std::chrono::duration< long double > &duration) |
Adds a duration to this time point. | |
constexpr InsTime & | operator-= (const std::chrono::duration< long double > &duration) |
Substracts a duration to this time point. | |
constexpr bool | operator< (const InsTime &rhs) const |
Smaller comparison operator (takes double precision into account) | |
constexpr bool | operator<= (const InsTime &rhs) const |
Smaller or equal comparison operator (takes double precision into account) | |
constexpr InsTime & | operator= (const InsTime &)=default |
Copy assignment operator. | |
constexpr InsTime & | operator= (InsTime &&)=default |
Move assignment operator. | |
constexpr bool | operator== (const InsTime &rhs) const |
Equal comparison operator (takes double precision into account) | |
constexpr bool | operator> (const InsTime &rhs) const |
Greater comparison operator (takes double precision into account) | |
constexpr bool | operator>= (const InsTime &rhs) const |
Greater or equal comparison operator (takes double precision into account) | |
void | reset () |
Resets the InsTime object. | |
constexpr InsTime | toFullDay () const |
Returns the current time rounded/cutted to a full day (changes time to 0:0:0h UTC of current day) | |
constexpr InsTime_GPSweekTow | toGPSweekTow (TimeSystem timesys=GPST) const |
Converts this time object into a different format. | |
constexpr InsTime_JD | toJD (TimeSystem timesys=UTC) const |
Converts this time object into a different format. | |
constexpr InsTime_MJD | toMJD (TimeSystem timesys=UTC) const |
Converts this time object into a different format. | |
constexpr long double | toUnixTime () const |
Converts this time object into a UNIX timestamp in [s]. | |
constexpr InsTime_YDoySod | toYDoySod (TimeSystem timesys=UTC) const |
Converts this time object into a different format. | |
constexpr InsTime_YMDHMS | toYMDHMS (TimeSystem timesys=UTC, int digits=-1) const |
Converts this time object into a different format. | |
~InsTime ()=default | |
Destructor. | |
Static Public Member Functions | |
static constexpr uint16_t | leapGps2UTC (const InsTime &insTime) |
Returns the number of leap seconds (offset GPST to UTC) for the provided InsTime object. | |
static constexpr uint16_t | leapGps2UTC (const InsTime_GPSweekTow &gpsWeekTow) |
Returns the number of leap seconds (offset GPST to UTC) for the provided InsTime_GPSweekTow object. | |
static constexpr uint16_t | leapGps2UTC (const InsTime_JD &jd) |
Returns the number of leap seconds (offset GPST to UTC) for the provided InsTime_JD object. | |
static constexpr uint16_t | leapGps2UTC (const InsTime_MJD &mjd_in) |
Returns the number of leap seconds (offset GPST to UTC) for the provided InsTime_MJD object. | |
static constexpr uint16_t | leapGps2UTC (const InsTime_YDoySod &yearDoySod) |
Returns the number of leap seconds (offset GPST to UTC) for the provided InsTime_YDoySod object. | |
static constexpr uint16_t | leapGps2UTC (const InsTime_YMDHMS &yearMonthDayHMS) |
Returns the number of leap seconds (offset GPST to UTC) for the provided InsTime_YMDHMS object. | |
The class is responsible for all time-related tasks.
|
inlineexplicitconstexpr |
Constructor.
[in] | mjd | Time in Modified Julien Date |
[in] | timesys | Time System in which the previous values are given in |
|
inlineexplicitconstexpr |
Constructor.
[in] | jd | Time in Julien Date |
[in] | timesys | Time System in which the previous values are given in |
|
inlineexplicitconstexpr |
Constructor.
[in] | gpsWeekTow | Time as week and time of week |
[in] | timesys | Time System in which the previous values are given in |
|
inlineexplicitconstexpr |
Constructor.
[in] | yearMonthDayHMS | Time in Universal Time Coordinated |
[in] | timesys | Time System in which the previous values are given in |
|
inlineexplicitconstexpr |
Constructor.
[in] | yearDoySod | Time as Year, day of year and seconds of day |
[in] | timesys | Time System in which the previous values are given in |
|
inlineconstexpr |
Constructor.
[in] | gpsCycle | GPS cycle in GPS standard time |
[in] | gpsWeek | GPS week in GPS standard time |
[in] | tow | GPS time of week in GPS standard time |
[in] | timesys | Time System in which the previous values are given in |
|
inlineconstexpr |
Constructor.
[in] | year | Year |
[in] | month | Month (1 = January) |
[in] | day | Day (1 = first day) |
[in] | hour | Hour |
[in] | min | Minute |
[in] | sec | Second |
[in] | timesys | Time System in which the previous values are given in |
|
inlineconstexpr |
Returns the time difference in [s] of a time system and UTC.
[in] | timesys | Time system to get the difference from UTC |
|
inlineconstexpr |
Checks if the current time is a leap year.
|
inlineconstexpr |
Returns the current number of leap seconds (offset GPST to UTC)
|
inlinestaticconstexpr |
Returns the number of leap seconds (offset GPST to UTC) for the provided InsTime object.
[in] | insTime | Time point |
|
inlinestaticconstexpr |
Returns the number of leap seconds (offset GPST to UTC) for the provided InsTime_GPSweekTow object.
[in] | gpsWeekTow | Time point |
|
inlinestaticconstexpr |
Returns the number of leap seconds (offset GPST to UTC) for the provided InsTime_JD object.
[in] | jd | Time point |
|
inlinestaticconstexpr |
Returns the number of leap seconds (offset GPST to UTC) for the provided InsTime_MJD object.
[in] | mjd_in | Time point |
|
inlinestaticconstexpr |
Returns the number of leap seconds (offset GPST to UTC) for the provided InsTime_YDoySod object.
[in] | yearDoySod | Time point |
|
inlinestaticconstexpr |
Returns the number of leap seconds (offset GPST to UTC) for the provided InsTime_YMDHMS object.
[in] | yearMonthDayHMS | Time point |
|
inline |
Adds the difference [seconds] between toe (OBRIT-0 last element) and toc (ORBIT-0 first element) to the current time (Changes time, so that it corresponds to the time of GLONASS ORBIT last element)
[in] | UTC_sec | Seconds in UTC time |
|
inlineconstexpr |
Inequal comparison operator (takes double precision into account)
[in] | rhs | Right-hand side to compare with |
|
inlineconstexpr |
Adds a duration to this time point.
[in] | duration | The duration to add |
|
inlineconstexpr |
Substracts a duration to this time point.
[in] | duration | The duration to substract |
|
inlineconstexpr |
Smaller comparison operator (takes double precision into account)
[in] | rhs | Right-hand side to compare with |
|
inlineconstexpr |
Smaller or equal comparison operator (takes double precision into account)
[in] | rhs | Right-hand side to compare with |
|
inlineconstexpr |
Equal comparison operator (takes double precision into account)
[in] | rhs | Right-hand side to compare with |
|
inlineconstexpr |
Greater comparison operator (takes double precision into account)
[in] | rhs | Right-hand side to compare with |
|
inlineconstexpr |
Greater or equal comparison operator (takes double precision into account)
[in] | rhs | Right-hand side to compare with |
|
inlineconstexpr |
Returns the current time rounded/cutted to a full day (changes time to 0:0:0h UTC of current day)
|
inlineconstexpr |
Converts this time object into a different format.
timesys | Time System in which the time should be given |
|
inlineconstexpr |
Converts this time object into a different format.
timesys | Time System in which the time should be given |
|
inlineconstexpr |
Converts this time object into a different format.
timesys | Time System in which the time should be given |
|
inlineconstexpr |
Converts this time object into a different format.
timesys | Time System in which the time should be given |
|
inlineconstexpr |
Converts this time object into a different format.
timesys | Time System in which the time should be given |
digits | Amount of digits for the seconds to round to |