DayTime Class Reference
[GPStk Time Group]

#include <DayTime.hpp>

Collaboration diagram for DayTime:

Collaboration graph
[legend]
List of all members.

Detailed Description

A time representation class for all common time formats, including GPS.

There is a seamless conversion between dates, times, and both, as well as the ability to input and output the stored day-time in formatted strings (printf() and setToString()).

Internally, the representation of day and time uses three quantities, (1) jday, an integer representation of Julian Date, specifically jday = int(JD+0.5) or jday=int(MJD+2400001). [Recall that JD = MJD + 2400000.5 and MJD is an integer when second-of-day==0. N.B. jday is NOT == JD or Julian Date, but DayTime::JD() does return JD.] (2) mSod, the integer part of milliseconds of the day, and (3) mSec, the (double) fractional part of milliseconds of the day.

In addition, the representation includes a tolerance value (see below) and a time frame. The time frame is a simple way of denoting the origin or type of day-time which is stored in the object. See TimeFrame for the list of possible values. The time frame of an object is determined in the call to a constructor (default is timeFrame=Unknown), and carried forward into other objects. It may be read or changed using member functions setAllButTimeFrame(), setTimeFrame(), and getTimeFrame().

The member datum 'double tolerance' is used in DayTime comparisons. It defaults to the value of the static gpstk::DayTime::DAYTIME_TOLERANCE, but this can be modified with the static method setDayTimeTolerance(). Several different default tolerances have been defined and are in the DayTime-Specific Definitions section. The tolerance can also be changed on a per object basis with the setTolerance() member function. All comparisons are done using the tolerance as a range for the comparison. So, for example, operator==() returns true if the times are within 'tolerance' seconds. Once set for each object, the tolerance is appropriately "carried forward" to new objects through the copy operator (DayTime::operator=), the copy constructor, and elsewhere.

The internal representation is manipulated using four fundamental routines, two that convert between 'jday' (the integer representation of JD) and calendar date: year/month/day-of-month, and two that convert between seconds-of-day and hour/minute/second. The range of validity of the jday--calendar routines is approximately 4317 B.C. to 4317 A.D.; these limits are incorporated into constants DayTime::BEGINNING_OF_TIME and DayTime::END_OF_TIME.

* All DayTime objects that lie outside these limits are disallowed. *

This internal representation allows close to the maximum precision possible in the time-of-day. Although, note that the code uses FACTOR=1000 everywhere to compute milliseconds, via e.g. mSec=seconds/FACTOR, and thus FACTOR could be changed to give a different precision. (This has not been tested.)

This representation separates day and time-of-day cleanly. Because day and time are logically separated, it is possible to use DayTime for day only, or for time only. Thus, for example, one could instantiate a DayTime object and only manipulate the date, without reference to time-of-day; or vice-versa. [However in this regard note that the default constructor for DayTime sets the data, not to zero, but to the current (system) time; because there is no year 0, a DayTime object with all zero data is invalid!]

When constructing DayTime objects from GPS time values -- such as GPS week and seconds of weeks, or GPS week and z count -- there may be ambiguity associated with the GPS week. Many receivers and receiver processing software store the GPS week as it appears in the NAV message, as a 10 bit number. This leads to a 1024 week ambiguity when 10 bit GPS weeks are used to specify a DayTime. In general, DayTime uses the system time to disambiguate which 1024 week period to use. This is a good assumption except when processing binary data from before GPS week rollover, which occured on August 22, 1999.

Definition at line 152 of file DayTime.hpp.

Public Types

enum  TimeFrame {
  Unknown, UTC, LocalSystem, GPS_Tx,
  GPS_Rx, GPS_SV, GPS_Receiver
}
 The various time frames. More...

Public Member Functions

DayTimesetTolerance (const double tol) throw ()
 Sets the tolerance for output and comparisons on this object only.
double getTolerance () throw ()
 Return the tolerance value currently in use by this object.
 DayTime () throw (DayTimeException)
 Default constructor.
 DayTime (short GPSWeek, double GPSSecond, TimeFrame f=Unknown) throw (DayTimeException)
 GPS time with full week constructor.
 DayTime (short GPSWeek, double GPSSecond, short year, TimeFrame f=Unknown) throw (DayTimeException)
 GPS time constructor.
 DayTime (short GPSWeek, long zcount, short year, TimeFrame f=Unknown) throw (DayTimeException)
 GPS time constructor.
 DayTime (unsigned long fullZcount, TimeFrame f=Unknown) throw (DayTimeException)
 GPS time constructor given the full Z count.
 DayTime (const GPSZcount &z, TimeFrame f=Unknown) throw (DayTimeException)
 GPS Zcount constructor.
 DayTime (const CommonTime &c, TimeFrame f=Unknown) throw (DayTimeException)
 CommonTime constructor.
 DayTime (short year, short month, short day, short hour, short minute, double second, TimeFrame f=Unknown) throw (DayTimeException)
 Calendar time constructor.
 DayTime (long double MJD, TimeFrame f=Unknown) throw (DayTimeException)
 Modified Julian date time constructor.
 DayTime (double MJD, TimeFrame f=Unknown) throw (DayTimeException)
 Modified Julian date time constructor.
 DayTime (short year, short doy, double sod, TimeFrame f=Unknown) throw (DayTimeException)
 Day of year time constructor.
 DayTime (const struct timeval &t, TimeFrame f=Unknown) throw (DayTimeException)
 UNIX time constructor.
 ~DayTime () throw ()
 Destructor.
 DayTime (const DayTime &right) throw (DayTimeException)
 Copy constructor.
DayTimeoperator= (const DayTime &right) throw ()
 Assignment operator.
double operator- (const DayTime &right) const throw ()
 DayTime difference function.
DayTime operator+ (double sec) const throw ()
 Add seconds to this time.
DayTime operator- (double sec) const throw ()
 Subtract seconds from this time.
DayTimeoperator+= (double sec) throw (DayTimeException)
 Add seconds to this time.
DayTimeoperator-= (double sec) throw (DayTimeException)
 Subtract seconds from this time.
DayTimeaddSeconds (double seconds) throw (DayTimeException)
 Add (double) seconds to this time.
DayTimeaddSeconds (long seconds) throw (DayTimeException)
 Add (integer) seconds to this time.
DayTimeaddMilliSeconds (long msec) throw (DayTimeException)
 Add (integer) milliseconds to this time.
DayTimeaddMicroSeconds (long usec) throw (DayTimeException)
 Add (integer) microseconds to this time.
bool operator== (const DayTime &right) const throw ()
 Equality operator.
bool operator!= (const DayTime &right) const throw ()
 Inequality operator.
bool operator< (const DayTime &right) const throw ()
 Comparison operator (less-than).
bool operator> (const DayTime &right) const throw ()
 Comparison operator (greater-than).
bool operator<= (const DayTime &right) const throw ()
 Comparison operator (less-than or equal-to).
bool operator>= (const DayTime &right) const throw ()
 Comparison operator (greater-than or equal-to).
DayTimesetAllButTimeFrame (const DayTime &right) throw (DayTimeException)
 Change time frames via pseudo-copy method.
DayTimesetTimeFrame (TimeFrame f) throw ()
 Set the time frame for this time.
TimeFrame getTimeFrame () const throw ()
 Get the time frame for this time.
double JD () const throw ()
 Get Julian Date JD.
double MJD () const throw ()
 Get Modified Julian Date MJD.
short year () const throw ()
 Get year.
short month () const throw ()
 Get month of year.
short day () const throw ()
 Get day of month.
short dayOfWeek () const throw ()
 Get day of week.
void getYMD (int &yy, int &mm, int &dd) const throw ()
 Get year, month and day of month.
short hour () const throw ()
 Get hour of day.
short minute () const throw ()
 Get minutes of hour.
double second () const throw ()
 Get seconds of minute.
double secOfDay () const throw ()
 Get seconds of day.
short GPS10bitweek () const throw ()
 Get 10-bit GPS week.
long GPSzcount () const throw ()
 Get normal (19 bit) zcount.
long GPSzcountFloor () const throw ()
 Same as GPSzcount() but without rounding to nearest zcount.
double GPSsecond () const throw ()
 Get seconds of week.
double GPSsow () const throw ()
 Get GPS second of week.
short GPSday () const throw ()
 Get day of week.
short GPSfullweek () const throw ()
 Get full (>10 bits) week.
short GPSyear () const throw ()
 Get year.
short DOYyear () const throw ()
 Get year.
short DOYday () const throw ()
 Get day of year.
short DOY () const throw ()
 Get day of year.
double DOYsecond () const throw ()
 Get seconds of day.
double MJDdate () const throw ()
 Get object time as a modified Julian date.
long double getMJDasLongDouble () const throw ()
 Get object time as a (long double) modified Julian date.
timeval unixTime () const throw (DayTimeException)
 Get object time in UNIX timeval structure.
unsigned long fullZcount () const throw ()
 Get time as 32 bit Z count.
unsigned long fullZcountFloor () const throw ()
 Same as fullZcount() but without rounding to nearest zcount.
 operator GPSZcount () const throw (DayTimeException)
 Convert this object to a GPSZcount object.
 operator CommonTime () const throw (DayTimeException)
 Convert this object to a CommonTime object.
DayTimesetYMDHMS (short year, short month, short day, short hour, short min, double sec, TimeFrame f=Unknown) throw (DayTimeException)
 Set the object's time using calendar (Y/M/D) date and ordinary (H:M:S) time.
DayTimesetGPS (short week, double sow, TimeFrame f=Unknown) throw (DayTimeException)
 Set the object's time using GPS time.
DayTimesetGPS (short week, long zcount, TimeFrame f=Unknown) throw (DayTimeException)
 Set the object's time using GPS time (week and Z count).
DayTimesetGPS (short week, long zcount, short year, TimeFrame f=Unknown) throw (DayTimeException)
 Set the object's time using GPS time.
DayTimesetGPS (short week, double sow, short year, TimeFrame f=Unknown) throw (DayTimeException)
 Set the object's time using GPS time.
DayTimesetGPS (unsigned long Zcount, TimeFrame f=Unknown) throw (DayTimeException)
 Set the object's time using GPS time (full Z count).
DayTimesetGPSfullweek (short fullweek, double sow, TimeFrame f=Unknown) throw (DayTimeException)
 Set the object's time using GPS time.
DayTimesetGPSfullweek (short fullweek, long zcount, TimeFrame f=Unknown) throw (DayTimeException)
 Set the object's time using GPS time.
DayTimesetGPSZcount (const GPSZcount &z, TimeFrame f=Unknown) throw (DayTimeException)
 Set the object's time using the given GPSZcount.
DayTimesetCommonTime (const CommonTime &c, TimeFrame f=Unknown) throw ()
 Set the object's time using the give CommonTime.
DayTimesetYDoySod (short year, short day_of_year, double sec_of_day, TimeFrame f=Unknown) throw (DayTimeException)
 Set the object's time using day of year.
DayTimesetMJD (long double mjd, TimeFrame f=Unknown) throw (DayTimeException)
 Set the object's time using (long double) Modified Julian date.
DayTimesetMJDdate (long double mjd, TimeFrame f=Unknown) throw (DayTimeException)
 Same as setMJD.
DayTimesetMJD (double mjd, TimeFrame f=Unknown) throw (DayTimeException)
 Same as setMJD but with input of type double.
DayTimesetMJDdate (double mjd, TimeFrame f=Unknown) throw (DayTimeException)
 Same as setMJD but with input of type double.
DayTimesetUnix (const struct timeval &t, TimeFrame f=Unknown) throw (DayTimeException)
 Set the object's time using POSIX structures.
DayTimesetANSI (const time_t &t, TimeFrame f=Unknown) throw (DayTimeException)
 Set the object's time using ANSI structures.
DayTimesetSystemTime () throw (DayTimeException)
 Set the object's time to the current system time.
DayTimesetLocalTime () throw (DayTimeException)
 Set the object time to the current local time.
DayTimesetYMD (int yy, int mm, int dd, TimeFrame f=Unknown) throw (DayTimeException)
 Set the object using calendar (Y/M/D) date only (time is unchanged).
DayTimesetHMS (int hh, int mm, double sec, TimeFrame f=Unknown) throw (DayTimeException)
 Set the object using ordinary (H:M:S) time only (day is unchanged).
DayTimesetSecOfDay (double sod, TimeFrame f=Unknown) throw (DayTimeException)
 Set the object using seconds of day only (day is unchanged).
DayTimesetYDoy (int yy, int doy, TimeFrame f=Unknown) throw (DayTimeException)
 Set the object using year and day of year only (time is unchanged).
DayTimesetToString (const std::string &str, const std::string &fmt) throw (DayTimeException, FormatException, gpstk::StringUtils::StringException)
 Similar to scanf, this function takes a string and a format describing string in order to read in daytime values.
std::string printf (const char *fmt) const throw (gpstk::StringUtils::StringException)
 Format this time into a string.
std::string printf (const std::string &fmt) const throw (gpstk::StringUtils::StringException)
 Format this time into a string. printf(const char*).
std::string asString () const throw (gpstk::StringUtils::StringException)
 Returns the string that operator<<() would print.
void dump (std::ostream &s) const throw (DayTimeException)
 Dump everything possible, using every get() TD: keep?

Static Public Member Functions

double setDayTimeTolerance (const double tol) throw ()
 Changes the DAYTIME_TOLERANCE for all DayTime objects.
double getDayTimeTolerance () throw ()
 Returns the current DAYTIME_TOLERANCE.
void convertJDtoCalendar (long jd, int &iyear, int &imonth, int &iday) throw ()
 Fundamental routine to convert from "Julian day" (= JD + 0.5) to calendar day.
long convertCalendarToJD (int iyear, int imonth, int iday) throw ()
 Fundamental routine to convert from calendar day to "Julian day" (= JD + 0.5).
void convertSODtoTime (double sod, int &hh, int &mm, double &sec) throw ()
 Fundamental routine to convert seconds of day to H:M:S.
double convertTimeToSOD (int hh, int mm, double sec) throw ()
 Fundamental routine to convert H:M:S to seconds of day.

Static Public Attributes

DayTime-Specific Definitions
All of these tolerances are 1/2 of the tolerance they specify.

So one nsec tolerance is actually 1/2 an ns added to the time in units of days.

const long FACTOR = 1000
 time-of-day is stored as long (seconds-of-day)*FACTOR plus double (remaining seconds)/FACTOR
const double JD_TO_MJD = 2400000.5
 Conversion offset, Julian Date to Modified Julian Date.
const long MJD_JDAY = 2400001L
 'Julian day' offset from MJD
const long GPS_EPOCH_JDAY = 2444245L
 'Julian day' of GPS epoch (Jan. 1, 1980).
const long GPS_EPOCH_MJD = 44244L
 Modified Julian Date of GPS epoch (Jan. 1, 1980).
const long UNIX_MJD = 40587L
 Modified Julian Date of UNIX epoch (Jan. 1, 1970).
const long HALFWEEK = 302400
 Seconds per half a GPS week.
const long FULLWEEK = 604800
 Seconds per whole GPS week.
const long SEC_DAY = 86400
 Seconds per day.
const long MS_PER_DAY = SEC_DAY*1000
 Milliseconds in a day.
const double ONE_NSEC_TOLERANCE = 1e-9
 One nanosecond tolerance.
const double ONE_USEC_TOLERANCE = 1e-6
 One microsecond tolerance.
const double ONE_MSEC_TOLERANCE = 1e-3
 One millisecond tolerance.
const double ONE_SEC_TOLERANCE = 1
 One second tolerance.
const double ONE_MIN_TOLERANCE = 60
 One minute tolerance.
const double ONE_HOUR_TOLERANCE = 3600
 One hour tolerance.
double DAYTIME_TOLERANCE = ONE_NSEC_TOLERANCE
 Default tolerance for time equality in days.
const long BEGIN_LIMIT_JDAY = 0
 'julian day' of earliest epoch expressible by DayTime: 1/1/4713 B.C.
const long END_LIMIT_JDAY = 3442448
 'julian day' of latest epoch expressible by DayTime: 1/1/4713 A.D.
const DayTime BEGINNING_OF_TIME
 earliest representable DayTime
const DayTime END_OF_TIME
 latest representable DayTime
bool DAYTIME_TEST_VALID = true
 If true, check the validity of inputs.


Member Enumeration Documentation

enum TimeFrame
 

The various time frames.

Enumeration values:
Unknown  unknown time frame
UTC  Coordinated Universal Time (e.g., from NTP).
LocalSystem  time from a local system clock
GPS_Tx  GPS transmit Time (paper clock) (e.g., 15 smooth).
GPS_Rx  GPS receive time (paper clock).
GPS_SV  SV time frame (e.g., 211 1.5s/6packs).
GPS_Receiver  Receiver time (e.g., 30s, raw 1.5s).

Definition at line 179 of file DayTime.hpp.


Constructor & Destructor Documentation

DayTime  )  throw (DayTimeException)
 

Default constructor.

Initializes to current system time.

Definition at line 166 of file DayTime.cpp.

References DayTime::setSystemTime().

DayTime short  GPSWeek,
double  GPSSecond,
TimeFrame  f = Unknown
throw (DayTimeException)
 

GPS time with full week constructor.

Parameters:
GPSWeek full week number
GPSSecond seconds of week.
f Time frame (see TimeFrame)

Definition at line 177 of file DayTime.cpp.

DayTime short  GPSWeek,
double  GPSSecond,
short  year,
TimeFrame  f = Unknown
throw (DayTimeException)
 

GPS time constructor.

In the case of 10-bit week input, the year and week are used to deduce the number of GPS week rollovers and thus the full GPS week.

Parameters:
GPSWeek week number.
GPSSecond Seconds of week.
year Four-digit year consistent with GPS input.
f Time frame (see TimeFrame)

Definition at line 191 of file DayTime.cpp.

DayTime short  GPSWeek,
long  zcount,
short  year,
TimeFrame  f = Unknown
throw (DayTimeException)
 

GPS time constructor.

In the case of 10-bit week input, the year and week are used to deduce the number of GPS week rollovers and thus the full GPS week.

Parameters:
GPSWeek GPS week number.
zcount Z-count (seconds of week / 1.5)
year Four-digit year consistent with GPS input.
f Time frame (see TimeFrame)

Definition at line 206 of file DayTime.cpp.

DayTime unsigned long  fullZcount,
TimeFrame  f = Unknown
throw (DayTimeException)
 

GPS time constructor given the full Z count.

The number of GPS week rollovers, and therefore the full GPS week, is determined from the current system time.

Parameters:
fullZcount Full z-count (3 MSB unused, mid 10 bits - week number, 19 LSB "normal" z-count).
f Time frame (see TimeFrame)

Definition at line 220 of file DayTime.cpp.

DayTime const GPSZcount z,
TimeFrame  f = Unknown
throw (DayTimeException)
 

GPS Zcount constructor.

The number of GPS week rollovers, and therefore the full GPS week, is determined from the current system time.

Parameters:
z GPSZcount object to set to
f Time frame (see TimeFrame)

Definition at line 231 of file DayTime.cpp.

DayTime const CommonTime c,
TimeFrame  f = Unknown
throw (DayTimeException)
 

CommonTime constructor.

Parameters:
c CommonTime object to set to
f Time frame (see TimeFrame)

Definition at line 242 of file DayTime.cpp.

DayTime short  year,
short  month,
short  day,
short  hour,
short  minute,
double  second,
TimeFrame  f = Unknown
throw (DayTimeException)
 

Calendar time constructor.

Parameters:
year four-digit year.
month month of year (1-based).
day day of month (1-based).
hour hour of day.
minute minutes of hour.
second seconds of minute.
f Time frame (see TimeFrame)

Definition at line 258 of file DayTime.cpp.

References gpstk::min().

DayTime long double  MJD,
TimeFrame  f = Unknown
throw (DayTimeException)
 

Modified Julian date time constructor.

For some compilers, this result may have diminished accuracy.

Parameters:
MJD Modified Julian date as long double.
f Time frame (see TimeFrame)

Definition at line 274 of file DayTime.cpp.

DayTime double  MJD,
TimeFrame  f = Unknown
throw (DayTimeException)
 

Modified Julian date time constructor.

For some compilers, this result may have diminished accuracy.

Parameters:
MJD Modified Julian date as double.
f Time frame (see TimeFrame)

Definition at line 285 of file DayTime.cpp.

DayTime short  year,
short  doy,
double  sod,
TimeFrame  f = Unknown
throw (DayTimeException)
 

Day of year time constructor.

Parameters:
year Four-digit year.
DOY Day of year.
SOD Seconds of day.
f Time frame (see TimeFrame)

Definition at line 298 of file DayTime.cpp.

DayTime const struct timeval &  t,
TimeFrame  f = Unknown
throw (DayTimeException)
 

UNIX time constructor.

Parameters:
t timeval structure (typically from gettimeofday()).
f Time frame (see TimeFrame)

Definition at line 311 of file DayTime.cpp.

~DayTime  )  throw () [inline]
 

Destructor.

Definition at line 428 of file DayTime.hpp.

DayTime const DayTime right  )  throw (DayTimeException)
 

Copy constructor.

Definition at line 323 of file DayTime.cpp.


Member Function Documentation

DayTime & addMicroSeconds long  usec  )  throw (DayTimeException)
 

Add (integer) microseconds to this time.

Parameters:
usec Number of microseconds to increase this time by.
Exceptions:
DayTimeException on over/under-flow

Definition at line 427 of file DayTime.cpp.

DayTime & addMilliSeconds long  msec  )  throw (DayTimeException)
 

Add (integer) milliseconds to this time.

Parameters:
msec Number of milliseconds to increase this time by.
Exceptions:
DayTimeException on over/under-flow

Definition at line 414 of file DayTime.cpp.

DayTime & addSeconds long  seconds  )  throw (DayTimeException)
 

Add (integer) seconds to this time.

Parameters:
seconds Number of seconds to increase this time by.
Exceptions:
DayTimeException on over/under-flow

Definition at line 401 of file DayTime.cpp.

DayTime & addSeconds double  seconds  )  throw (DayTimeException)
 

Add (double) seconds to this time.

Parameters:
seconds Number of seconds to increase this time by.
Exceptions:
DayTimeException on over/under-flow

Definition at line 392 of file DayTime.cpp.

Referenced by DayTime::operator+(), DayTime::operator-(), and testmeth().

std::string asString  )  const throw (gpstk::StringUtils::StringException)
 

Returns the string that operator<<() would print.

Definition at line 1611 of file DayTime.cpp.

Referenced by SP3Data::dump(), and Rinex3ClockHeader::ParseHeaderRecord().

long convertCalendarToJD int  iyear,
int  imonth,
int  iday
throw () [static]
 

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

Parameters:
iyear reference to integer year
imonth reference to integer month (January == 1)
iday reference to integer day of month (1st day of month == 1)
Returns:
jd long integer "Julian day" = JD+0.5
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 1729 of file DayTime.cpp.

Referenced by DayTime::DOY().

void convertJDtoCalendar long  jd,
int &  iyear,
int &  imonth,
int &  iday
throw () [static]
 

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

Parameters:
jd long integer "Julian day" = JD+0.5
iyear reference to integer year
imonth reference to integer month (January == 1)
iday reference 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 1680 of file DayTime.cpp.

Referenced by DayTime::day(), DayTime::DOY(), DayTime::month(), and DayTime::year().

void convertSODtoTime double  sod,
int &  hh,
int &  mm,
double &  sec
throw () [static]
 

Fundamental routine to convert seconds of day to H:M:S.

Parameters:
sod seconds of day (input)
hh reference to integer hour (0 <= hh < 24) (output)
mm reference to integer minutes (0 <= mm < 60) (output)
sec reference to double seconds (0 <= sec < 60.0) (output)

Definition at line 1775 of file DayTime.cpp.

Referenced by DayTime::hour(), DayTime::minute(), and DayTime::second().

double convertTimeToSOD int  hh,
int  mm,
double  sec
throw () [static]
 

Fundamental routine to convert H:M:S to seconds of day.

Parameters:
hh integer hour (0 <= hh < 24) (input)
mm integer minutes (0 <= mm < 60) (input)
sec double seconds (0 <= sec < 60.0) (input)
Returns:
sod seconds of day (input)

Definition at line 1801 of file DayTime.cpp.

short day  )  const throw ()
 

Get day of month.

Definition at line 532 of file DayTime.cpp.

References DayTime::convertJDtoCalendar().

Referenced by DayTime::setToString(), and testRandomAccessors().

short dayOfWeek  )  const throw ()
 

Get day of week.

Definition at line 541 of file DayTime.cpp.

Referenced by EOPPrediction::getSerialNumber().

short DOY  )  const throw ()
 

Get day of year.

Definition at line 613 of file DayTime.cpp.

References DayTime::convertCalendarToJD(), and DayTime::convertJDtoCalendar().

Referenced by RTFileFrame::getRecord(), NeillTropModel::setAllParameters(), MOPSTropModel::setAllParameters(), NeillTropModel::setDayOfYear(), MOPSTropModel::setDayOfYear(), DayTime::setToString(), and testRandomAccessors().

short DOYday  )  const throw () [inline]
 

Get day of year.

Definition at line 654 of file DayTime.hpp.

Referenced by FICData::generateUniqueKey(), and ObsRngDev::ObsRngDev().

double DOYsecond  )  const throw () [inline]
 

Get seconds of day.

Definition at line 663 of file DayTime.hpp.

Referenced by DayTime::setToString(), and testRandomAccessors().

short DOYyear  )  const throw () [inline]
 

Get year.

Definition at line 649 of file DayTime.hpp.

Referenced by FICData::generateUniqueKey().

void dump std::ostream &  s  )  const throw (DayTimeException)
 

Dump everything possible, using every get() TD: keep?

Definition at line 1620 of file DayTime.cpp.

Referenced by GPSEphemerisStore::dump(), GalEphemerisStore::dump(), gpstk::operator<<(), and MinSfTest::process().

unsigned long fullZcount  )  const throw ()
 

Get time as 32 bit Z count.

The 13 MSBs are week modulo 1024, 19 LSBs are seconds of week in Zcounts.

Definition at line 654 of file DayTime.cpp.

References DayTime::GPS10bitweek(), and DayTime::GPSzcount().

unsigned long fullZcountFloor  )  const throw ()
 

Same as fullZcount() but without rounding to nearest zcount.

Definition at line 661 of file DayTime.cpp.

References DayTime::GPS10bitweek(), and DayTime::GPSzcountFloor().

double getDayTimeTolerance  )  throw () [inline, static]
 

Returns the current DAYTIME_TOLERANCE.

Definition at line 263 of file DayTime.hpp.

long double getMJDasLongDouble  )  const throw ()
 

Get object time as a (long double) modified Julian date.

For some compilers, this result may have diminished accuracy.

Definition at line 622 of file DayTime.cpp.

References DayTime::SEC_DAY, and DayTime::secOfDay().

TimeFrame getTimeFrame  )  const throw () [inline]
 

Get the time frame for this time.

Definition at line 557 of file DayTime.hpp.

References gpstk::convertJDtoCalendar().

double getTolerance  )  throw () [inline]
 

Return the tolerance value currently in use by this object.

Returns:
the current tolerance value (in seconds, of course)

Definition at line 280 of file DayTime.hpp.

void getYMD int &  yy,
int &  mm,
int &  dd
const throw () [inline]
 

Get year, month and day of month.

Definition at line 592 of file DayTime.hpp.

short GPS10bitweek  )  const throw ()
 

Get 10-bit GPS week.

Definition at line 578 of file DayTime.cpp.

References DayTime::GPSfullweek().

Referenced by DayTime::fullZcount(), and DayTime::fullZcountFloor().

short GPSday  )  const throw () [inline]
 

Get day of week.

Definition at line 635 of file DayTime.hpp.

Referenced by FICData::generateUniqueKey(), and DayTime::GPSsow().

short GPSfullweek  )  const throw ()
 

Get full (>10 bits) week.

Definition at line 606 of file DayTime.cpp.

References DayTime::GPS_EPOCH_JDAY.

Referenced by MDPSelftestStatus::encode(), MDPPVTSolution::encode(), MDPHeader::encode(), FICData9::FICData9(), FICData::generateUniqueKey(), EOPPrediction::getSerialNumber(), DayTime::GPS10bitweek(), gpstk::makeEngAlmanac(), gpstk::makeEngEphemeris(), gpstk::makeMDPObsEpoch(), DayTime::operator GPSZcount(), NovatelData::operator RinexNavData(), NovatelData::operator RinexObsData(), MinSfTest::process(), DayTime::setGPS(), and testRandomAccessors().