MJD_TDB top-level property
Modified Julian Date in the TDB scale
Implementation
// ignore: non_constant_identifier_names
final TimeInstantUnits MJD_TDB = TimeInstantUnits(
'Modified Julian Date (TDT)',
'MJD(TDT)',
'MJD(TDT)',
'Modified Julian Date (TDT)',
86400.0,
false,
-36204.0, (dynamic val) {
//double d = val is num ? val.toDouble() : val is Number ? val.toDouble() : 0.0;
final jd = JD_TDB.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(TDB) to JD(TDB)
return JD_TDB.toMks(d);
});