Go to the documentation of this file.
48 ts.tv_sec = right.
ts.tv_sec ;
49 ts.tv_nsec = right.
ts.tv_nsec;
61 (
static_cast<double>(
ts.tv_nsec ) * 1e-9 ),
64 catch (InvalidParameter& ip)
66 InvalidRequest ir(ip);
80 if ( ct < MIN_CT || ct > MAX_CT )
82 InvalidRequest ir(
"Unable to convert given CommonTime to PosixTime.");
93 ts.tv_nsec =
static_cast<time_t
>( fsod * 1e9 + 0.5 ) ;
95 if (
ts.tv_nsec >= 1000000000)
97 ts.tv_nsec -= 1000000000;
107 std::string rv( fmt );
117 catch( gnsstk::StringUtils::StringException&
se )
128 std::string rv( fmt );
138 catch( gnsstk::StringUtils::StringException&
se )
148 for( IdToValue::const_iterator i = info.begin(); i != info.end(); i++ )
153 ts.tv_sec =
asInt( i->second );
157 ts.tv_nsec =
asInt( i->second );
186 ts.tv_sec =
ts.tv_nsec = 0;
199 if(
ts.tv_sec == right.
ts.tv_sec &&
209 return ( !
operator==( right ) );
220 gnsstk::InvalidRequest ir(
"CommonTime objects not in same time system,"
221 " cannot be compared");
225 if(
ts.tv_sec < right.
ts.tv_sec )
229 if(
ts.tv_sec == right.
ts.tv_sec &&
230 ts.tv_nsec < right.
ts.tv_nsec )
239 return ( !
operator<=( right ) );
244 return (
operator<( right ) ||
245 operator==( right ) );
250 return ( !
operator<( right ) );
long asInt(const std::string &s)
double se
obliquity cos, T*cos, sin coefficients
static const GNSSTK_EXPORT double eps
Default tolerance for time equality in days.
virtual std::string printError(const std::string &fmt) const
PosixTime(int sec=0, int nsec=0, TimeSystem tsys=TimeSystem::Unknown)
const long SEC_PER_DAY
Seconds per day.
virtual bool setFromInfo(const IdToValue &info)
virtual bool operator>(const PosixTime &right) const
virtual CommonTime convertToCommonTime() const
@ Any
wildcard; allows comparison with any other type
std::string asString(IonexStoreStrategy e)
Convert a IonexStoreStrategy to a whitespace-free string name.
const long MJD_JDAY
'Julian day' offset from MJD
@ Unknown
unknown time frame; for legacy code compatibility
const long UNIX_MJD
Modified Julian Date of UNIX epoch (Jan. 1, 1970).
TimeSystem asTimeSystem(const std::string &s)
Convert a string representation of TimeSystem to an enum.
virtual bool operator!=(const PosixTime &right) const
virtual std::string printf(const std::string &fmt) const
PosixTime & operator=(const PosixTime &right)
virtual bool operator==(const PosixTime &right) const
void get(long &day, long &sod, double &fsod, TimeSystem &timeSystem) const
virtual bool operator<=(const PosixTime &right) const
#define GNSSTK_RETHROW(exc)
virtual bool operator<(const PosixTime &right) const
virtual bool isValid() const
Returns true if this object's members are valid, false otherwise.
virtual void convertFromCommonTime(const CommonTime &ct)
#define GNSSTK_THROW(exc)
std::string formattedPrint(const std::string &fmt, const std::string &pat, const std::string &rep, T to)
virtual void reset()
Reset this object to the default state.
virtual bool operator>=(const PosixTime &right) const
CommonTime & set(long day, long sod, double fsod=0.0, TimeSystem timeSystem=TimeSystem::Unknown)
gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:40