Function lupnt::spice::ConvertTime

Function Documentation

Real lupnt::spice::ConvertTime(Real t, Time from, Time to)

Convert time from one time system to another.

Convert a time value between time systems (TAI, TDB, TT, UTC, GPS, …) using SPICE’s unitim_c.

A SPICE-based alternative to lupnt::ConvertTime (time_conversions.h); computes the offset between from_time and to_time at t via SPICE and applies it as a (autodiff-preserving) shift to t, so the returned Real retains t’s derivative information.

Parameters:
  • t – in time in seconds

  • from – from time system String ID Time

    system

    TAI International Atomic

    Time TDB Barycentric Dynamical Time TT Terrestrial Time TDT Terrestrial Dynamical Time (TT) ET Ephemeris time, alias for TDB JDTDB Julian Date relative to TDB JDTDT Julian Date relative to TDT (TT) JED Julian Ephemeris date (synonym to JDTDB) GPS Global Positioning System Time

  • to – to time system

  • t – Input time value [s]

  • from_timeTime system of t

  • to_time – Desired output time system

Returns:

real out time in seconds

Returns:

t converted to to_time [s]