JD_TDT top-level property

TimeInstantUnits JD_TDT
final

Julian Date in the TDT (TT) scale

Implementation

// ignore: non_constant_identifier_names
final TimeInstantUnits JD_TDT = TimeInstantUnits(
    'Julian Date (TDT)',
    'JD(TDT)',
    'JD(TDT)',
    'Julian Date (TDT)',
    86400.0,
    false,
    -2436204.5,
    (dynamic val) => (TDT.fromMks(val) / 86400.0) + 2436204.5, (dynamic val) {
  var d = val is num
      ? val.toDouble()
      : val is Number
          ? val.toDouble()
          : 0.0;

  // Adjust origin to TAI/UT1 origin
  d -= 2436204.5;

  return TDT.toMks(d * 86400.0);
});