![]() |
Isis 3 Programmer Reference
|
Parse and return pieces of a time string. More...
#include <iTime.h>
Public Member Functions | |
iTime () | |
Constructs an empty iTime object. More... | |
iTime (const QString &time) | |
Constructs a iTime object and initializes it to the time from the argument. More... | |
iTime (const double time) | |
Constructs a iTime object and initializes it to the time from the argument. More... | |
void | operator= (const QString &time) |
Changes the value of the iTime object. More... | |
void | operator= (const char *time) |
void | operator= (const double time) |
bool | operator>= (const iTime &time) |
Compare two iTime objects for greater than or equal. More... | |
bool | operator<= (const iTime &time) |
Compare two iTime objects for less than or equal. More... | |
bool | operator> (const iTime &time) |
Compare two iTime objects for greater than. More... | |
bool | operator< (const iTime &time) |
Compare two iTime objects for less than. More... | |
bool | operator!= (const iTime &time) |
Compare two iTime objects for inequality. More... | |
bool | operator== (const iTime &time) |
Compare two iTime objects for equality. More... | |
iTime | operator+ (const double &secondsToAdd) const |
void | operator+= (const double &secondsToAdd) |
iTime | operator- (const double &secondsToSubtract) const |
double | operator- (const iTime &iTimeToSubtract) const |
void | operator-= (const double &secondsToSubtract) |
QString | YearString () const |
Returns the year portion of the time as a string. More... | |
int | Year () const |
Returns the year portion of the time as an int. More... | |
QString | MonthString () const |
Returns the month portion of the time as a string. More... | |
int | Month () const |
Returns the month portion of the time as an int. More... | |
QString | DayString () const |
Returns the dat portion of the time as a string. More... | |
int | Day () const |
Returns the day portion of the time as an int. More... | |
QString | HourString () const |
Returns the hour portion of the time as a string. More... | |
int | Hour () const |
Returns the hour portion of the time as an int. More... | |
QString | MinuteString () const |
Returns the minute portion of the time as a string. More... | |
int | Minute () const |
Returns the minute portion of the time as an int. More... | |
QString | SecondString (int precision=8) const |
Returns the second portion of the time as a string. More... | |
double | Second () const |
Returns the second portion of the time as a double. More... | |
QString | DayOfYearString () const |
Returns the day of year portion of the time as a string. More... | |
int | DayOfYear () const |
Returns the day of year portion of the time as an int. More... | |
QString | EtString () const |
Returns the ephemeris time (TDB) representation of the time as a string. More... | |
double | Et () const |
Returns the ephemeris time (TDB) representation of the time as a double. More... | |
QString | UTC (int precision=8) const |
Returns the internally stored time, formatted as a UTC time. More... | |
void | setEt (double et) |
void | setUtc (QString utcString) |
Static Public Member Functions | |
static QString | CurrentGMT () |
Returns the current Greenwich Mean iTime The time is based on the system time, so it is only as accurate as the local system clock. More... | |
static QString | CurrentLocalTime () |
Returns the current local time This time is taken directly from the system clock, so if the system clock is off, this will be, too. More... | |
Private Member Functions | |
void | LoadLeapSecondKernel () |
Uses the Naif routines to load the most current leap second kernel. More... | |
Private Attributes | |
double | p_et |
The ephemeris representaion of the original string passed into the constructor or the operator= member. More... | |
Static Private Attributes | |
static bool | p_lpInitialized = false |
Friends | |
iTime | operator+ (const double &secondsToAdd, iTime time) |
iTime | operator- (const double &secondsToSubtract, iTime time) |
Parse and return pieces of a time string.
This class parses a date/time string into individual components. The input time string can be in a variety of formats (see the NAIF routine str2et_c). The components and different representation can then be returned using the member functions.
Isis::iTime::iTime | ( | const QString & | time | ) |
|
inline |
Constructs a iTime object and initializes it to the time from the argument.
time | An ephemeris time (ET). |
Definition at line 76 of file iTime.h.
References LoadLeapSecondKernel(), and p_et.
|
static |
|
static |
Returns the current local time This time is taken directly from the system clock, so if the system clock is off, this will be, too.
Definition at line 513 of file iTime.cpp.
Referenced by Isis::JigsawRunWidget::bundleFinished(), Isis::BundleAdjust::errorPropagation(), and Isis::BundleSolutionInfo::outputHeader().
int Isis::iTime::Day | ( | ) | const |
Returns the day portion of the time as an int.
Definition at line 277 of file iTime.cpp.
References Isis::IString::ToInteger().
int Isis::iTime::DayOfYear | ( | ) | const |
Returns the day of year portion of the time as an int.
Definition at line 380 of file iTime.cpp.
References Isis::IString::ToInteger().
QString Isis::iTime::DayOfYearString | ( | ) | const |
Returns the day of year portion of the time as a string.
Definition at line 371 of file iTime.cpp.
References Isis::toString().
QString Isis::iTime::DayString | ( | ) | const |
Returns the dat portion of the time as a string.
Definition at line 268 of file iTime.cpp.
References Isis::toString().
|
inline |
Returns the ephemeris time (TDB) representation of the time as a double.
Definition at line 126 of file iTime.h.
References p_et.
Referenced by Isis::Chandrayaan1M3Camera::Chandrayaan1M3Camera(), Isis::ClipperNacRollingShutterCamera::ClipperNacRollingShutterCamera(), Isis::ClipperPushBroomCamera::ClipperPushBroomCamera(), Isis::ClipperWacFcCamera::ClipperWacFcCamera(), Isis::RadarSlantRangeMap::ComputeA(), Isis::Spice::computeSolarLongitude(), Isis::Spice::createCache(), Isis::CrismCamera::CrismCamera(), Isis::CTXCamera::CTXCamera(), Isis::DawnFcCamera::DawnFcCamera(), Isis::HiresCamera::HiresCamera(), Isis::HiriseCamera::HiriseCamera(), Isis::VimsGroundMap::Init(), Isis::VimsSkyMap::Init(), Isis::IssNACamera::IssNACamera(), Isis::IssWACamera::IssWACamera(), Isis::JunoCamera::JunoCamera(), Isis::KaguyaMiCamera::KaguyaMiCamera(), Isis::KaguyaTcCamera::KaguyaTcCamera(), Isis::LoHighCamera::LoHighCamera(), Isis::LoMediumCamera::LoMediumCamera(), Isis::LroNarrowAngleCamera::LroNarrowAngleCamera(), Isis::LroWideAngleCamera::LroWideAngleCamera(), Isis::LwirCamera::LwirCamera(), Isis::MarciCamera::MarciCamera(), Isis::MexHrscSrcCamera::MexHrscSrcCamera(), Isis::MiniRF::MiniRF(), Isis::MocNarrowAngleCamera::MocNarrowAngleCamera(), Isis::MocWideAngleCamera::MocWideAngleCamera(), Isis::MsiCamera::MsiCamera(), Isis::NewHorizonsLeisaCamera::NewHorizonsLeisaCamera(), Isis::NewHorizonsLorriCamera::NewHorizonsLorriCamera(), Isis::NewHorizonsMvicFrameCamera::NewHorizonsMvicFrameCamera(), Isis::NewHorizonsMvicTdiCamera::NewHorizonsMvicTdiCamera(), Isis::NirCamera::NirCamera(), Isis::OsirisRexOcamsCamera::OsirisRexOcamsCamera(), Isis::DawnVirCamera::readHouseKeeping(), Isis::RosettaVirtisCamera::readHouseKeeping(), Isis::RosettaVirtisCamera::readSCET(), Isis::RosettaOsirisCamera::RosettaOsirisCamera(), Isis::NewHorizonsMvicFrameCamera::SetBand(), Isis::LineScanCameraDetectorMap::SetDetector(), Isis::RadarPulseMap::SetDetector(), Isis::VariableLineScanCameraDetectorMap::SetDetector(), Isis::RadarSlantRangeMap::SetFocalPlane(), Isis::CameraDetectorMap::SetParent(), Isis::RollingShutterCameraDetectorMap::SetParent(), Isis::Spice::setTime(), Isis::RadarSlantRangeMap::SetUndistortedFocalPlane(), Isis::VikingCamera::ShutterOpenCloseTimes(), Isis::VoyagerCamera::ShutterOpenCloseTimes(), Isis::SsiCamera::SsiCamera(), Isis::Camera::StartEndEphemerisTimes(), Isis::ThemisIrCamera::ThemisIrCamera(), Isis::ThemisVisCamera::ThemisVisCamera(), Isis::AdvancedTrackTool::updateRow(), Isis::UvvisCamera::UvvisCamera(), Isis::VikingCamera::VikingCamera(), Isis::VimsCamera::VimsCamera(), and Isis::VoyagerCamera::VoyagerCamera().
QString Isis::iTime::EtString | ( | ) | const |
Returns the ephemeris time (TDB) representation of the time as a string.
See the Naif documentation "time.req" for more information.
Definition at line 396 of file iTime.cpp.
References Isis::toString().
int Isis::iTime::Hour | ( | ) | const |
Returns the hour portion of the time as an int.
Definition at line 301 of file iTime.cpp.
References Isis::IString::ToInteger().
QString Isis::iTime::HourString | ( | ) | const |
Returns the hour portion of the time as a string.
Definition at line 292 of file iTime.cpp.
References Isis::toString().
|
private |
Uses the Naif routines to load the most current leap second kernel.
Definition at line 471 of file iTime.cpp.
References Isis::FileName::expanded(), Isis::PvlObject::findGroup(), and Isis::FileName::highestVersion().
Referenced by iTime().
int Isis::iTime::Minute | ( | ) | const |
Returns the minute portion of the time as an int.
Definition at line 325 of file iTime.cpp.
References Isis::IString::ToInteger().
QString Isis::iTime::MinuteString | ( | ) | const |
Returns the minute portion of the time as a string.
Definition at line 316 of file iTime.cpp.
References Isis::toString().
int Isis::iTime::Month | ( | ) | const |
Returns the month portion of the time as an int.
Definition at line 253 of file iTime.cpp.
References Isis::IString::ToInteger().
QString Isis::iTime::MonthString | ( | ) | const |
Returns the month portion of the time as a string.
Definition at line 244 of file iTime.cpp.
References Isis::toString().
bool Isis::iTime::operator!= | ( | const iTime & | time | ) |
bool Isis::iTime::operator< | ( | const iTime & | time | ) |
bool Isis::iTime::operator<= | ( | const iTime & | time | ) |
void Isis::iTime::operator= | ( | const QString & | time | ) |
bool Isis::iTime::operator== | ( | const iTime & | time | ) |
bool Isis::iTime::operator> | ( | const iTime & | time | ) |
bool Isis::iTime::operator>= | ( | const iTime & | time | ) |
double Isis::iTime::Second | ( | ) | const |
Returns the second portion of the time as a double.
Definition at line 356 of file iTime.cpp.
References Isis::IString::ToDouble().
QString Isis::iTime::SecondString | ( | int | precision = 8 | ) | const |
QString Isis::iTime::UTC | ( | int | precision = 8 | ) | const |
Returns the internally stored time, formatted as a UTC time.
Definition at line 405 of file iTime.cpp.
Referenced by Isis::AdvancedTrackTool::updateRow().
int Isis::iTime::Year | ( | ) | const |
Returns the year portion of the time as an int.
Definition at line 229 of file iTime.cpp.
References Isis::IString::ToInteger().
QString Isis::iTime::YearString | ( | ) | const |
Returns the year portion of the time as a string.
Definition at line 220 of file iTime.cpp.
References Isis::toString().
|
private |
The ephemeris representaion of the original string passed into the constructor or the operator= member.
Definition at line 138 of file iTime.h.
Referenced by Et(), iTime(), operator!=(), operator<(), operator<=(), operator==(), operator>(), and operator>=().
U.S. Department of the Interior | U.S. Geological Survey ISIS | Privacy & Disclaimers | Astrogeology Research Program To contact us, please post comments and questions on the USGS Astrogeology Discussion Board To report a bug, or suggest a feature go to: ISIS Github File Modified: 07/13/2023 15:24:18 |