This function converts a TDB Julian Date into a UTC calendar date (year, month, day, hour, minute, second).
This is the inverse operation of calceph_time_cal_utc_to_jd_tdb().
The transformation chain performed is:
Converts TDB to TT using
calceph_time_jd_tdb_to_jd_tt().Computes the difference between TT and UTC (using leap seconds).
Converts the resulting UTC Julian Date into calendar components.
The function requires that the ephemeris file associated to eph contains the necessary time constants.
The following example converts a TDB Julian Date to a UTC calendar date:
t_calcephbin *peph;
double jd0_tdb = 2455348.5;
double jdfrac_tdb = 0.0;
int yy, mm, dd, hh, min;
double sec;
/* open the ephemeris file */
peph = calceph_open("example_lsk.tls");
if (peph != NULL)
{
/* Direct conversion: TDB JD -> UTC Calendar */
if (calceph_time_jd_tdb_to_cal_utc(peph, jd0_tdb, jdfrac_tdb,
&yy, &mm, &dd, &hh, &min, &sec) != 0)
{
printf("UTC Date: %d-%d-%d %d:%d:%f\n", yy, mm, dd, hh, min, sec);
}
calceph_close(peph);
}