@arcosmos/erfa 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +56 -0
- package/README.md +109 -2
- package/dist/a2af.d.ts +36 -0
- package/dist/a2af.d.ts.map +1 -0
- package/dist/a2af.js +44 -0
- package/dist/a2af.js.map +1 -0
- package/dist/a2tf.d.ts +36 -0
- package/dist/a2tf.d.ts.map +1 -0
- package/dist/a2tf.js +42 -0
- package/dist/a2tf.js.map +1 -0
- package/dist/af2a.d.ts +19 -0
- package/dist/af2a.d.ts.map +1 -0
- package/dist/af2a.js +34 -0
- package/dist/af2a.js.map +1 -0
- package/dist/anp.d.ts +8 -0
- package/dist/anp.d.ts.map +1 -0
- package/dist/anp.js +16 -0
- package/dist/anp.js.map +1 -0
- package/dist/anpm.d.ts +8 -0
- package/dist/anpm.d.ts.map +1 -0
- package/dist/anpm.js +16 -0
- package/dist/anpm.js.map +1 -0
- package/dist/bi00.d.ts +27 -0
- package/dist/bi00.d.ts.map +1 -0
- package/dist/bi00.js +40 -0
- package/dist/bi00.js.map +1 -0
- package/dist/bp06.d.ts +27 -0
- package/dist/bp06.d.ts.map +1 -0
- package/dist/bp06.js +46 -0
- package/dist/bp06.js.map +1 -0
- package/dist/c2s.d.ts +14 -0
- package/dist/c2s.d.ts.map +1 -0
- package/dist/c2s.js +21 -0
- package/dist/c2s.js.map +1 -0
- package/dist/cal2jd.d.ts +27 -0
- package/dist/cal2jd.d.ts.map +1 -0
- package/dist/cal2jd.js +58 -0
- package/dist/cal2jd.js.map +1 -0
- package/dist/constants.d.ts +59 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +60 -0
- package/dist/constants.js.map +1 -0
- package/dist/cp.d.ts +9 -0
- package/dist/cp.d.ts.map +1 -0
- package/dist/cp.js +10 -0
- package/dist/cp.js.map +1 -0
- package/dist/cpv.d.ts +9 -0
- package/dist/cpv.d.ts.map +1 -0
- package/dist/cpv.js +12 -0
- package/dist/cpv.js.map +1 -0
- package/dist/cr.d.ts +9 -0
- package/dist/cr.d.ts.map +1 -0
- package/dist/cr.js +12 -0
- package/dist/cr.js.map +1 -0
- package/dist/d2dtf.d.ts +49 -0
- package/dist/d2dtf.d.ts.map +1 -0
- package/dist/d2dtf.js +142 -0
- package/dist/d2dtf.js.map +1 -0
- package/dist/d2tf.d.ts +36 -0
- package/dist/d2tf.d.ts.map +1 -0
- package/dist/d2tf.js +77 -0
- package/dist/d2tf.js.map +1 -0
- package/dist/dat.d.ts +55 -0
- package/dist/dat.d.ts.map +1 -0
- package/dist/dat.js +168 -0
- package/dist/dat.js.map +1 -0
- package/dist/datini.d.ts +26 -0
- package/dist/datini.d.ts.map +1 -0
- package/dist/datini.js +37 -0
- package/dist/datini.js.map +1 -0
- package/dist/dtdb.d.ts +105 -0
- package/dist/dtdb.d.ts.map +1 -0
- package/dist/dtdb.js +1076 -0
- package/dist/dtdb.js.map +1 -0
- package/dist/dtf2d.d.ts +45 -0
- package/dist/dtf2d.d.ts.map +1 -0
- package/dist/dtf2d.js +112 -0
- package/dist/dtf2d.js.map +1 -0
- package/dist/eceq06.d.ts +24 -0
- package/dist/eceq06.d.ts.map +1 -0
- package/dist/eceq06.js +44 -0
- package/dist/eceq06.js.map +1 -0
- package/dist/ecm06.d.ts +30 -0
- package/dist/ecm06.d.ts.map +1 -0
- package/dist/ecm06.js +45 -0
- package/dist/ecm06.js.map +1 -0
- package/dist/epb.d.ts +24 -0
- package/dist/epb.d.ts.map +1 -0
- package/dist/epb.js +30 -0
- package/dist/epb.js.map +1 -0
- package/dist/epb2jd.d.ts +14 -0
- package/dist/epb2jd.d.ts.map +1 -0
- package/dist/epb2jd.js +20 -0
- package/dist/epb2jd.js.map +1 -0
- package/dist/epj.d.ts +24 -0
- package/dist/epj.d.ts.map +1 -0
- package/dist/epj.js +29 -0
- package/dist/epj.js.map +1 -0
- package/dist/epj2jd.d.ts +14 -0
- package/dist/epj2jd.d.ts.map +1 -0
- package/dist/epj2jd.js +20 -0
- package/dist/epj2jd.js.map +1 -0
- package/dist/eqec06.d.ts +24 -0
- package/dist/eqec06.d.ts.map +1 -0
- package/dist/eqec06.js +44 -0
- package/dist/eqec06.js.map +1 -0
- package/dist/era00.d.ts +29 -0
- package/dist/era00.d.ts.map +1 -0
- package/dist/era00.js +51 -0
- package/dist/era00.js.map +1 -0
- package/dist/fw2m.d.ts +51 -0
- package/dist/fw2m.d.ts.map +1 -0
- package/dist/fw2m.js +61 -0
- package/dist/fw2m.js.map +1 -0
- package/dist/g2icrs.d.ts +33 -0
- package/dist/g2icrs.d.ts.map +1 -0
- package/dist/g2icrs.js +69 -0
- package/dist/g2icrs.js.map +1 -0
- package/dist/gmst06.d.ts +32 -0
- package/dist/gmst06.d.ts.map +1 -0
- package/dist/gmst06.js +49 -0
- package/dist/gmst06.js.map +1 -0
- package/dist/icrs2g.d.ts +33 -0
- package/dist/icrs2g.d.ts.map +1 -0
- package/dist/icrs2g.js +69 -0
- package/dist/icrs2g.js.map +1 -0
- package/dist/index.d.ts +95 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +106 -0
- package/dist/index.js.map +1 -0
- package/dist/internal.d.ts +23 -0
- package/dist/internal.d.ts.map +1 -0
- package/dist/internal.js +32 -0
- package/dist/internal.js.map +1 -0
- package/dist/ir.d.ts +9 -0
- package/dist/ir.d.ts.map +1 -0
- package/dist/ir.js +14 -0
- package/dist/ir.js.map +1 -0
- package/dist/jd2cal.d.ts +31 -0
- package/dist/jd2cal.d.ts.map +1 -0
- package/dist/jd2cal.js +106 -0
- package/dist/jd2cal.js.map +1 -0
- package/dist/jdcalf.d.ts +28 -0
- package/dist/jdcalf.d.ts.map +1 -0
- package/dist/jdcalf.js +84 -0
- package/dist/jdcalf.js.map +1 -0
- package/dist/leap-seconds.d.ts +30 -0
- package/dist/leap-seconds.d.ts.map +1 -0
- package/dist/leap-seconds.js +42 -0
- package/dist/leap-seconds.js.map +1 -0
- package/dist/obl06.d.ts +19 -0
- package/dist/obl06.d.ts.map +1 -0
- package/dist/obl06.js +32 -0
- package/dist/obl06.js.map +1 -0
- package/dist/pap.d.ts +19 -0
- package/dist/pap.d.ts.map +1 -0
- package/dist/pap.js +45 -0
- package/dist/pap.js.map +1 -0
- package/dist/pas.d.ts +17 -0
- package/dist/pas.d.ts.map +1 -0
- package/dist/pas.js +24 -0
- package/dist/pas.js.map +1 -0
- package/dist/pdp.d.ts +8 -0
- package/dist/pdp.d.ts.map +1 -0
- package/dist/pdp.js +9 -0
- package/dist/pdp.js.map +1 -0
- package/dist/pfw06.d.ts +43 -0
- package/dist/pfw06.d.ts.map +1 -0
- package/dist/pfw06.js +73 -0
- package/dist/pfw06.js.map +1 -0
- package/dist/pm.d.ts +8 -0
- package/dist/pm.d.ts.map +1 -0
- package/dist/pm.js +9 -0
- package/dist/pm.js.map +1 -0
- package/dist/pmat06.d.ts +26 -0
- package/dist/pmat06.d.ts.map +1 -0
- package/dist/pmat06.js +34 -0
- package/dist/pmat06.js.map +1 -0
- package/dist/pmp.d.ts +10 -0
- package/dist/pmp.d.ts.map +1 -0
- package/dist/pmp.js +11 -0
- package/dist/pmp.js.map +1 -0
- package/dist/pmpx.d.ts +29 -0
- package/dist/pmpx.d.ts.map +1 -0
- package/dist/pmpx.js +59 -0
- package/dist/pmpx.js.map +1 -0
- package/dist/pmsafe.d.ts +60 -0
- package/dist/pmsafe.d.ts.map +1 -0
- package/dist/pmsafe.js +91 -0
- package/dist/pmsafe.js.map +1 -0
- package/dist/pn.d.ts +12 -0
- package/dist/pn.d.ts.map +1 -0
- package/dist/pn.js +25 -0
- package/dist/pn.js.map +1 -0
- package/dist/ppp.d.ts +10 -0
- package/dist/ppp.d.ts.map +1 -0
- package/dist/ppp.js +11 -0
- package/dist/ppp.js.map +1 -0
- package/dist/ppsp.d.ts +11 -0
- package/dist/ppsp.d.ts.map +1 -0
- package/dist/ppsp.js +17 -0
- package/dist/ppsp.js.map +1 -0
- package/dist/pv2s.d.ts +19 -0
- package/dist/pv2s.d.ts.map +1 -0
- package/dist/pv2s.js +61 -0
- package/dist/pv2s.js.map +1 -0
- package/dist/pvdpv.d.ts +14 -0
- package/dist/pvdpv.d.ts.map +1 -0
- package/dist/pvdpv.js +24 -0
- package/dist/pvdpv.js.map +1 -0
- package/dist/pvm.d.ts +9 -0
- package/dist/pvm.d.ts.map +1 -0
- package/dist/pvm.js +15 -0
- package/dist/pvm.js.map +1 -0
- package/dist/pvmpv.d.ts +10 -0
- package/dist/pvmpv.d.ts.map +1 -0
- package/dist/pvmpv.js +12 -0
- package/dist/pvmpv.js.map +1 -0
- package/dist/pvppv.d.ts +10 -0
- package/dist/pvppv.d.ts.map +1 -0
- package/dist/pvppv.js +12 -0
- package/dist/pvppv.js.map +1 -0
- package/dist/pvstar.d.ts +51 -0
- package/dist/pvstar.d.ts.map +1 -0
- package/dist/pvstar.js +97 -0
- package/dist/pvstar.js.map +1 -0
- package/dist/pvu.d.ts +15 -0
- package/dist/pvu.d.ts.map +1 -0
- package/dist/pvu.js +19 -0
- package/dist/pvu.js.map +1 -0
- package/dist/pvxpv.d.ts +15 -0
- package/dist/pvxpv.d.ts.map +1 -0
- package/dist/pvxpv.js +29 -0
- package/dist/pvxpv.js.map +1 -0
- package/dist/pxp.d.ts +8 -0
- package/dist/pxp.d.ts.map +1 -0
- package/dist/pxp.js +15 -0
- package/dist/pxp.js.map +1 -0
- package/dist/rx.d.ts +21 -0
- package/dist/rx.d.ts.map +1 -0
- package/dist/rx.js +30 -0
- package/dist/rx.js.map +1 -0
- package/dist/rxp.d.ts +10 -0
- package/dist/rxp.d.ts.map +1 -0
- package/dist/rxp.js +21 -0
- package/dist/rxp.js.map +1 -0
- package/dist/rxr.d.ts +10 -0
- package/dist/rxr.d.ts.map +1 -0
- package/dist/rxr.js +27 -0
- package/dist/rxr.js.map +1 -0
- package/dist/ry.d.ts +21 -0
- package/dist/ry.d.ts.map +1 -0
- package/dist/ry.js +30 -0
- package/dist/ry.js.map +1 -0
- package/dist/rz.d.ts +21 -0
- package/dist/rz.d.ts.map +1 -0
- package/dist/rz.js +30 -0
- package/dist/rz.js.map +1 -0
- package/dist/s2c.d.ts +10 -0
- package/dist/s2c.d.ts.map +1 -0
- package/dist/s2c.js +12 -0
- package/dist/s2c.js.map +1 -0
- package/dist/s2pv.d.ts +14 -0
- package/dist/s2pv.d.ts.map +1 -0
- package/dist/s2pv.js +27 -0
- package/dist/s2pv.js.map +1 -0
- package/dist/s2xpv.d.ts +11 -0
- package/dist/s2xpv.d.ts.map +1 -0
- package/dist/s2xpv.js +13 -0
- package/dist/s2xpv.js.map +1 -0
- package/dist/sepp.d.ts +16 -0
- package/dist/sepp.d.ts.map +1 -0
- package/dist/sepp.js +26 -0
- package/dist/sepp.js.map +1 -0
- package/dist/seps.d.ts +11 -0
- package/dist/seps.d.ts.map +1 -0
- package/dist/seps.js +20 -0
- package/dist/seps.js.map +1 -0
- package/dist/starpm.d.ts +56 -0
- package/dist/starpm.d.ts.map +1 -0
- package/dist/starpm.js +90 -0
- package/dist/starpm.js.map +1 -0
- package/dist/starpv.d.ts +62 -0
- package/dist/starpv.d.ts.map +1 -0
- package/dist/starpv.js +147 -0
- package/dist/starpv.js.map +1 -0
- package/dist/sxp.d.ts +10 -0
- package/dist/sxp.d.ts.map +1 -0
- package/dist/sxp.js +11 -0
- package/dist/sxp.js.map +1 -0
- package/dist/sxpv.d.ts +10 -0
- package/dist/sxpv.d.ts.map +1 -0
- package/dist/sxpv.js +12 -0
- package/dist/sxpv.js.map +1 -0
- package/dist/taitt.d.ts +19 -0
- package/dist/taitt.d.ts.map +1 -0
- package/dist/taitt.js +36 -0
- package/dist/taitt.js.map +1 -0
- package/dist/taiut1.d.ts +20 -0
- package/dist/taiut1.d.ts.map +1 -0
- package/dist/taiut1.js +36 -0
- package/dist/taiut1.js.map +1 -0
- package/dist/taiutc.d.ts +33 -0
- package/dist/taiutc.d.ts.map +1 -0
- package/dist/taiutc.js +73 -0
- package/dist/taiutc.js.map +1 -0
- package/dist/tcbtdb.d.ts +29 -0
- package/dist/tcbtdb.d.ts.map +1 -0
- package/dist/tcbtdb.js +51 -0
- package/dist/tcbtdb.js.map +1 -0
- package/dist/tcgtt.d.ts +18 -0
- package/dist/tcgtt.d.ts.map +1 -0
- package/dist/tcgtt.js +35 -0
- package/dist/tcgtt.js.map +1 -0
- package/dist/tdbtcb.d.ts +29 -0
- package/dist/tdbtcb.d.ts.map +1 -0
- package/dist/tdbtcb.js +55 -0
- package/dist/tdbtcb.js.map +1 -0
- package/dist/tdbtt.d.ts +27 -0
- package/dist/tdbtt.d.ts.map +1 -0
- package/dist/tdbtt.js +43 -0
- package/dist/tdbtt.js.map +1 -0
- package/dist/tf2a.d.ts +19 -0
- package/dist/tf2a.d.ts.map +1 -0
- package/dist/tf2a.js +34 -0
- package/dist/tf2a.js.map +1 -0
- package/dist/tr.d.ts +9 -0
- package/dist/tr.d.ts.map +1 -0
- package/dist/tr.js +22 -0
- package/dist/tr.js.map +1 -0
- package/dist/trxp.d.ts +10 -0
- package/dist/trxp.d.ts.map +1 -0
- package/dist/trxp.js +15 -0
- package/dist/trxp.js.map +1 -0
- package/dist/tttai.d.ts +19 -0
- package/dist/tttai.d.ts.map +1 -0
- package/dist/tttai.js +36 -0
- package/dist/tttai.js.map +1 -0
- package/dist/tttcg.d.ts +18 -0
- package/dist/tttcg.d.ts.map +1 -0
- package/dist/tttcg.js +37 -0
- package/dist/tttcg.js.map +1 -0
- package/dist/tttdb.d.ts +27 -0
- package/dist/tttdb.d.ts.map +1 -0
- package/dist/tttdb.js +43 -0
- package/dist/tttdb.js.map +1 -0
- package/dist/ttut1.d.ts +19 -0
- package/dist/ttut1.d.ts.map +1 -0
- package/dist/ttut1.js +35 -0
- package/dist/ttut1.js.map +1 -0
- package/dist/ut1tai.d.ts +20 -0
- package/dist/ut1tai.d.ts.map +1 -0
- package/dist/ut1tai.js +36 -0
- package/dist/ut1tai.js.map +1 -0
- package/dist/ut1tt.d.ts +19 -0
- package/dist/ut1tt.d.ts.map +1 -0
- package/dist/ut1tt.js +35 -0
- package/dist/ut1tt.js.map +1 -0
- package/dist/ut1utc.d.ts +35 -0
- package/dist/ut1utc.d.ts.map +1 -0
- package/dist/ut1utc.js +107 -0
- package/dist/ut1utc.js.map +1 -0
- package/dist/utctai.d.ts +33 -0
- package/dist/utctai.d.ts.map +1 -0
- package/dist/utctai.js +94 -0
- package/dist/utctai.js.map +1 -0
- package/dist/utcut1.d.ts +34 -0
- package/dist/utcut1.d.ts.map +1 -0
- package/dist/utcut1.js +63 -0
- package/dist/utcut1.js.map +1 -0
- package/dist/zp.d.ts +8 -0
- package/dist/zp.d.ts.map +1 -0
- package/dist/zp.js +9 -0
- package/dist/zp.js.map +1 -0
- package/dist/zpv.d.ts +8 -0
- package/dist/zpv.d.ts.map +1 -0
- package/dist/zpv.js +10 -0
- package/dist/zpv.js.map +1 -0
- package/dist/zr.d.ts +9 -0
- package/dist/zr.d.ts.map +1 -0
- package/dist/zr.js +14 -0
- package/dist/zr.js.map +1 -0
- package/package.json +42 -3
- package/src/a2af.ts +48 -0
- package/src/a2tf.ts +45 -0
- package/src/af2a.ts +38 -0
- package/src/anp.ts +15 -0
- package/src/anpm.ts +15 -0
- package/src/bi00.ts +42 -0
- package/src/bp06.ts +51 -0
- package/src/c2s.ts +23 -0
- package/src/cal2jd.ts +67 -0
- package/src/constants.ts +60 -0
- package/src/cp.ts +12 -0
- package/src/cpv.ts +13 -0
- package/src/cr.ts +13 -0
- package/src/d2dtf.ts +153 -0
- package/src/d2tf.ts +87 -0
- package/src/dat.ts +186 -0
- package/src/datini.ts +49 -0
- package/src/dtdb.ts +1110 -0
- package/src/dtf2d.ts +124 -0
- package/src/eceq06.ts +54 -0
- package/src/ecm06.ts +51 -0
- package/src/epb.ts +31 -0
- package/src/epb2jd.ts +21 -0
- package/src/epj.ts +30 -0
- package/src/epj2jd.ts +21 -0
- package/src/eqec06.ts +54 -0
- package/src/era00.ts +54 -0
- package/src/fw2m.ts +64 -0
- package/src/g2icrs.ts +74 -0
- package/src/gmst06.ts +51 -0
- package/src/icrs2g.ts +74 -0
- package/src/index.ts +108 -0
- package/src/internal.ts +46 -0
- package/src/ir.ts +16 -0
- package/src/jd2cal.ts +117 -0
- package/src/jdcalf.ts +93 -0
- package/src/leap-seconds.ts +47 -0
- package/src/obl06.ts +34 -0
- package/src/pap.ts +54 -0
- package/src/pas.ts +25 -0
- package/src/pdp.ts +11 -0
- package/src/pfw06.ts +78 -0
- package/src/pm.ts +11 -0
- package/src/pmat06.ts +37 -0
- package/src/pmp.ts +13 -0
- package/src/pmpx.ts +75 -0
- package/src/pmsafe.ts +109 -0
- package/src/pn.ts +26 -0
- package/src/ppp.ts +13 -0
- package/src/ppsp.ts +20 -0
- package/src/pv2s.ts +71 -0
- package/src/pvdpv.ts +30 -0
- package/src/pvm.ts +19 -0
- package/src/pvmpv.ts +14 -0
- package/src/pvppv.ts +14 -0
- package/src/pvstar.ts +113 -0
- package/src/pvu.ts +20 -0
- package/src/pvxpv.ts +33 -0
- package/src/pxp.ts +17 -0
- package/src/rx.ts +32 -0
- package/src/rxp.ts +24 -0
- package/src/rxr.ts +29 -0
- package/src/ry.ts +32 -0
- package/src/rz.ts +32 -0
- package/src/s2c.ts +14 -0
- package/src/s2pv.ts +30 -0
- package/src/s2xpv.ts +15 -0
- package/src/sepp.ts +28 -0
- package/src/seps.ts +20 -0
- package/src/starpm.ts +108 -0
- package/src/starpv.ts +167 -0
- package/src/sxp.ts +13 -0
- package/src/sxpv.ts +14 -0
- package/src/taitt.ts +38 -0
- package/src/taiut1.ts +41 -0
- package/src/taiutc.ts +76 -0
- package/src/tcbtdb.ts +54 -0
- package/src/tcgtt.ts +37 -0
- package/src/tdbtcb.ts +59 -0
- package/src/tdbtt.ts +48 -0
- package/src/tf2a.ts +38 -0
- package/src/tr.ts +24 -0
- package/src/trxp.ts +18 -0
- package/src/tttai.ts +38 -0
- package/src/tttcg.ts +40 -0
- package/src/tttdb.ts +48 -0
- package/src/ttut1.ts +40 -0
- package/src/ut1tai.ts +41 -0
- package/src/ut1tt.ts +40 -0
- package/src/ut1utc.ts +115 -0
- package/src/utctai.ts +97 -0
- package/src/utcut1.ts +66 -0
- package/src/zp.ts +11 -0
- package/src/zpv.ts +12 -0
- package/src/zr.ts +16 -0
package/dist/d2tf.js
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// Translated from ERFA 2.0.1 eraD2tf (d2tf.c); see LICENSE.
|
|
2
|
+
import { DAYSEC } from './constants.js';
|
|
3
|
+
import { dint, dnint } from './internal.js';
|
|
4
|
+
/**
|
|
5
|
+
* Decompose days to hours, minutes, seconds, fraction.
|
|
6
|
+
*
|
|
7
|
+
* Notes:
|
|
8
|
+
* 1. The argument ndp is interpreted as follows:
|
|
9
|
+
*
|
|
10
|
+
* ndp resolution
|
|
11
|
+
* : ...0000 00 00
|
|
12
|
+
* -7 1000 00 00
|
|
13
|
+
* -6 100 00 00
|
|
14
|
+
* -5 10 00 00
|
|
15
|
+
* -4 1 00 00
|
|
16
|
+
* -3 0 10 00
|
|
17
|
+
* -2 0 01 00
|
|
18
|
+
* -1 0 00 10
|
|
19
|
+
* 0 0 00 01
|
|
20
|
+
* 1 0 00 00.1
|
|
21
|
+
* 2 0 00 00.01
|
|
22
|
+
* 3 0 00 00.001
|
|
23
|
+
* : 0 00 00.000...
|
|
24
|
+
*
|
|
25
|
+
* 2. The largest positive useful value for ndp is determined by the size of days, the format
|
|
26
|
+
* of double on the target platform, and the risk of overflowing ihmsf[3]. On a typical
|
|
27
|
+
* platform, for days up to 1.0, the available floating-point precision might correspond
|
|
28
|
+
* to ndp=12. In C the practical limit is typically ndp=9, set by the capacity of a
|
|
29
|
+
* 32-bit int; here the fields are numbers, exact as integers up to 2^53.
|
|
30
|
+
* 3. The absolute value of days may exceed 1.0. In cases where it does not, it is up to the
|
|
31
|
+
* caller to test for and handle the case where days is very nearly 1.0 and rounds up to
|
|
32
|
+
* 24 hours, by testing for ihmsf[0]=24 and setting ihmsf[0-3] to zero.
|
|
33
|
+
*
|
|
34
|
+
* @param ndp resolution (Note 1)
|
|
35
|
+
* @param days interval in days
|
|
36
|
+
* @returns [sign, ihmsf]: '+' or '-', and hours, minutes, seconds, fraction
|
|
37
|
+
*/
|
|
38
|
+
export function d2tf(ndp, days) {
|
|
39
|
+
let nrs, rs;
|
|
40
|
+
// Handle sign.
|
|
41
|
+
const sign = days >= 0.0 ? '+' : '-';
|
|
42
|
+
// Interval in seconds.
|
|
43
|
+
let a = DAYSEC * Math.abs(days);
|
|
44
|
+
// Pre-round if resolution coarser than 1s (then pretend ndp=1).
|
|
45
|
+
if (ndp < 0) {
|
|
46
|
+
nrs = 1;
|
|
47
|
+
for (let n = 1; n <= -ndp; n++) {
|
|
48
|
+
nrs *= n === 2 || n === 4 ? 6 : 10;
|
|
49
|
+
}
|
|
50
|
+
rs = nrs;
|
|
51
|
+
const w = a / rs;
|
|
52
|
+
a = rs * dnint(w);
|
|
53
|
+
}
|
|
54
|
+
// Express the unit of each field in resolution units.
|
|
55
|
+
nrs = 1;
|
|
56
|
+
for (let n = 1; n <= ndp; n++) {
|
|
57
|
+
nrs *= 10;
|
|
58
|
+
}
|
|
59
|
+
rs = nrs;
|
|
60
|
+
const rm = rs * 60.0;
|
|
61
|
+
const rh = rm * 60.0;
|
|
62
|
+
// Round the interval and express in resolution units.
|
|
63
|
+
a = dnint(rs * a);
|
|
64
|
+
// Break into fields.
|
|
65
|
+
let ah = a / rh;
|
|
66
|
+
ah = dint(ah);
|
|
67
|
+
a -= ah * rh;
|
|
68
|
+
let am = a / rm;
|
|
69
|
+
am = dint(am);
|
|
70
|
+
a -= am * rm;
|
|
71
|
+
let as = a / rs;
|
|
72
|
+
as = dint(as);
|
|
73
|
+
const af = a - as * rs;
|
|
74
|
+
// Return results.
|
|
75
|
+
return [sign, [ah, am, as, af]];
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=d2tf.js.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,GAAG,GAAG,CAAA;IACR,MAAM,EAAE,GAAG,EAAE,GAAG,IAAI,CAAA;IACpB,MAAM,EAAE,GAAG,EAAE,GAAG,IAAI,CAAA;IAEpB,sDAAsD;IACtD,CAAC,GAAG,KAAK,CAAC,EAAE,GAAG,CAAC,CAAC,CAAA;IAEjB,qBAAqB;IACrB,IAAI,EAAE,GAAG,CAAC,GAAG,EAAE,CAAA;IACf,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC,CAAA;IACb,CAAC,IAAI,EAAE,GAAG,EAAE,CAAA;IACZ,IAAI,EAAE,GAAG,CAAC,GAAG,EAAE,CAAA;IACf,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC,CAAA;IACb,CAAC,IAAI,EAAE,GAAG,EAAE,CAAA;IACZ,IAAI,EAAE,GAAG,CAAC,GAAG,EAAE,CAAA;IACf,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC,CAAA;IACb,MAAM,EAAE,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,CAAA;IAEtB,kBAAkB;IAClB,OAAO,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,CAAA;AACjC,CAAC"}
|
package/dist/dat.d.ts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* For a given UTC date, calculate Delta(AT) = TAI-UTC.
|
|
3
|
+
*
|
|
4
|
+
* IMPORTANT: a new version of this function must be produced whenever a new leap second is
|
|
5
|
+
* announced (latest leap second: 2016 December 31), with a new line in the table of changes
|
|
6
|
+
* and IYV set to the current year. Between releases, setLeapSeconds replaces the table at
|
|
7
|
+
* run time, as pyerfa and Astropy do.
|
|
8
|
+
*
|
|
9
|
+
* Notes:
|
|
10
|
+
* 1. UTC began at 1960 January 1.0 (JD 2436934.5) and it is improper to call the function
|
|
11
|
+
* with an earlier date. If this is attempted, zero is returned together with a warning
|
|
12
|
+
* status. Because leap seconds cannot, in principle, be predicted in advance, a reliable
|
|
13
|
+
* check for dates beyond the valid range is impossible. To guard against gross errors, a
|
|
14
|
+
* year five or more after the release year of the present function (IYV, 2023) is
|
|
15
|
+
* considered dubious: from 2029 on. In this case a warning status is returned but the
|
|
16
|
+
* result is computed in the normal way. For both too-early and too-late years, the
|
|
17
|
+
* warning status is +1. This is distinct from the error status -1, which signifies a year
|
|
18
|
+
* so early that JD could not be computed. "Too early" is before the first year of the
|
|
19
|
+
* table in use.
|
|
20
|
+
* 2. If the specified date is for a day which ends with a leap second, the TAI-UTC value
|
|
21
|
+
* returned is for the period leading up to the leap second. If the date is for a day
|
|
22
|
+
* which begins as a leap second ends, the TAI-UTC returned is for the period following
|
|
23
|
+
* the leap second.
|
|
24
|
+
* 3. The day number must be in the normal calendar range, for example 1 through 30 for
|
|
25
|
+
* April. The "almanac" convention of allowing such dates as January 0 and December 32 is
|
|
26
|
+
* not supported in this function, in order to avoid confusion near leap seconds.
|
|
27
|
+
* 4. The fraction of day is used only for dates before the introduction of leap seconds, the
|
|
28
|
+
* first of which occurred at the end of 1971. It is tested for validity (0 to 1 is the
|
|
29
|
+
* valid range) even if not used; if invalid, zero is used and status -4 is returned. For
|
|
30
|
+
* many applications, setting fd to zero is acceptable; the resulting error is always less
|
|
31
|
+
* than 3 ms (and occurs only pre-1972).
|
|
32
|
+
* 5. The status value returned in the case where there are multiple errors refers to the
|
|
33
|
+
* first error detected. For example, if the month and day are 13 and 32 respectively,
|
|
34
|
+
* status -2 (bad month) will be returned. The "internal error" status refers to a case
|
|
35
|
+
* that is impossible with the built-in table.
|
|
36
|
+
* 6. In cases where a valid result is not available, zero is returned.
|
|
37
|
+
* 7. The pre-1972 drift applies to the first 14 rows of the table in use, whatever it holds:
|
|
38
|
+
* a replacement table (setLeapSeconds) must keep the built-in table's first 14 rows.
|
|
39
|
+
*
|
|
40
|
+
* References:
|
|
41
|
+
* - For dates from 1961 January 1 onwards, the expressions from the file
|
|
42
|
+
* ftp://maia.usno.navy.mil/ser7/tai-utc.dat are used.
|
|
43
|
+
* - The 5ms timestep at 1961 January 1 is taken from 2.58.1 (p87) of the 1992 Explanatory
|
|
44
|
+
* Supplement.
|
|
45
|
+
*
|
|
46
|
+
* @param iy UTC: year (Notes 1 and 2)
|
|
47
|
+
* @param im month (Note 2)
|
|
48
|
+
* @param id day (Notes 2 and 3)
|
|
49
|
+
* @param fd fraction of day (Note 4)
|
|
50
|
+
* @returns [deltat, status]: TAI minus UTC in seconds, and status (Note 5): 1 = dubious
|
|
51
|
+
* year (Note 1), 0 = OK, -1 = bad year, -2 = bad month, -3 = bad day (Note 3), -4 = bad
|
|
52
|
+
* fraction (Note 4), -5 = internal error (Note 5)
|
|
53
|
+
*/
|
|
54
|
+
export declare function dat(iy: number, im: number, id: number, fd: number): [deltat: number, status: number];
|
|
55
|
+
//# sourceMappingURL=dat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dat.d.ts","sourceRoot":"","sources":["../src/dat.ts"],"names":[],"mappings":"AA8EA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,wBAAgB,GAAG,CACjB,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,GACT,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAiDlC"}
|
package/dist/dat.js
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
// Translated from ERFA 2.0.1 eraDat (dat.c); see LICENSE.
|
|
2
|
+
import { cal2jd } from './cal2jd.js';
|
|
3
|
+
import { datini } from './datini.js';
|
|
4
|
+
// Release year for this version of eraDat
|
|
5
|
+
const IYV = 2023;
|
|
6
|
+
// Reference dates (MJD) and drift rates (s/day), pre leap seconds
|
|
7
|
+
const drift = [
|
|
8
|
+
[37300.0, 0.0012960],
|
|
9
|
+
[37300.0, 0.0012960],
|
|
10
|
+
[37300.0, 0.0012960],
|
|
11
|
+
[37665.0, 0.0011232],
|
|
12
|
+
[37665.0, 0.0011232],
|
|
13
|
+
[38761.0, 0.0012960],
|
|
14
|
+
[38761.0, 0.0012960],
|
|
15
|
+
[38761.0, 0.0012960],
|
|
16
|
+
[38761.0, 0.0012960],
|
|
17
|
+
[38761.0, 0.0012960],
|
|
18
|
+
[38761.0, 0.0012960],
|
|
19
|
+
[38761.0, 0.0012960],
|
|
20
|
+
[39126.0, 0.0025920],
|
|
21
|
+
[39126.0, 0.0025920],
|
|
22
|
+
];
|
|
23
|
+
// Number of Delta(AT) expressions before leap seconds were introduced
|
|
24
|
+
const NERA1 = drift.length;
|
|
25
|
+
// Dates and Delta(AT)s
|
|
26
|
+
const _changes = [
|
|
27
|
+
{ iyear: 1960, month: 1, delat: 1.4178180 },
|
|
28
|
+
{ iyear: 1961, month: 1, delat: 1.4228180 },
|
|
29
|
+
{ iyear: 1961, month: 8, delat: 1.3728180 },
|
|
30
|
+
{ iyear: 1962, month: 1, delat: 1.8458580 },
|
|
31
|
+
{ iyear: 1963, month: 11, delat: 1.9458580 },
|
|
32
|
+
{ iyear: 1964, month: 1, delat: 3.2401300 },
|
|
33
|
+
{ iyear: 1964, month: 4, delat: 3.3401300 },
|
|
34
|
+
{ iyear: 1964, month: 9, delat: 3.4401300 },
|
|
35
|
+
{ iyear: 1965, month: 1, delat: 3.5401300 },
|
|
36
|
+
{ iyear: 1965, month: 3, delat: 3.6401300 },
|
|
37
|
+
{ iyear: 1965, month: 7, delat: 3.7401300 },
|
|
38
|
+
{ iyear: 1965, month: 9, delat: 3.8401300 },
|
|
39
|
+
{ iyear: 1966, month: 1, delat: 4.3131700 },
|
|
40
|
+
{ iyear: 1968, month: 2, delat: 4.2131700 },
|
|
41
|
+
{ iyear: 1972, month: 1, delat: 10.0 },
|
|
42
|
+
{ iyear: 1972, month: 7, delat: 11.0 },
|
|
43
|
+
{ iyear: 1973, month: 1, delat: 12.0 },
|
|
44
|
+
{ iyear: 1974, month: 1, delat: 13.0 },
|
|
45
|
+
{ iyear: 1975, month: 1, delat: 14.0 },
|
|
46
|
+
{ iyear: 1976, month: 1, delat: 15.0 },
|
|
47
|
+
{ iyear: 1977, month: 1, delat: 16.0 },
|
|
48
|
+
{ iyear: 1978, month: 1, delat: 17.0 },
|
|
49
|
+
{ iyear: 1979, month: 1, delat: 18.0 },
|
|
50
|
+
{ iyear: 1980, month: 1, delat: 19.0 },
|
|
51
|
+
{ iyear: 1981, month: 7, delat: 20.0 },
|
|
52
|
+
{ iyear: 1982, month: 7, delat: 21.0 },
|
|
53
|
+
{ iyear: 1983, month: 7, delat: 22.0 },
|
|
54
|
+
{ iyear: 1985, month: 7, delat: 23.0 },
|
|
55
|
+
{ iyear: 1988, month: 1, delat: 24.0 },
|
|
56
|
+
{ iyear: 1990, month: 1, delat: 25.0 },
|
|
57
|
+
{ iyear: 1991, month: 1, delat: 26.0 },
|
|
58
|
+
{ iyear: 1992, month: 7, delat: 27.0 },
|
|
59
|
+
{ iyear: 1993, month: 7, delat: 28.0 },
|
|
60
|
+
{ iyear: 1994, month: 7, delat: 29.0 },
|
|
61
|
+
{ iyear: 1996, month: 1, delat: 30.0 },
|
|
62
|
+
{ iyear: 1997, month: 7, delat: 31.0 },
|
|
63
|
+
{ iyear: 1999, month: 1, delat: 32.0 },
|
|
64
|
+
{ iyear: 2006, month: 1, delat: 33.0 },
|
|
65
|
+
{ iyear: 2009, month: 1, delat: 34.0 },
|
|
66
|
+
{ iyear: 2012, month: 7, delat: 35.0 },
|
|
67
|
+
{ iyear: 2015, month: 7, delat: 36.0 },
|
|
68
|
+
{ iyear: 2017, month: 1, delat: 37.0 },
|
|
69
|
+
];
|
|
70
|
+
// Number of Delta(AT) changes
|
|
71
|
+
const _NDAT = _changes.length;
|
|
72
|
+
/**
|
|
73
|
+
* For a given UTC date, calculate Delta(AT) = TAI-UTC.
|
|
74
|
+
*
|
|
75
|
+
* IMPORTANT: a new version of this function must be produced whenever a new leap second is
|
|
76
|
+
* announced (latest leap second: 2016 December 31), with a new line in the table of changes
|
|
77
|
+
* and IYV set to the current year. Between releases, setLeapSeconds replaces the table at
|
|
78
|
+
* run time, as pyerfa and Astropy do.
|
|
79
|
+
*
|
|
80
|
+
* Notes:
|
|
81
|
+
* 1. UTC began at 1960 January 1.0 (JD 2436934.5) and it is improper to call the function
|
|
82
|
+
* with an earlier date. If this is attempted, zero is returned together with a warning
|
|
83
|
+
* status. Because leap seconds cannot, in principle, be predicted in advance, a reliable
|
|
84
|
+
* check for dates beyond the valid range is impossible. To guard against gross errors, a
|
|
85
|
+
* year five or more after the release year of the present function (IYV, 2023) is
|
|
86
|
+
* considered dubious: from 2029 on. In this case a warning status is returned but the
|
|
87
|
+
* result is computed in the normal way. For both too-early and too-late years, the
|
|
88
|
+
* warning status is +1. This is distinct from the error status -1, which signifies a year
|
|
89
|
+
* so early that JD could not be computed. "Too early" is before the first year of the
|
|
90
|
+
* table in use.
|
|
91
|
+
* 2. If the specified date is for a day which ends with a leap second, the TAI-UTC value
|
|
92
|
+
* returned is for the period leading up to the leap second. If the date is for a day
|
|
93
|
+
* which begins as a leap second ends, the TAI-UTC returned is for the period following
|
|
94
|
+
* the leap second.
|
|
95
|
+
* 3. The day number must be in the normal calendar range, for example 1 through 30 for
|
|
96
|
+
* April. The "almanac" convention of allowing such dates as January 0 and December 32 is
|
|
97
|
+
* not supported in this function, in order to avoid confusion near leap seconds.
|
|
98
|
+
* 4. The fraction of day is used only for dates before the introduction of leap seconds, the
|
|
99
|
+
* first of which occurred at the end of 1971. It is tested for validity (0 to 1 is the
|
|
100
|
+
* valid range) even if not used; if invalid, zero is used and status -4 is returned. For
|
|
101
|
+
* many applications, setting fd to zero is acceptable; the resulting error is always less
|
|
102
|
+
* than 3 ms (and occurs only pre-1972).
|
|
103
|
+
* 5. The status value returned in the case where there are multiple errors refers to the
|
|
104
|
+
* first error detected. For example, if the month and day are 13 and 32 respectively,
|
|
105
|
+
* status -2 (bad month) will be returned. The "internal error" status refers to a case
|
|
106
|
+
* that is impossible with the built-in table.
|
|
107
|
+
* 6. In cases where a valid result is not available, zero is returned.
|
|
108
|
+
* 7. The pre-1972 drift applies to the first 14 rows of the table in use, whatever it holds:
|
|
109
|
+
* a replacement table (setLeapSeconds) must keep the built-in table's first 14 rows.
|
|
110
|
+
*
|
|
111
|
+
* References:
|
|
112
|
+
* - For dates from 1961 January 1 onwards, the expressions from the file
|
|
113
|
+
* ftp://maia.usno.navy.mil/ser7/tai-utc.dat are used.
|
|
114
|
+
* - The 5ms timestep at 1961 January 1 is taken from 2.58.1 (p87) of the 1992 Explanatory
|
|
115
|
+
* Supplement.
|
|
116
|
+
*
|
|
117
|
+
* @param iy UTC: year (Notes 1 and 2)
|
|
118
|
+
* @param im month (Note 2)
|
|
119
|
+
* @param id day (Notes 2 and 3)
|
|
120
|
+
* @param fd fraction of day (Note 4)
|
|
121
|
+
* @returns [deltat, status]: TAI minus UTC in seconds, and status (Note 5): 1 = dubious
|
|
122
|
+
* year (Note 1), 0 = OK, -1 = bad year, -2 = bad month, -3 = bad day (Note 3), -4 = bad
|
|
123
|
+
* fraction (Note 4), -5 = internal error (Note 5)
|
|
124
|
+
*/
|
|
125
|
+
export function dat(iy, im, id, fd) {
|
|
126
|
+
// Get/initialise leap-second if needed
|
|
127
|
+
const [NDAT, changes] = datini(_changes, _NDAT);
|
|
128
|
+
// Miscellaneous local variables
|
|
129
|
+
let i;
|
|
130
|
+
// Initialize the result to zero.
|
|
131
|
+
let da = 0.0;
|
|
132
|
+
let deltat = da;
|
|
133
|
+
// If invalid fraction of a day, set error status and give up.
|
|
134
|
+
if (fd < 0.0 || fd > 1.0)
|
|
135
|
+
return [deltat, -4];
|
|
136
|
+
// Convert the date into an MJD.
|
|
137
|
+
const [, djm, js] = cal2jd(iy, im, id);
|
|
138
|
+
let j = js;
|
|
139
|
+
// If invalid year, month, or day, give up.
|
|
140
|
+
if (j < 0)
|
|
141
|
+
return [deltat, j];
|
|
142
|
+
// If pre-UTC year, set warning status and give up.
|
|
143
|
+
if (iy < changes[0].iyear)
|
|
144
|
+
return [deltat, 1];
|
|
145
|
+
// If suspiciously late year, set warning status but proceed.
|
|
146
|
+
if (iy > IYV + 5)
|
|
147
|
+
j = 1;
|
|
148
|
+
// Combine year and month to form a date-ordered integer...
|
|
149
|
+
const m = 12 * iy + im;
|
|
150
|
+
// ...and use it to find the preceding table entry.
|
|
151
|
+
for (i = NDAT - 1; i >= 0; i--) {
|
|
152
|
+
if (m >= 12 * changes[i].iyear + changes[i].month)
|
|
153
|
+
break;
|
|
154
|
+
}
|
|
155
|
+
// Prevent underflow warnings.
|
|
156
|
+
if (i < 0)
|
|
157
|
+
return [deltat, -5];
|
|
158
|
+
// Get the Delta(AT).
|
|
159
|
+
da = changes[i].delat;
|
|
160
|
+
// If pre-1972, adjust for drift.
|
|
161
|
+
if (i < NERA1)
|
|
162
|
+
da += (djm + fd - drift[i][0]) * drift[i][1];
|
|
163
|
+
// Return the Delta(AT) value.
|
|
164
|
+
deltat = da;
|
|
165
|
+
// Return the status.
|
|
166
|
+
return [deltat, j];
|
|
167
|
+
}
|
|
168
|
+
//# sourceMappingURL=dat.js.map
|
package/dist/dat.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dat.js","sourceRoot":"","sources":["../src/dat.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAGpC,0CAA0C;AAC1C,MAAM,GAAG,GAAG,IAAI,CAAA;AAEhB,kEAAkE;AAClE,MAAM,KAAK,GAA2C;IACpD,CAAC,OAAO,EAAE,SAAS,CAAC;IACpB,CAAC,OAAO,EAAE,SAAS,CAAC;IACpB,CAAC,OAAO,EAAE,SAAS,CAAC;IACpB,CAAC,OAAO,EAAE,SAAS,CAAC;IACpB,CAAC,OAAO,EAAE,S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MAAM,EAAE,CAAC,CAAC,CAAA;IAE9C,6DAA6D;IAC7D,IAAI,EAAE,GAAG,GAAG,GAAG,CAAC;QAAE,CAAC,GAAG,CAAC,CAAA;IAEvB,2DAA2D;IAC3D,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAA;IAEtB,mDAAmD;IACnD,KAAK,CAAC,GAAG,IAAI,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC/B,IAAI,CAAC,IAAI,EAAE,GAAG,OAAO,CAAC,CAAC,CAAE,CAAC,KAAK,GAAG,OAAO,CAAC,CAAC,CAAE,CAAC,KAAK;YAAE,MAAK;IAC5D,CAAC;IAED,8BAA8B;IAC9B,IAAI,CAAC,GAAG,CAAC;QAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAA;IAE9B,qBAAqB;IACrB,EAAE,GAAG,OAAO,CAAC,CAAC,CAAE,CAAC,KAAK,CAAA;IAEtB,iCAAiC;IACjC,IAAI,CAAC,GAAG,KAAK;QAAE,EAAE,IAAI,CAAC,GAAG,GAAG,EAAE,GAAG,KAAK,CAAC,CAAC,CAAE,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAE,CAAC,CAAC,CAAC,CAAA;IAE7D,8BAA8B;IAC9B,MAAM,GAAG,EAAE,CAAA;IAEX,qBAAqB;IACrB,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,CAAA;AACpB,CAAC"}
|
package/dist/datini.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A row of a leap-second table (eraLEAPSECOND): from the start of month `month` of year
|
|
3
|
+
* `iyear`, TAI-UTC is `delat` seconds. Before 1972, dat adds a drift to the first rows.
|
|
4
|
+
*/
|
|
5
|
+
export type LeapSecond = {
|
|
6
|
+
iyear: number;
|
|
7
|
+
month: number;
|
|
8
|
+
delat: number;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* eraSetLeapSeconds: use this table. A count <= 0 causes a reset of the table to the
|
|
12
|
+
* built-in version. No sanity checks are performed.
|
|
13
|
+
*/
|
|
14
|
+
export declare function setTable(leapseconds: readonly LeapSecond[], count: number): void;
|
|
15
|
+
/** The table in use and its number of entries, as eraGetLeapSeconds reads them. */
|
|
16
|
+
export declare function getTable(): [NDAT: number, leapseconds: readonly LeapSecond[]];
|
|
17
|
+
/**
|
|
18
|
+
* Get the leap second table, initializing it to the built-in version if necessary. For dat
|
|
19
|
+
* only.
|
|
20
|
+
*
|
|
21
|
+
* @param builtin the built-in table
|
|
22
|
+
* @param nBuiltin its number of entries
|
|
23
|
+
* @returns [NDAT, leapseconds]: the number of entries, and the table in use
|
|
24
|
+
*/
|
|
25
|
+
export declare function datini(builtin: readonly LeapSecond[], nBuiltin: number): [NDAT: number, leapseconds: readonly LeapSecond[]];
|
|
26
|
+
//# sourceMappingURL=datini.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"datini.d.ts","sourceRoot":"","sources":["../src/datini.ts"],"names":[],"mappings":"AAOA;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAOxE;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,WAAW,EAAE,SAAS,UAAU,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAGhF;AAED,mFAAmF;AACnF,wBAAgB,QAAQ,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,UAAU,EAAE,CAAC,CAE7E;AAED;;;;;;;GAOG;AACH,wBAAgB,MAAM,CACpB,OAAO,EAAE,SAAS,UAAU,EAAE,EAC9B,QAAQ,EAAE,MAAM,GACf,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,UAAU,EAAE,CAAC,CAKpD"}
|
package/dist/datini.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// Translated from ERFA 2.0.1 eraDatini, with the table eraSetLeapSeconds sets and
|
|
2
|
+
// eraGetLeapSeconds reads (erfadatextra.c, not derived from SOFA); see LICENSE.
|
|
3
|
+
//
|
|
4
|
+
// Internal: the leap-second table in use. dat reads it through datini; leap-seconds.ts gets
|
|
5
|
+
// and sets it. Kept apart from both so that dat and leap-seconds.ts don't import each other.
|
|
6
|
+
// Not exported from the package, except the LeapSecond type.
|
|
7
|
+
// The table in use and its number of entries. NDAT <= 0 means the built-in table, which
|
|
8
|
+
// datini installs on dat's next call.
|
|
9
|
+
let changes = [];
|
|
10
|
+
let NDAT = -1;
|
|
11
|
+
/**
|
|
12
|
+
* eraSetLeapSeconds: use this table. A count <= 0 causes a reset of the table to the
|
|
13
|
+
* built-in version. No sanity checks are performed.
|
|
14
|
+
*/
|
|
15
|
+
export function setTable(leapseconds, count) {
|
|
16
|
+
changes = leapseconds;
|
|
17
|
+
NDAT = count;
|
|
18
|
+
}
|
|
19
|
+
/** The table in use and its number of entries, as eraGetLeapSeconds reads them. */
|
|
20
|
+
export function getTable() {
|
|
21
|
+
return [NDAT, changes];
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Get the leap second table, initializing it to the built-in version if necessary. For dat
|
|
25
|
+
* only.
|
|
26
|
+
*
|
|
27
|
+
* @param builtin the built-in table
|
|
28
|
+
* @param nBuiltin its number of entries
|
|
29
|
+
* @returns [NDAT, leapseconds]: the number of entries, and the table in use
|
|
30
|
+
*/
|
|
31
|
+
export function datini(builtin, nBuiltin) {
|
|
32
|
+
if (NDAT <= 0) {
|
|
33
|
+
setTable(builtin, nBuiltin);
|
|
34
|
+
}
|
|
35
|
+
return [NDAT, changes];
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=datini.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"datini.js","sourceRoot":"","sources":["../src/datini.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,gFAAgF;AAChF,EAAE;AACF,4FAA4F;AAC5F,6FAA6F;AAC7F,6DAA6D;AAQ7D,wFAAwF;AACxF,sCAAsC;AACtC,IAAI,OAAO,GAA0B,EAAE,CAAA;AACvC,IAAI,IAAI,GAAG,CAAC,CAAC,CAAA;AAEb;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,WAAkC,EAAE,KAAa;IACxE,OAAO,GAAG,WAAW,CAAA;IACrB,IAAI,GAAG,KAAK,CAAA;AACd,CAAC;AAED,mFAAmF;AACnF,MAAM,UAAU,QAAQ;IACtB,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;AACxB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,MAAM,CACpB,OAA8B,EAC9B,QAAgB;IAEhB,IAAI,IAAI,IAAI,CAAC,EAAE,CAAC;QACd,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;IAC7B,CAAC;IACD,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;AACxB,CAAC"}
|
package/dist/dtdb.d.ts
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An approximation to TDB-TT, the difference between barycentric dynamical time and
|
|
3
|
+
* terrestrial time, for an observer on the Earth.
|
|
4
|
+
*
|
|
5
|
+
* The different time scales - proper, coordinate and realized - are related to each other:
|
|
6
|
+
*
|
|
7
|
+
* TAI <- physically realized
|
|
8
|
+
* :
|
|
9
|
+
* offset <- observed (nominally +32.184s)
|
|
10
|
+
* :
|
|
11
|
+
* TT <- terrestrial time
|
|
12
|
+
* :
|
|
13
|
+
* rate adjustment (L_G) <- definition of TT
|
|
14
|
+
* :
|
|
15
|
+
* TCG <- time scale for GCRS
|
|
16
|
+
* :
|
|
17
|
+
* "periodic" terms <- dtdb is an implementation
|
|
18
|
+
* :
|
|
19
|
+
* rate adjustment (L_C) <- function of solar-system ephemeris
|
|
20
|
+
* :
|
|
21
|
+
* TCB <- time scale for BCRS
|
|
22
|
+
* :
|
|
23
|
+
* rate adjustment (-L_B) <- definition of TDB
|
|
24
|
+
* :
|
|
25
|
+
* TDB <- TCB scaled to track TT
|
|
26
|
+
* :
|
|
27
|
+
* "periodic" terms <- -dtdb is an approximation
|
|
28
|
+
* :
|
|
29
|
+
* TT <- terrestrial time
|
|
30
|
+
*
|
|
31
|
+
* Adopted values for the various constants can be found in the IERS Conventions (McCarthy &
|
|
32
|
+
* Petit 2003).
|
|
33
|
+
*
|
|
34
|
+
* Notes:
|
|
35
|
+
* 1. The date date1+date2 is a Julian Date, apportioned in any convenient way between the
|
|
36
|
+
* two arguments. For example, JD(TT)=2450123.7 could be given as (2450123.7, 0.0), the JD
|
|
37
|
+
* method; (2451545.0, -1421.3), the J2000 method; (2400000.5, 50123.2), the MJD method;
|
|
38
|
+
* or (2450123.5, 0.2), the date and time method. The J2000 method is best matched to the
|
|
39
|
+
* way the argument is handled internally and will deliver the optimum resolution.
|
|
40
|
+
* Although the date is, formally, barycentric dynamical time (TDB), the terrestrial
|
|
41
|
+
* dynamical time (TT) can be used with no practical effect on the accuracy of the
|
|
42
|
+
* prediction.
|
|
43
|
+
* 2. TT can be regarded as a coordinate time that is realized as an offset of 32.184s from
|
|
44
|
+
* International Atomic Time, TAI. TT is a specific linear transformation of geocentric
|
|
45
|
+
* coordinate time TCG, which is the time scale for the Geocentric Celestial Reference
|
|
46
|
+
* System, GCRS.
|
|
47
|
+
* 3. TDB is a coordinate time, and is a specific linear transformation of barycentric
|
|
48
|
+
* coordinate time TCB, which is the time scale for the Barycentric Celestial Reference
|
|
49
|
+
* System, BCRS.
|
|
50
|
+
* 4. The difference TCG-TCB depends on the masses and positions of the bodies of the solar
|
|
51
|
+
* system and the velocity of the Earth. It is dominated by a rate difference, the
|
|
52
|
+
* residual being of a periodic character. The latter, which is modeled by the present
|
|
53
|
+
* function, comprises a main (annual) sinusoidal term of amplitude approximately 0.00166
|
|
54
|
+
* seconds, plus planetary terms up to about 20 microseconds, and lunar and diurnal terms
|
|
55
|
+
* up to 2 microseconds. These effects come from the changing transverse Doppler effect
|
|
56
|
+
* and gravitational red-shift as the observer (on the Earth's surface) experiences
|
|
57
|
+
* variations in speed (with respect to the BCRS) and gravitational potential.
|
|
58
|
+
* 5. TDB can be regarded as the same as TCB but with a rate adjustment to keep it close to
|
|
59
|
+
* TT, which is convenient for many applications. The history of successive attempts to
|
|
60
|
+
* define TDB is set out in Resolution 3 adopted by the IAU General Assembly in 2006,
|
|
61
|
+
* which defines a fixed TDB(TCB) transformation that is consistent with contemporary
|
|
62
|
+
* solar-system ephemerides. Future ephemerides will imply slightly changed
|
|
63
|
+
* transformations between TCG and TCB, which could introduce a linear drift between TDB
|
|
64
|
+
* and TT; however, any such drift is unlikely to exceed 1 nanosecond per century.
|
|
65
|
+
* 6. The geocentric TDB-TT model used in the present function is that of Fairhead &
|
|
66
|
+
* Bretagnon (1990), in its full form. It was originally supplied by Fairhead (private
|
|
67
|
+
* communications with P.T.Wallace, 1990) as a Fortran subroutine. The present function
|
|
68
|
+
* contains an adaptation of the Fairhead code. The numerical results are essentially
|
|
69
|
+
* unaffected by the changes, the differences with respect to the Fairhead & Bretagnon
|
|
70
|
+
* original being at the 1e-20 s level. The topocentric part of the model is from Moyer
|
|
71
|
+
* (1981) and Murray (1983), with fundamental arguments adapted from Simon et al. 1994. It
|
|
72
|
+
* is an approximation to the expression ( v / c ) . ( r / c ), where v is the
|
|
73
|
+
* barycentric velocity of the Earth, r is the geocentric position of the observer and c
|
|
74
|
+
* is the speed of light. By supplying zeroes for u and v, the topocentric part of the
|
|
75
|
+
* model can be nullified, and the function will return the Fairhead & Bretagnon result
|
|
76
|
+
* alone.
|
|
77
|
+
* 7. During the interval 1950-2050, the absolute accuracy is better than +/- 3 nanoseconds
|
|
78
|
+
* relative to time ephemerides obtained by direct numerical integrations based on the
|
|
79
|
+
* JPL DE405 solar system ephemeris.
|
|
80
|
+
* 8. It must be stressed that the present function is merely a model, and that numerical
|
|
81
|
+
* integration of solar-system ephemerides is the definitive method for predicting the
|
|
82
|
+
* relationship between TCG and TCB and hence between TT and TDB.
|
|
83
|
+
*
|
|
84
|
+
* References:
|
|
85
|
+
* - Fairhead, L., & Bretagnon, P., Astron.Astrophys., 229, 240-247 (1990).
|
|
86
|
+
* - IAU 2006 Resolution 3.
|
|
87
|
+
* - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), IERS Technical Note No. 32,
|
|
88
|
+
* BKG (2004)
|
|
89
|
+
* - Moyer, T.D., Cel.Mech., 23, 33 (1981).
|
|
90
|
+
* - Murray, C.A., Vectorial Astrometry, Adam Hilger (1983).
|
|
91
|
+
* - Seidelmann, P.K. et al., Explanatory Supplement to the Astronomical Almanac, Chapter 2,
|
|
92
|
+
* University Science Books (1992).
|
|
93
|
+
* - Simon, J.L., Bretagnon, P., Chapront, J., Chapront-Touze, M., Francou, G. & Laskar, J.,
|
|
94
|
+
* Astron.Astrophys., 282, 663-683 (1994).
|
|
95
|
+
*
|
|
96
|
+
* @param date1 date, TDB (Notes 1-3)
|
|
97
|
+
* @param date2 date, TDB (Notes 1-3)
|
|
98
|
+
* @param ut universal time (UT1, fraction of one day)
|
|
99
|
+
* @param elong longitude (east positive, radians)
|
|
100
|
+
* @param u distance from Earth spin axis (km)
|
|
101
|
+
* @param v distance north of equatorial plane (km)
|
|
102
|
+
* @returns TDB-TT (seconds)
|
|
103
|
+
*/
|
|
104
|
+
export declare function dtdb(date1: number, date2: number, ut: number, elong: number, u: number, v: number): number;
|
|
105
|
+
//# sourceMappingURL=dtdb.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dtdb.d.ts","sourceRoot":"","sources":["../src/dtdb.ts"],"names":[],"mappings":"AAi4BA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsGG;AACH,wBAAgB,IAAI,CAClB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,EACb,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,GACR,MAAM,CAsGR"}
|