timeconvert.h

Contents

timeconvert.h#

Header file for time conversion functions.

Author

Rahil Makadia makadia2@illinois.edu

LICENSE#

Copyright (C) 2022-2025 Rahil Makadia

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, see https://www.gnu.org/licenses.

Functions

void jd_to_et(const real jd, real &et)#

Convert Julian Date to TDB ephemeris time.

Parameters:
  • jd[in] Julian Date.

  • et[out] TDB ephemeris time.

real jd_to_et(const real jd)#

Convert Julian Date to TDB ephemeris time.

Parameters:

jd[in] Julian Date.

Returns:

real TDB ephemeris time.

void jd_to_mjd(const real jd, real &mjd)#

Convert Julian Date to Modified Julian Date.

Parameters:
  • jd[in] Julian Date.

  • mjd[out] Modified Julian Date.

real jd_to_mjd(const real jd)#

Convert Julian Date to Modified Julian Date.

Parameters:

jd[in] Julian Date.

Returns:

real Modified Julian Date.

void et_to_jd(const real et, real &jd)#

Convert TDB ephemeris time to Julian Date.

Parameters:
  • et[in] TDB ephemeris time.

  • jd[out] Julian Date.

real et_to_jd(const real et)#

Convert TDB ephemeris time to Julian Date.

Parameters:

et[in] TDB ephemeris time.

Returns:

real Julian Date.

void et_to_mjd(const real et, real &mjd)#

Convert TDB ephemeris time to Modified Julian Date.

Parameters:
  • et[in] TDB ephemeris time.

  • mjd[out] Modified Julian Date.

real et_to_mjd(const real et)#

Convert TDB ephemeris time to Modified Julian Date.

Parameters:

et[in] TDB ephemeris time.

Returns:

real Modified Julian Date.

void mjd_to_jd(const real mjd, real &jd)#

Convert Modified Julian Date to Julian Date.

Parameters:
  • mjd[in] Modified Julian Date.

  • jd[out] Julian Date.

real mjd_to_jd(const real mjd)#

Convert Modified Julian Date to Julian Date.

Parameters:

mjd[in] Modified Julian Date.

Returns:

real Julian Date.

void mjd_to_et(const real mjd, real &et)#

Convert Modified Julian Date to TDB ephemeris time.

Parameters:
  • mjd[in] Modified Julian Date.

  • et[out] TDB ephemeris time.

real mjd_to_et(const real mjd)#

Convert Modified Julian Date to TDB ephemeris time.

Parameters:

mjd[in] Modified Julian Date.

Returns:

real TDB ephemeris time.

real delta_at_utc(const real mjdUtc)#

Compute TAI-UTC difference in seconds at a given UTC Modified Julian Date.

Parameters:

mjdUtc[in] UTC Modified Julian Date.

Returns:

real TAI-UTC.

real delta_at_tai(const real mjdTai)#

Compute TAI-UTC difference in seconds at a given TAI Modified Julian Date.

Parameters:

mjdTai[in] TAI Modified Julian Date.

Returns:

real TAI-UTC.

real delta_et_utc(const real mjdUtc)#

Compute TDB-UTC difference in seconds at a given UTC Modified Julian Date.

Parameters:

mjdUtc[in] UTC Modified Julian Date.

Returns:

real TDB-UTC.

real delta_et_tdb(const real mjdTdb)#

Compute TDB-UTC difference in seconds at a given TDB Modified Julian Date.

Parameters:

mjdTdb[in] TDB Modified Julian Date.

Returns:

real TDB-UTC.