MJD_TCB top-level property

TimeInstantUnits MJD_TCB
final

Modified Julian Date in the TCB scale

Implementation

// ignore: non_constant_identifier_names
final TimeInstantUnits MJD_TCB = TimeInstantUnits(
    'Modified Julian Date (TCB)',
    'MJD(TCB)',
    'MJD(TCB)',
    'Modified Julian Date (TCB)',
    86400.0,
    false,
    -36204.0, (dynamic val) {
  final jd = JD_TCB.fromMks(val);
  return jd - 2400000.5;
}, (dynamic val) {
  var d = val is num
      ? val.toDouble()
      : val is Number
          ? val.toDouble()
          : 0.0;
  d += 2400000.5; // convert MJD(TCB) to JD(TCB)
  return JD_TCB.toMks(d);
});