|
🛰️航天仿真算法库 SpaceAST 0.0.1
|
提供儒略日、日期时间等时间表示,以及不同时间系统之间的转换功能
类 | |
| class | ast::Date |
| class | ast::DateTime |
| class | ast::ShortDuration |
| class | ast::LongDuration |
| class | ast::DaySecDuration |
| class | ast::JulianDate |
| class | ast::ModJulianDate |
| class | ast::Time |
| class | ast::TimeInterval |
| class | ast::TimeInterval::DiscreteTimePointRange |
| class | ast::TimeInterval::DiscreteEpochSecondRange |
| class | ast::TimePoint |
枚举 | |
| enum | ast::Date::EMonth { eJAN = 1 , eFEB , eMAR , eAPR , eMAY , eJUN , eJUL = 7 , eAUG , eSEP , eOCT , eNOV , eDEC } |
| enum | ast::Date::EWeekDay { eSUN = 0 , eMON , eTUE , eWED , eTHU , eFRI , eSAT } |
函数 | |
| const char * | ast::aMoonFullName (int month) |
| const char * | ast::aMoonShortName (int month) |
| const char * | ast::aWeekDayFullName (int wday) |
| const char * | ast::aWeekDayShortName (int wday) |
| bool | ast::aIsLeapYear (int year) |
| int | ast::aDaysInMonthByYear (int month, int year) |
| int | ast::aDaysInMonthByLeap (int month, bool isLeapYear) |
| int | ast::aDayOfYear (const Date &date) |
| int | ast::aDayOfWeek (const Date &date) |
| void | ast::aYDToDate (int year, int days, Date &date) |
| void | ast::aDateToYD (const Date &date, int &year, int &days) |
| void | ast::aDateNormalize (Date &date) |
| int | ast::aDateToJDAtNoon (const Date &date) |
| void | ast::aJDToDateAtNoon (int jd, Date &date) |
| ImpreciseJD | ast::aDateToJD (const Date &date) |
| void | ast::aJDToDate (ImpreciseJD jd, Date &date, double *secInDay=nullptr) |
| int | ast::aDateToMJD (const Date &date) |
| void | ast::aMJDToDate (int mjd, Date &date) |
| std::string | ast::aDateToString (const Date &date) |
| static Date | ast::Date::FromJDAtNoon (int jd) |
| static Date | ast::Date::FromYMD (int year, int month, int day) |
| static Date | ast::Date::FromYD (int year, int days) |
| int | ast::Date::year () const |
| int & | ast::Date::year () |
| int | ast::Date::month () const |
| int & | ast::Date::month () |
| int | ast::Date::day () const |
| int & | ast::Date::day () |
| void | ast::Date::setYear (int year) |
| void | ast::Date::setMonth (int month) |
| void | ast::Date::setDay (int day) |
| const char * | ast::Date::monthFullName () const |
| const char * | ast::Date::monthShortName () const |
| const char * | ast::Date::weekDayFullName () const |
| const char * | ast::Date::weekDayShortName () const |
| int | ast::Date::dayOfWeek () const |
| int | ast::Date::dayOfYear () const |
| bool | ast::Date::isLeapYear () const |
| int | ast::Date::dayInMonth () const |
| int | ast::Date::toJDAtNoon () const |
| double | ast::Date::toJD () const |
| double | ast::Date::toMJD () const |
| void | ast::Date::fromJDAtNoon (int jd) |
| void | ast::Date::fromYMD (int year, int month, int day) |
| void | ast::Date::fromYD (int year, int days) |
| void | ast::Date::toYD (int &year, int &days) const |
| void | ast::Date::normalize () |
| Date | ast::Date::normalized () const |
| std::string | ast::Date::toString () const |
| A_ALWAYS_INLINE Date | ast::aMJDToDate (int mjd) |
| A_ALWAYS_INLINE int | ast::aDateToMJD (int year, int month, int day) |
| void | ast::aCurrentDateTimeLocal (DateTime &dttm) |
| void | ast::aCurrentDateTimeUTC (DateTime &dttm) |
| void | ast::aTodayDateTimeUTC (DateTime &dttm) |
| void | ast::aTomorrowDateTimeUTC (DateTime &dttm) |
| void | ast::aDateTimeNormalize (DateTime &dttm) |
| void | ast::aDateTimeNormalizeUTC (DateTime &dttm) |
| void | ast::aDateTimeNormalizeLocal (DateTime &dttm, int timezone) |
| void | ast::aDateTimeNormalizeBJT (DateTime &dttm) |
| void | ast::aDateTimeAddYears (DateTime &dttm, int years) |
| void | ast::aDateTimeAddMonths (DateTime &dttm, int months) |
| void | ast::aDateTimeAddDays (DateTime &dttm, int days) |
| void | ast::aDateTimeAddDaysUTC (DateTime &dttm, int days) |
| void | ast::aDateTimeAddDaysLocal (DateTime &dttm, int days, int timezone) |
| void | ast::aDateTimeAddDaysBJT (DateTime &dttm, int days) |
| void | ast::aDateTimeAddHours (DateTime &dttm, int hours) |
| void | ast::aDateTimeAddHoursUTC (DateTime &dttm, int hours) |
| void | ast::aDateTimeAddHoursLocal (DateTime &dttm, int hours, int timezone) |
| void | ast::aDateTimeAddHoursBJT (DateTime &dttm, int hours) |
| void | ast::aDateTimeAddMinutes (DateTime &dttm, int minutes) |
| void | ast::aDateTimeAddMinutesUTC (DateTime &dttm, int minutes) |
| void | ast::aDateTimeAddMinutesLocal (DateTime &dttm, int minutes, int timezone) |
| void | ast::aDateTimeAddMinutesBJT (DateTime &dttm, int minutes) |
| void | ast::aDateTimeAddSeconds (DateTime &dttm, double seconds) |
| void | ast::aDateTimeAddSecondsUTC (DateTime &dttm, double seconds) |
| void | ast::aDateTimeAddSecondsLocal (DateTime &dttm, double seconds, int timezone) |
| void | ast::aDateTimeAddSecondsBJT (DateTime &dttm, double seconds) |
| AST_CORE_CAPI errc_t | ast::aDateTimeFormat (const DateTime &dttm, StringView format, std::string &str) |
| errc_t | ast::aDateTimeFormatGregorian (const DateTime &dttm, std::string &str, int precision=3) |
| errc_t | ast::aDateTimeFormatGregorianEn (const DateTime &dttm, std::string &str) |
| errc_t | ast::aDateTimeFormatGMT (const DateTime &dttm, std::string &str) |
| errc_t | ast::aDateTimeFormatISO8601 (const DateTime &dttm, std::string &str) |
| A_ALWAYS_INLINE errc_t | ast::aDateTimeFormatISO (const DateTime &dttm, std::string &str) |
| errc_t | ast::aDateTimeFormatRFC3339 (const DateTime &dttm, std::string &str) |
| A_ALWAYS_INLINE errc_t | ast::aDateTimeFormatDefault (const DateTime &dttm, std::string &str, int precision=kTimeDefaultFormatPrecision) |
| errc_t | ast::aDateTimeParseISO8601 (StringView str, DateTime &dttm) |
| A_ALWAYS_INLINE errc_t | ast::aDateTimeParseISO (StringView str, DateTime &dttm) |
| errc_t | ast::aDateTimeParseRFC3339 (StringView str, DateTime &dttm) |
| errc_t | ast::aDateTimeParseGregorian (StringView str, DateTime &dttm) |
| errc_t | ast::aDateTimeParseGregorianEn (StringView str, DateTime &dttm) |
| errc_t | ast::aDateTimeParseGMT (StringView str, DateTime &dttm) |
| AST_CORE_CAPI errc_t | ast::aDateTimeParse (StringView str, StringView format, DateTime &dttm) |
| errc_t | ast::aDateTimeParseAny (StringView str, DateTime &dttm) |
| A_ALWAYS_INLINE DateTime | ast::aCurrentDateTimeLocal () |
| A_ALWAYS_INLINE DateTime | ast::aCurrentDateTimeUTC () |
| void | ast::aJDToMJD (const JulianDate &jd, ModJulianDate &mjd) |
| void | ast::aMJDToJD (const ModJulianDate &mjd, JulianDate &jd) |
| double | ast::aJDToMJD_Imprecise (const JulianDate &jd) |
| ImpreciseMJD | ast::aJDToMJD_Imprecise (ImpreciseJD jd) |
| ImpreciseJD | ast::aMJDToJD_Imprecise (const ModJulianDate &mjd) |
| ImpreciseJD | ast::aMJDToJD_Imprecise (ImpreciseMJD mjd) |
| void | ast::aDateTimeToJD (const DateTime &dttm, JulianDate &jd) |
| void | ast::aJDToDateTime (const JulianDate &jd, DateTime &dttm) |
| void | ast::aTimeNormalize (Time &time) |
| void | ast::aTimeFromTotalSecond (double totalSecond, Time &time) |
| errc_t | ast::aTimeIntervalFormat (const TimeInterval &interval, std::string &strStart, std::string &strEnd) |
| errc_t | ast::aTimeIntervalParse (StringView strStart, StringView strEnd, TimeInterval &interval) |
| void | ast::aTimePointToUTC (const TimePoint &time, JulianDate &jdUTC) |
| void | ast::aTimePointToTT (const TimePoint &time, JulianDate &jdTT) |
| void | ast::aTimePointToTDB (const TimePoint &time, JulianDate &jdTDB) |
| void | ast::aTimePointToTAI (const TimePoint &time, JulianDate &jdTAI) |
| void | ast::aTimePointToUT1 (const TimePoint &time, JulianDate &jdUT1) |
| void | ast::aTimePointToUTC (const TimePoint &time, DateTime &dttmUTC) |
| AST_CORE_API void | ast::aTimePointToTT (const TimePoint &time, DateTime &dttmTT) |
| AST_CORE_API void | ast::aTimePointToTDB (const TimePoint &time, DateTime &dttmTDB) |
| AST_CORE_API void | ast::aTimePointToTAI (const TimePoint &time, DateTime &dttmTAI) |
| AST_CORE_API void | ast::aTimePointToUT1 (const TimePoint &time, DateTime &dttmUT1) |
| errc_t | ast::aTimePointFormat (const TimePoint &time, std::string &str, int precision=kTimePointDefaultFormatPrecision) |
| errc_t | ast::aTimePointParse (StringView str, TimePoint &time) |
| template<typename Time > | |
| A_ALWAYS_INLINE void | ast::aTAIToTT (const Time &tmTAI, Time &tmTT) |
| template<typename Time > | |
| A_ALWAYS_INLINE Time | ast::aTAIToTT (const Time &tmTAI) |
| template<typename Time > | |
| A_ALWAYS_INLINE void | ast::aTTToTAI (const Time &tmTT, Time &tmTAI) |
| template<typename Time > | |
| A_ALWAYS_INLINE Time | ast::aTTToTAI (const Time &tmTT) |
| template<typename Time > | |
| A_ALWAYS_INLINE void | ast::aTAIToGPS (const Time &tmTAI, Time &tmGPS) |
| template<typename Time > | |
| A_ALWAYS_INLINE Time | ast::aTAIToGPS (const Time &tmTAI) |
| template<typename Time > | |
| A_ALWAYS_INLINE void | ast::aGPSToTAI (const Time &tmGPS, Time &tmTAI) |
| template<typename Time > | |
| A_ALWAYS_INLINE Time | ast::aGPSToTAI (const Time &tmGPS) |
| void | ast::aTAIToUTC (const JulianDate &jdTAI, JulianDate &jdUTC) |
| void | ast::aTAIToUTC (const DateTime &dttmTAI, DateTime &dttmUTC) |
| A_ALWAYS_INLINE JulianDate | ast::aTAIToUTC (const JulianDate &jdTAI) |
| A_ALWAYS_INLINE DateTime | ast::aTAIToUTC (const DateTime &dttmTAI) |
| void | ast::aUTCToTAI (const JulianDate &jdUTC, JulianDate &jdTAI) |
| void | ast::aUTCToTAI (const DateTime &dttmUTC, DateTime &dttmTAI) |
| A_ALWAYS_INLINE JulianDate | ast::aUTCToTAI (const JulianDate &jdUTC) |
| A_ALWAYS_INLINE DateTime | ast::aUTCToTAI (const DateTime &dttmUTC) |
| void | ast::aUTCToTT (const JulianDate &jdUTC, JulianDate &jdTT) |
| void | ast::aUTCToTT (const DateTime &dttmUTC, DateTime &dttmTT) |
| A_ALWAYS_INLINE JulianDate | ast::aUTCToTT (const JulianDate &jdUTC) |
| A_ALWAYS_INLINE DateTime | ast::aUTCToTT (const DateTime &dttmUTC) |
| void | ast::aUTCToUT1 (const JulianDate &jdUTC, JulianDate &jdUT1) |
| AST_CORE_API void | ast::aUTCToUT1 (const DateTime &dttmUTC, DateTime &dttmUT1) |
| void | ast::aTTToUTC (const JulianDate &jdTT, JulianDate &jdUTC) |
| void | ast::aTTToUTC (const DateTime &dttmTT, DateTime &dttmUTC) |
| A_ALWAYS_INLINE JulianDate | ast::aTTToUTC (const JulianDate &jdTT) |
| A_ALWAYS_INLINE DateTime | ast::aTTToUTC (const DateTime &dttmTT) |
| void | ast::aTTToTDB (const JulianDate &jdTT, JulianDate &jdTDB) |
| void | ast::aTTToTDB (const DateTime &dttmTT, DateTime &dttmTDB) |
| A_ALWAYS_INLINE JulianDate | ast::aTTToTDB (const JulianDate &jdTT) |
| A_ALWAYS_INLINE DateTime | ast::aTTToTDB (const DateTime &dttmTT) |
| void | ast::aTDBToTT (const JulianDate &jdTDB, JulianDate &jdTT) |
| void | ast::aTDBToTT (const DateTime &dttmTDB, DateTime &dttmTT) |
| A_ALWAYS_INLINE JulianDate | ast::aTDBToTT (const JulianDate &jdTDB) |
| A_ALWAYS_INLINE DateTime | ast::aTDBToTT (const DateTime &dttmTDB) |
| double | ast::aTDBMinusTT (const JulianDate &jdTT) |
| double | ast::aTTMinusTDB (const JulianDate &jdTDB) |
| double | ast::aJulianCenturyFromJ2000 (const JulianDate &jd) |
| TimePoint | ast::aSpiceEtToTimePoint (double et) |
| double | ast::aTimePointToSpiceEt (const TimePoint &tp) |
| DiscreteTimePointRange | ast::TimeInterval::discrete (double step) const |
| DiscreteEpochSecondRange | ast::TimeInterval::discrete (const TimePoint &epoch, double step) const |
变量 | |
| int | ast::Date::year_ |
| int | ast::Date::month_ |
| int | ast::Date::day_ |
| constexpr double | ast::kTimeDefaultFormatPrecision = 3 |
| AST_CORE_CAPI void ast::aDateTimeAddDays | ( | DateTime & | dttm, |
| int | days ) |
增加日
将日期时间对象增加指定的天数,并规范化日期时间对象,不考虑闰秒
| dttm | |
| days |
| AST_CORE_CAPI void ast::aDateTimeAddDaysBJT | ( | DateTime & | dttm, |
| int | days ) |
增加日(北京时间)
将日期时间对象增加指定的天数(days*86400s)(北京时间),并规范化日期时间对象,考虑闰秒
| dttm | |
| days | 增加的天数,可正可负 |
| AST_CORE_CAPI void ast::aDateTimeAddDaysLocal | ( | DateTime & | dttm, |
| int | days, | ||
| int | timezone ) |
增加日(本地时间)
将日期时间对象增加指定的天数(days*86400s)(本地时间),并规范化日期时间对象,考虑时区和闰秒
| dttm | |
| days | 增加的天数,可正可负 |
| timezone | 时区偏移,单位:小时 |
| AST_CORE_CAPI void ast::aDateTimeAddDaysUTC | ( | DateTime & | dttm, |
| int | days ) |
增加日(UTC时间)
将日期时间对象增加指定的天数(days*86400s)(UTC时间),并规范化日期时间对象,考虑闰秒
| dttm | |
| days | 增加的天数,可正可负 |
| AST_CORE_CAPI void ast::aDateTimeAddHours | ( | DateTime & | dttm, |
| int | hours ) |
增加时
将日期时间对象增加指定的小时数(hours*3600s),并规范化日期时间对象,不考虑闰秒
| dttm | |
| hours | 增加的小时数,可正可负 |
| AST_CORE_CAPI void ast::aDateTimeAddHoursBJT | ( | DateTime & | dttm, |
| int | hours ) |
增加时(北京时间)
将日期时间对象增加指定的小时数(hours*3600s)(北京时间),并规范化日期时间对象,考虑闰秒
| dttm | |
| hours | 增加的小时数,可正可负 |
| AST_CORE_CAPI void ast::aDateTimeAddHoursLocal | ( | DateTime & | dttm, |
| int | hours, | ||
| int | timezone ) |
增加时(本地时间)
将日期时间对象增加指定的小时数(hours*3600s)(本地时间),并规范化日期时间对象,考虑时区和闰秒
| dttm | |
| hours | 增加的小时数,可正可负 |
| timezone | 时区偏移,单位:小时 |
| AST_CORE_CAPI void ast::aDateTimeAddHoursUTC | ( | DateTime & | dttm, |
| int | hours ) |
增加时(UTC时间)
将日期时间对象增加指定的小时数(hours*3600s)(UTC时间),并规范化日期时间对象,考虑闰秒
| dttm | |
| hours | 增加的小时数,可正可负 |
| AST_CORE_CAPI void ast::aDateTimeAddMinutes | ( | DateTime & | dttm, |
| int | minutes ) |
增加分
将日期时间对象增加指定的分钟数(minutes*60s),并规范化日期时间对象,不考虑闰秒
| dttm | |
| minutes | 增加的分钟数,可正可负 |
| AST_CORE_CAPI void ast::aDateTimeAddMinutesBJT | ( | DateTime & | dttm, |
| int | minutes ) |
增加分(北京时间)
将日期时间对象增加指定的分钟数(minutes*60s)(北京时间),并规范化日期时间对象,考虑闰秒
| dttm | |
| minutes | 增加的分钟数,可正可负 |
| AST_CORE_CAPI void ast::aDateTimeAddMinutesLocal | ( | DateTime & | dttm, |
| int | minutes, | ||
| int | timezone ) |
增加分(本地时间)
将日期时间对象增加指定的分钟数(minutes*60s)(本地时间),并规范化日期时间对象,考虑时区和闰秒
| dttm | |
| minutes | 增加的分钟数,可正可负 |
| timezone | 时区偏移,单位:小时 |
| AST_CORE_CAPI void ast::aDateTimeAddMinutesUTC | ( | DateTime & | dttm, |
| int | minutes ) |
增加分(UTC时间)
将日期时间对象增加指定的分钟数(UTC时间),并规范化日期时间对象,考虑闰秒
| dttm | |
| minutes | 增加的分钟数,可正可负 |
| AST_CORE_CAPI void ast::aDateTimeAddMonths | ( | DateTime & | dttm, |
| int | months ) |
增加月
将日期时间对象增加指定的月数,并规范化日期时间对象
| dttm | |
| months |
| AST_CORE_CAPI void ast::aDateTimeAddSeconds | ( | DateTime & | dttm, |
| double | seconds ) |
增加秒
将日期时间对象增加指定的秒数,并规范化日期时间对象,不考虑闰秒
| dttm | |
| seconds |
| AST_CORE_CAPI void ast::aDateTimeAddSecondsBJT | ( | DateTime & | dttm, |
| double | seconds ) |
增加秒(北京时间)
将日期时间对象增加指定的秒数(北京时间),并规范化日期时间对象,考虑闰秒
| dttm | |
| seconds |
| AST_CORE_CAPI void ast::aDateTimeAddSecondsLocal | ( | DateTime & | dttm, |
| double | seconds, | ||
| int | timezone ) |
增加秒(本地时间)
将日期时间对象增加指定的秒数(本地时间),并规范化日期时间对象,考虑时区和闰秒
| dttm | |
| seconds | |
| timezone | 时区偏移,单位:小时 |
| AST_CORE_CAPI void ast::aDateTimeAddSecondsUTC | ( | DateTime & | dttm, |
| double | seconds ) |
增加秒(UTC时间)
将日期时间对象增加指定的秒数(UTC时间),并规范化日期时间对象,考虑闰秒
| dttm | |
| seconds |
| AST_CORE_CAPI void ast::aDateTimeAddYears | ( | DateTime & | dttm, |
| int | years ) |
增加年
将日期时间对象增加指定的年数,并规范化日期时间对象
| dttm | |
| years |
| errc_t ast::aDateTimeFormat | ( | const DateTime & | dttm, |
| StringView | format, | ||
| std::string & | str ) |
格式化日期时间为字符串
将日期时间对象格式化为指定格式的字符串
| dttm | |
| format | 格式化字符串,例如:"%Y-%m-%d %H:%M:%S" |
| str |
| A_ALWAYS_INLINE errc_t ast::aDateTimeFormatDefault | ( | const DateTime & | dttm, |
| std::string & | str, | ||
| int | precision = kTimeDefaultFormatPrecision ) |
格式化日期时间为默认格式
将日期时间对象格式化为默认格式的字符串,例如:2025-11-21 12:34:56.123
| dttm | |
| str |
| AST_CORE_CAPI errc_t ast::aDateTimeFormatGMT | ( | const DateTime & | dttm, |
| std::string & | str ) |
格式化日期时间为GMT格式
将日期时间对象格式化为GMT格式的字符串,例如:Sat, 21 Nov 2025 12:34:56 GMT
| dttm | |
| str |
| AST_CORE_CAPI errc_t ast::aDateTimeFormatGregorian | ( | const DateTime & | dttm, |
| std::string & | str, | ||
| int | precision = 3 ) |
格式化日期时间为格里高利历格式
将日期时间对象格式化为格里高利历格式的字符串,例如:2025-11-21 12:34:56
| dttm | |
| str |
| AST_CORE_CAPI errc_t ast::aDateTimeFormatGregorianEn | ( | const DateTime & | dttm, |
| std::string & | str ) |
格式化日期时间为格里高利历格式(英文)
将日期时间对象格式化为格里高利历格式的字符串(英文),例如:1 Jan 1970 00:00:00
| dttm | |
| str |
| A_ALWAYS_INLINE errc_t ast::aDateTimeFormatISO | ( | const DateTime & | dttm, |
| std::string & | str ) |
格式化日期时间为简单ISO 8601格式
将日期时间对象格式化为ISO 8601格式的字符串,例如:2025-11-21T12:34:56Z
| AST_CORE_CAPI errc_t ast::aDateTimeFormatISO8601 | ( | const DateTime & | dttm, |
| std::string & | str ) |
格式化日期时间为ISO 8601格式
将日期时间对象格式化为ISO 8601格式的字符串,例如:2025-11-21T12:34:56Z
| dttm | |
| str |
| AST_CORE_CAPI errc_t ast::aDateTimeFormatRFC3339 | ( | const DateTime & | dttm, |
| std::string & | str ) |
格式化日期时间为RFC 3339格式
将日期时间对象格式化为RFC 3339格式的字符串,例如:2025-11-21T12:34:56+08:00
| dttm | |
| str |
| AST_CORE_CAPI void ast::aDateTimeNormalize | ( | DateTime & | dttm | ) |
规范化日期时间对象
将时间调整到0-23时59分59秒之间,并调整日期到正确的范围内,不考虑闰秒
| dttm |
| AST_CORE_CAPI void ast::aDateTimeNormalizeBJT | ( | DateTime & | dttm | ) |
规范化日期时间对象(按北京时间规范化)
将日期时间对象调整到0-23时59分60秒,考虑闰秒
| dttm | 北京时间 |
| AST_CORE_CAPI void ast::aDateTimeNormalizeLocal | ( | DateTime & | dttm, |
| int | timezone ) |
规范化日期时间对象(按本地时间规范化)
将日期时间对象调整到0-23时59分60秒,考虑时区和闰秒
| dttm | 本地时间 |
| timezone | 时区偏移,单位:小时 |
| AST_CORE_CAPI void ast::aDateTimeNormalizeUTC | ( | DateTime & | dttm | ) |
规范化日期时间对象(按UTC时间规范化)
将日期时间对象调整到0-23时59分60秒,考虑闰秒
| dttm |
| errc_t ast::aDateTimeParse | ( | StringView | str, |
| StringView | format, | ||
| DateTime & | dttm ) |
解析自定义格式的日期时间字符串
将自定义格式的字符串解析为日期时间对象
| str | 包含自定义格式日期时间的字符串 |
| format | 日期时间格式,参考strptime函数的格式规范 |
| dttm | 输出参数,解析后的日期时间对象 |
| AST_CORE_CAPI errc_t ast::aDateTimeParseAny | ( | StringView | str, |
| DateTime & | dttm ) |
解析任意格式的日期时间字符串
尝试解析多种日期时间格式,包括ISO 8601、RFC 3339、格里高利历等
| str | 包含日期时间的字符串 |
| dttm | 输出参数,解析后的日期时间对象 |
| AST_CORE_CAPI errc_t ast::aDateTimeParseGMT | ( | StringView | str, |
| DateTime & | dttm ) |
解析GMT格式的日期时间字符串
将GMT格式的字符串解析为日期时间对象
| str | 包含GMT格式日期时间的字符串 |
| dttm | 输出参数,解析后的日期时间对象 |
| AST_CORE_CAPI errc_t ast::aDateTimeParseGregorian | ( | StringView | str, |
| DateTime & | dttm ) |
解析格里高利历格式的日期时间字符串
将格里高利历格式的字符串解析为日期时间对象
| str | 包含格里高利历格式日期时间的字符串 |
| dttm | 输出参数,解析后的日期时间对象 |
| AST_CORE_CAPI errc_t ast::aDateTimeParseGregorianEn | ( | StringView | str, |
| DateTime & | dttm ) |
解析格里高利历格式(英文)的日期时间字符串
将格里高利历格式(英文)的字符串解析为日期时间对象
| str | 包含格里高利历格式(英文)日期时间的字符串 |
| dttm | 输出参数,解析后的日期时间对象 |
| AST_CORE_CAPI errc_t ast::aDateTimeParseISO8601 | ( | StringView | str, |
| DateTime & | dttm ) |
解析ISO 8601格式的日期时间字符串
将ISO 8601格式的字符串解析为日期时间对象
| str | 包含ISO 8601格式日期时间的字符串 |
| dttm | 输出参数,解析后的日期时间对象 |
| AST_CORE_CAPI errc_t ast::aDateTimeParseRFC3339 | ( | StringView | str, |
| DateTime & | dttm ) |
解析RFC 3339格式的日期时间字符串
将RFC 3339格式的字符串解析为日期时间对象
| str | 包含RFC 3339格式日期时间的字符串 |
| dttm | 输出参数,解析后的日期时间对象 |
| AST_CORE_CAPI int ast::aDayOfWeek | ( | const Date & | date | ) |
获取日期是这一周的第几天
| date | 日期对象 |
| AST_CORE_CAPI int ast::aDaysInMonthByLeap | ( | int | month, |
| bool | isLeapYear ) |
获取某年某月的天数,根据是否为闰年判断
| month | 月份,从1开始计数(1表示一月) |
| isLeapYear | 是否为闰年 |
| AST_CORE_CAPI int ast::aDaysInMonthByYear | ( | int | month, |
| int | year ) |
获取某年某月的天数,根据年份判断
| month | 月份,从1开始计数(1表示一月) |
| year | 年份 |
从GPS时 转换为 原子时(TAI)
| tmGPS | GPS时 |
| tmTAI | 原子时(TAI) |
| AST_CORE_CAPI void ast::aJDToDate | ( | ImpreciseJD | jd, |
| Date & | date, | ||
| double * | secInDay = nullptr ) |
将儒略日数转换为当天日期
| jd | 当天00:00的儒略日数 |
| date | 日期对象 |
| secInDay | 可选参数,用于返回当天00:00后的秒数 |
| AST_CORE_API double ast::aJDToMJD_Imprecise | ( | const JulianDate & | jd | ) |
将儒略日转换为简约儒略日
| AST_CORE_API ImpreciseMJD ast::aJDToMJD_Imprecise | ( | ImpreciseJD | jd | ) |
将简约儒略日Modified Julian Date(MJD)转换为儒略日
| AST_CORE_CAPI double ast::aJulianCenturyFromJ2000 | ( | const JulianDate & | jd | ) |
计算儒略世纪数,以 J2000.0 为基准
| jd | 儒略日 |
| AST_CORE_API ImpreciseJD ast::aMJDToJD_Imprecise | ( | const ModJulianDate & | mjd | ) |
将简约儒略日Modified Julian Date(MJD)转换为不精确的儒略日
| AST_CORE_API ImpreciseJD ast::aMJDToJD_Imprecise | ( | ImpreciseMJD | mjd | ) |
将儒略日转换为简约儒略日Modified Julian Date(MJD)
| AST_CORE_CAPI const char * ast::aMoonFullName | ( | int | month | ) |
获取月份的完整英文名称
| month | 月份,从1开始计数(1表示一月) |
| AST_CORE_CAPI const char * ast::aMoonShortName | ( | int | month | ) |
获取月份的简写英文名称
| month | 月份,从1开始计数(1表示一月) |
| AST_CORE_API TimePoint ast::aSpiceEtToTimePoint | ( | double | et | ) |
从原子时(TAI) 转换为 GPS时
| tmTAI | 原子时(TAI) |
| tmGPS | GPS时 |
从原子时(TAI) 转换为 地球时(TT)
| tmTAI | 原子时(TAI) |
| tmTT | 地球时(TT) |
| AST_CORE_API void ast::aTAIToUTC | ( | const JulianDate & | jdTAI, |
| JulianDate & | jdUTC ) |
从原子时(TAI) 转换为 协调世界时(UTC)
| jdTAI | 原子时(TAI) |
| jdUTC | 协调世界时(UTC) |
| AST_CORE_CAPI double ast::aTDBMinusTT | ( | const JulianDate & | jdTT | ) |
计算 质心动力学时(TDB) 时间与 地球时(TT) 时间的差值
| jdTT | 地球时(TT) |
| AST_CORE_CAPI void ast::aTimeFromTotalSecond | ( | double | totalSecond, |
| Time & | time ) |
从总秒数创建时间对象
根据总秒数计算时、分、秒,并将结果存储在时间对象中
| totalSecond | 总秒数 |
| time | 要存储结果的时间对象 |
| AST_CORE_CAPI errc_t ast::aTimeIntervalFormat | ( | const TimeInterval & | interval, |
| std::string & | strStart, | ||
| std::string & | strEnd ) |
将时间区间格式化为字符串
| interval | 时间区间 |
| str | 输出字符串 |
| AST_CORE_CAPI errc_t ast::aTimeIntervalParse | ( | StringView | strStart, |
| StringView | strEnd, | ||
| TimeInterval & | interval ) |
从字符串解析时间区间
| str | 输入字符串 |
| interval | 输出时间区间 |
| AST_CORE_CAPI void ast::aTimeNormalize | ( | Time & | time | ) |
规范化时间对象
将时间中的秒、分进行进位或借位调整,使其处于合理范围内(0-59)
| time | 要规范化的时间对象 |
| AST_CORE_API double ast::aTimePointToSpiceEt | ( | const TimePoint & | tp | ) |
| AST_CORE_CAPI void ast::aTodayDateTimeUTC | ( | DateTime & | dttm | ) |
获取今日00:00:00 UTC日期时间
| dttm |
| AST_CORE_CAPI void ast::aTomorrowDateTimeUTC | ( | DateTime & | dttm | ) |
获取明天00:00:00 UTC日期时间
| dttm |
| AST_CORE_CAPI double ast::aTTMinusTDB | ( | const JulianDate & | jdTDB | ) |
计算 地球时(TT) 时间与 质心动力学时(TDB) 时间的差值
| jdTDB | 质心动力学时(TDB) |
从地球时(TT) 转换为 原子时(TAI)
| tmTT | 地球时(TT) |
| tmTAI | 原子时(TAI) |
| AST_CORE_API void ast::aTTToTDB | ( | const JulianDate & | jdTT, |
| JulianDate & | jdTDB ) |
从地球时(TT) 转换为质心动力学时(TDB)
| jdTT | 地球时(TT) |
| jdTDB | 质心动力学时(TDB) |
| AST_CORE_API void ast::aTTToUTC | ( | const JulianDate & | jdTT, |
| JulianDate & | jdUTC ) |
从地球时(TT) 转换为 协调世界时(UTC)
| jdTT | 地球时(TT) |
| jdUTC | 协调世界时(UTC) |
| AST_CORE_API void ast::aUTCToTAI | ( | const JulianDate & | jdUTC, |
| JulianDate & | jdTAI ) |
从协调世界时(UTC) 转换为 原子时(TAI)
| jdUTC | 协调世界时(UTC) |
| jdTAI | 原子时(TAI) |
| AST_CORE_API void ast::aUTCToTT | ( | const JulianDate & | jdUTC, |
| JulianDate & | jdTT ) |
从协调世界时(UTC) 转换为 地球时(TT)
| jdUTC | 协调世界时(UTC) |
| jdTT | 地球时(TT) |
| AST_CORE_CAPI const char * ast::aWeekDayFullName | ( | int | wday | ) |
获取星期几的完整英文名称
| wday | 星期几,从0开始计数(0表示星期日) |
| AST_CORE_CAPI const char * ast::aWeekDayShortName | ( | int | wday | ) |
获取星期几的简写英文名称
| wday | 星期几,从0开始计数(0表示星期日) |
|
inline |
获取日期是这一年的第几天,从1开始计数
|
inline |
将时间区间离散化
| epoch | 时间区间的基准时间点 |
| step | 离散化步长(秒) |
|
inline |
将时间区间离散化
| step | 离散化步长(秒) |