Siddhanta Parity API Documentation - v1.3.0
    Preparing search index...

    The date and time of an astronomical observation.

    Objects of type AstroTime are used throughout the internals of the Astronomy library, and are included in certain return objects. Use the constructor or the MakeTime function to create an AstroTime object.

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    date: Date

    The JavaScript Date object for the given date and time. This Date corresponds to the numeric day value stored in the ut property.

    tt: number

    Terrestrial Time in fractional days since the J2000 epoch. TT represents a continuously flowing ephemeris timescale independent of any variations of the Earth's rotation, and is adjusted from UT using a best-fit piecewise polynomial model devised by Espenak and Meeus.

    ut: number

    Universal Time (UT1/UTC) in fractional days since the J2000 epoch. Universal Time represents time measured with respect to the Earth's rotation, tracking mean solar days. The Astronomy library approximates UT1 and UTC as being the same thing. This gives sufficient accuracy for the precision requirements of this project.

    Methods

    • Returns a new AstroTime object adjusted by the floating point number of days. Does NOT modify the original AstroTime object.

      Parameters

      • days: number

        The floating point number of days by which to adjust the given date and time. Positive values adjust the date toward the future, and negative values adjust the date toward the past.

      Returns AstroTime

    • Formats an AstroTime object as an ISO 8601 date/time string in UTC, to millisecond resolution. Example: 2018-08-17T17:22:04.050Z

      Returns string

    • Creates an AstroTime value from a Terrestrial Time (TT) day value.

      This function can be used in rare cases where a time must be based on Terrestrial Time (TT) rather than Universal Time (UT). Most developers will want to invoke new AstroTime(ut) with a universal time instead of this function, because usually time is based on civil time adjusted by leap seconds to match the Earth's rotation, rather than the uniformly flowing TT used to calculate solar system dynamics. In rare cases where the caller already knows TT, this function is provided to create an AstroTime value that can be passed to Astronomy Engine functions.

      Parameters

      • tt: number

        The number of days since the J2000 epoch as expressed in Terrestrial Time.

      Returns AstroTime

      An AstroTime object for the specified terrestrial time.