Classes | Functions | Variables
Time Representation

Detailed Description

Classes

class  gnsstk::ANSITime
 
class  gnsstk::BasicTimeSystemConverter
 
class  gnsstk::BDSWeekSecond
 
class  gnsstk::CivilTime
 
class  gnsstk::EphTime
 
class  gnsstk::GALWeekSecond
 
class  gnsstk::GLONASSTime
 
class  gnsstk::GPSWeek
 
class  gnsstk::GPSWeekSecond
 
class  gnsstk::GPSWeekZcount
 
class  gnsstk::GPSZcount
 
class  gnsstk::IRNWeekSecond
 
class  gnsstk::JulianDate
 
class  gnsstk::MJD
 
class  gnsstk::NavTimeSystemConverter
 
class  gnsstk::PosixTime
 
class  gnsstk::QZSWeekSecond
 
class  gnsstk::SystemTime
 
class  gnsstk::TimeRange
 
class  gnsstk::TimeSystemConverter
 
class  gnsstk::TimeTag
 
class  gnsstk::UnixTime
 
class  gnsstk::Week
 
class  gnsstk::WeekSecond
 
class  gnsstk::YDSTime
 

Functions

void gnsstk::convertJDtoCalendar (long jd, int &iyear, int &imonth, int &iday)
 
std::string gnsstk::printTime (const CommonTime &t, const std::string &fmt)
 
long gnsstk::timeAdjustWeekRollover (long toCorrectWeek, long &refWeek)
 

Variables

const double gnsstk::MJD_TO_JD = 2400000.5
 Add this offset to convert Modified Julian Date to Julian Date. More...
 

Function Documentation

◆ convertJDtoCalendar()

void gnsstk::convertJDtoCalendar ( long  jd,
int &  iyear,
int &  imonth,
int &  iday 
)

Fundamental routine to convert from "Julian day" (= JD + 0.5) to calendar day.

Parameters
jdlong integer "Julian day" = JD+0.5
iyearreference to integer year
imonthreference to integer month (January == 1)
idayreference to integer day of month (1st day of month == 1)
Note
range of applicability of this routine is from 0JD (4713BC) to approx 3442448JD (4713AD). Algorithm references: Sinnott, R. W. "Bits and Bytes," Sky & Telescope Magazine, Vol 82, p. 183, August 1991, and The Astronomical Almanac, published by the U.S. Naval Observatory.

Definition at line 52 of file TimeConverters.cpp.

◆ printTime()

std::string gnsstk::printTime ( const CommonTime t,
const std::string &  fmt 
)

The TimeTag classes are the "interface" for CommonTime, so when printing a CommonTime object, each of the TimeTag printf() functions are called to handle the print identifiers that it recognizes. The following is a list of these identifiers and the meaning for each:

  • ANSITime:
    • %K integer seconds since Unix Epoch (00:00, Jan 1, 1970 UTC)
  • CivilTime:
    • %Y integer 4-digit year
    • %y integer 2-digit year
    • %m integer month
    • %b abbreviated month name string (e.g. "Jan")
    • %B full month name string (e.g. "January")
    • %d integer day-of-month
    • %H integer hour-of-day
    • %M integer minute-of-hour
    • %S integer second-of-minute
    • %f float second-of-minute
    • %a abbreviated weekday name (locale ignored)
    • %A full weekday name (locale ignored)
  • Week (GPS/BDS/GAL/QZS):
    • %E integer GPS Epoch
    • %F integer full (13-bit) GPS Week
    • %G integer mod (10-bit) GPS Week
    • %R integer BDS Epoch
    • %D integer full BDS Week
    • %e integer mod BDS Week
    • %T integer GAL Epoch
    • %L integer full GAL Week
    • %l integer mod GAL Week
    • %V integer QZS Epoch
    • %h integer full QZS Week
    • %i integer mod QZS Week - same as I
    • %X integer IRNSS Epoch
    • %O integer IRNSS week
    • %o integer mod INRSS Week
  • WeekSecond (GPS/BDS/GAL/QZS):
    • %w integer GPS day-of-week
    • %g float GPS second-of-week
  • GPSWeekZcount:
    • %w integer GPS day-of-week
    • %z integer GPS Z-count
    • %Z integer GPS Z-count
    • %c integer 29-bit Z-count
    • %C integer 32-bit Z-count
  • JulianDate:
    • %J float Julian Date
  • MJD:
    • %Q float Modified Julian Date
  • UnixTime:
    • %U integer seconds since Unix Epoch (00:00, Jan 1, 1970 UTC)
    • %u integer microseconds
  • PosixTime:
    • %W integer seconds
    • %N integer nanoseconds
  • YDSTime:
    • %Y integer 4-digit year
    • %y integer 2-digit year
    • %j integer day-of-year
    • %s integer second-of-day
  • Common Identifiers:
    • %P string TimeSystem to compare with TimeSystem::Systems enum

Definition at line 64 of file TimeString.cpp.

◆ timeAdjustWeekRollover()

long gnsstk::timeAdjustWeekRollover ( long  toCorrectWeek,
long &  refWeek 
)

Implement a correction for errors in week-rollover, i.e. when the GPS 10-bit week changes from 1023 to 0.

Parameters
[in]toCorrectWeekThe suspect week from data that might be off by 1024 weeks.
[in,out]refWeekThe known full week that will be used as a reference. If this value is zero (the default), the local system clock will be consulted to obtain a reference week. It is recommended for the best performance that the calling application retain this reference week for subsequent calls to this function as each time the function is called with a reference week of zero, system calls are performed to obtain the system clock, and conversions are performed to turn that time into GPS week-second time. The week according to the system clock should be valid for at least a single week epoch, i.e. 1024 weeks (~19 years), so unless you're planning on leaving your software running for more than 19 years straight, it should be valid.
Returns
The value of toCorrectWeek having been adjusted by as many epochs as necessary to bring it to within half a GPS week epoch (i.e. 512 weeks) of the reference time.

Definition at line 46 of file TimeCorrection.cpp.

Variable Documentation

◆ MJD_TO_JD

const double gnsstk::MJD_TO_JD = 2400000.5

Add this offset to convert Modified Julian Date to Julian Date.

Definition at line 51 of file TimeConstants.hpp.



gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:43