@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/tttai.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Time scale transformation: Terrestrial Time, TT, to International Atomic Time, TAI.
|
|
3
|
+
*
|
|
4
|
+
* Note: tt1+tt2 is Julian Date, apportioned in any convenient way between the two arguments,
|
|
5
|
+
* for example where tt1 is the Julian Day Number and tt2 is the fraction of a day. The
|
|
6
|
+
* returned tai1,tai2 follow suit.
|
|
7
|
+
*
|
|
8
|
+
* References:
|
|
9
|
+
* - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), IERS Technical Note No. 32,
|
|
10
|
+
* BKG (2004)
|
|
11
|
+
* - Explanatory Supplement to the Astronomical Almanac, P. Kenneth Seidelmann (ed),
|
|
12
|
+
* University Science Books (1992)
|
|
13
|
+
*
|
|
14
|
+
* @param tt1 TT as a 2-part Julian Date
|
|
15
|
+
* @param tt2 TT as a 2-part Julian Date
|
|
16
|
+
* @returns [tai1, tai2, status]: TAI as a 2-part Julian Date, and status: 0 = OK
|
|
17
|
+
*/
|
|
18
|
+
export declare function tttai(tt1: number, tt2: number): [tai1: number, tai2: number, status: number];
|
|
19
|
+
//# sourceMappingURL=tttai.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tttai.d.ts","sourceRoot":"","sources":["../src/tttai.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAc5F"}
|
package/dist/tttai.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// Translated from ERFA 2.0.1 eraTttai (tttai.c); see LICENSE.
|
|
2
|
+
import { DAYSEC, TTMTAI } from './constants.js';
|
|
3
|
+
// TT minus TAI (days).
|
|
4
|
+
const dtat = TTMTAI / DAYSEC;
|
|
5
|
+
/**
|
|
6
|
+
* Time scale transformation: Terrestrial Time, TT, to International Atomic Time, TAI.
|
|
7
|
+
*
|
|
8
|
+
* Note: tt1+tt2 is Julian Date, apportioned in any convenient way between the two arguments,
|
|
9
|
+
* for example where tt1 is the Julian Day Number and tt2 is the fraction of a day. The
|
|
10
|
+
* returned tai1,tai2 follow suit.
|
|
11
|
+
*
|
|
12
|
+
* References:
|
|
13
|
+
* - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), IERS Technical Note No. 32,
|
|
14
|
+
* BKG (2004)
|
|
15
|
+
* - Explanatory Supplement to the Astronomical Almanac, P. Kenneth Seidelmann (ed),
|
|
16
|
+
* University Science Books (1992)
|
|
17
|
+
*
|
|
18
|
+
* @param tt1 TT as a 2-part Julian Date
|
|
19
|
+
* @param tt2 TT as a 2-part Julian Date
|
|
20
|
+
* @returns [tai1, tai2, status]: TAI as a 2-part Julian Date, and status: 0 = OK
|
|
21
|
+
*/
|
|
22
|
+
export function tttai(tt1, tt2) {
|
|
23
|
+
let tai1, tai2;
|
|
24
|
+
// Result, safeguarding precision.
|
|
25
|
+
if (Math.abs(tt1) > Math.abs(tt2)) {
|
|
26
|
+
tai1 = tt1;
|
|
27
|
+
tai2 = tt2 - dtat;
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
tai1 = tt1 - dtat;
|
|
31
|
+
tai2 = tt2;
|
|
32
|
+
}
|
|
33
|
+
// Status (always OK).
|
|
34
|
+
return [tai1, tai2, 0];
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=tttai.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tttai.js","sourceRoot":"","sources":["../src/tttai.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAE/C,uBAAuB;AACvB,MAAM,IAAI,GAAG,MAAM,GAAG,MAAM,CAAA;AAE5B;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,KAAK,CAAC,GAAW,EAAE,GAAW;IAC5C,IAAI,IAAY,EAAE,IAAY,CAAA;IAE9B,kCAAkC;IAClC,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;QAClC,IAAI,GAAG,GAAG,CAAA;QACV,IAAI,GAAG,GAAG,GAAG,IAAI,CAAA;IACnB,CAAC;SAAM,CAAC;QACN,IAAI,GAAG,GAAG,GAAG,IAAI,CAAA;QACjB,IAAI,GAAG,GAAG,CAAA;IACZ,CAAC;IAED,sBAAsB;IACtB,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;AACxB,CAAC"}
|
package/dist/tttcg.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Time scale transformation: Terrestrial Time, TT, to Geocentric Coordinate Time, TCG.
|
|
3
|
+
*
|
|
4
|
+
* Note: tt1+tt2 is Julian Date, apportioned in any convenient way between the two arguments,
|
|
5
|
+
* for example where tt1 is the Julian Day Number and tt2 is the fraction of a day. The
|
|
6
|
+
* returned tcg1,tcg2 follow suit.
|
|
7
|
+
*
|
|
8
|
+
* References:
|
|
9
|
+
* - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), IERS Technical Note No. 32,
|
|
10
|
+
* BKG (2004)
|
|
11
|
+
* - IAU 2000 Resolution B1.9
|
|
12
|
+
*
|
|
13
|
+
* @param tt1 TT as a 2-part Julian Date
|
|
14
|
+
* @param tt2 TT as a 2-part Julian Date
|
|
15
|
+
* @returns [tcg1, tcg2, status]: TCG as a 2-part Julian Date, and status: 0 = OK
|
|
16
|
+
*/
|
|
17
|
+
export declare function tttcg(tt1: number, tt2: number): [tcg1: number, tcg2: number, status: number];
|
|
18
|
+
//# sourceMappingURL=tttcg.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tttcg.d.ts","sourceRoot":"","sources":["../src/tttcg.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAc5F"}
|
package/dist/tttcg.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// Translated from ERFA 2.0.1 eraTttcg (tttcg.c); see LICENSE.
|
|
2
|
+
import { DAYSEC, DJM0, DJM77, ELG, TTMTAI } from './constants.js';
|
|
3
|
+
// 1977 Jan 1 00:00:32.184 TT, as MJD
|
|
4
|
+
const t77t = DJM77 + TTMTAI / DAYSEC;
|
|
5
|
+
// TT to TCG rate
|
|
6
|
+
const elgg = ELG / (1.0 - ELG);
|
|
7
|
+
/**
|
|
8
|
+
* Time scale transformation: Terrestrial Time, TT, to Geocentric Coordinate Time, TCG.
|
|
9
|
+
*
|
|
10
|
+
* Note: tt1+tt2 is Julian Date, apportioned in any convenient way between the two arguments,
|
|
11
|
+
* for example where tt1 is the Julian Day Number and tt2 is the fraction of a day. The
|
|
12
|
+
* returned tcg1,tcg2 follow suit.
|
|
13
|
+
*
|
|
14
|
+
* References:
|
|
15
|
+
* - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), IERS Technical Note No. 32,
|
|
16
|
+
* BKG (2004)
|
|
17
|
+
* - IAU 2000 Resolution B1.9
|
|
18
|
+
*
|
|
19
|
+
* @param tt1 TT as a 2-part Julian Date
|
|
20
|
+
* @param tt2 TT as a 2-part Julian Date
|
|
21
|
+
* @returns [tcg1, tcg2, status]: TCG as a 2-part Julian Date, and status: 0 = OK
|
|
22
|
+
*/
|
|
23
|
+
export function tttcg(tt1, tt2) {
|
|
24
|
+
let tcg1, tcg2;
|
|
25
|
+
// Result, safeguarding precision.
|
|
26
|
+
if (Math.abs(tt1) > Math.abs(tt2)) {
|
|
27
|
+
tcg1 = tt1;
|
|
28
|
+
tcg2 = tt2 + ((tt1 - DJM0) + (tt2 - t77t)) * elgg;
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
tcg1 = tt1 + ((tt2 - DJM0) + (tt1 - t77t)) * elgg;
|
|
32
|
+
tcg2 = tt2;
|
|
33
|
+
}
|
|
34
|
+
// Status (always OK).
|
|
35
|
+
return [tcg1, tcg2, 0];
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=tttcg.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tttcg.js","sourceRoot":"","sources":["../src/tttcg.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAEjE,qCAAqC;AACrC,MAAM,IAAI,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAA;AAEpC,iBAAiB;AACjB,MAAM,IAAI,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,CAAA;AAE9B;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,KAAK,CAAC,GAAW,EAAE,GAAW;IAC5C,IAAI,IAAY,EAAE,IAAY,CAAA;IAE9B,kCAAkC;IAClC,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;QAClC,IAAI,GAAG,GAAG,CAAA;QACV,IAAI,GAAG,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC,GAAG,IAAI,CAAA;IACnD,CAAC;SAAM,CAAC;QACN,IAAI,GAAG,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC,GAAG,IAAI,CAAA;QACjD,IAAI,GAAG,GAAG,CAAA;IACZ,CAAC;IAED,sBAAsB;IACtB,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;AACxB,CAAC"}
|
package/dist/tttdb.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Time scale transformation: Terrestrial Time, TT, to Barycentric Dynamical Time, TDB.
|
|
3
|
+
*
|
|
4
|
+
* Notes:
|
|
5
|
+
* 1. tt1+tt2 is Julian Date, apportioned in any convenient way between the two arguments,
|
|
6
|
+
* for example where tt1 is the Julian Day Number and tt2 is the fraction of a day. The
|
|
7
|
+
* returned tdb1,tdb2 follow suit.
|
|
8
|
+
* 2. The argument dtr represents the quasi-periodic component of the GR transformation
|
|
9
|
+
* between TT and TCB. It is dependent upon the adopted solar-system ephemeris, and can be
|
|
10
|
+
* obtained by numerical integration, by interrogating a precomputed time ephemeris or by
|
|
11
|
+
* evaluating a model such as that implemented in the ERFA function dtdb. The quantity is
|
|
12
|
+
* dominated by an annual term of 1.7 ms amplitude.
|
|
13
|
+
* 3. TDB is essentially the same as Teph, the time argument for the JPL solar system
|
|
14
|
+
* ephemerides.
|
|
15
|
+
*
|
|
16
|
+
* References:
|
|
17
|
+
* - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), IERS Technical Note No. 32,
|
|
18
|
+
* BKG (2004)
|
|
19
|
+
* - IAU 2006 Resolution 3
|
|
20
|
+
*
|
|
21
|
+
* @param tt1 TT as a 2-part Julian Date
|
|
22
|
+
* @param tt2 TT as a 2-part Julian Date
|
|
23
|
+
* @param dtr TDB-TT in seconds
|
|
24
|
+
* @returns [tdb1, tdb2, status]: TDB as a 2-part Julian Date, and status: 0 = OK
|
|
25
|
+
*/
|
|
26
|
+
export declare function tttdb(tt1: number, tt2: number, dtr: number): [tdb1: number, tdb2: number, status: number];
|
|
27
|
+
//# sourceMappingURL=tttdb.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tttdb.d.ts","sourceRoot":"","sources":["../src/tttdb.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,KAAK,CACnB,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,GACV,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAe9C"}
|
package/dist/tttdb.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// Translated from ERFA 2.0.1 eraTttdb (tttdb.c); see LICENSE.
|
|
2
|
+
import { DAYSEC } from './constants.js';
|
|
3
|
+
/**
|
|
4
|
+
* Time scale transformation: Terrestrial Time, TT, to Barycentric Dynamical Time, TDB.
|
|
5
|
+
*
|
|
6
|
+
* Notes:
|
|
7
|
+
* 1. tt1+tt2 is Julian Date, apportioned in any convenient way between the two arguments,
|
|
8
|
+
* for example where tt1 is the Julian Day Number and tt2 is the fraction of a day. The
|
|
9
|
+
* returned tdb1,tdb2 follow suit.
|
|
10
|
+
* 2. The argument dtr represents the quasi-periodic component of the GR transformation
|
|
11
|
+
* between TT and TCB. It is dependent upon the adopted solar-system ephemeris, and can be
|
|
12
|
+
* obtained by numerical integration, by interrogating a precomputed time ephemeris or by
|
|
13
|
+
* evaluating a model such as that implemented in the ERFA function dtdb. The quantity is
|
|
14
|
+
* dominated by an annual term of 1.7 ms amplitude.
|
|
15
|
+
* 3. TDB is essentially the same as Teph, the time argument for the JPL solar system
|
|
16
|
+
* ephemerides.
|
|
17
|
+
*
|
|
18
|
+
* References:
|
|
19
|
+
* - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), IERS Technical Note No. 32,
|
|
20
|
+
* BKG (2004)
|
|
21
|
+
* - IAU 2006 Resolution 3
|
|
22
|
+
*
|
|
23
|
+
* @param tt1 TT as a 2-part Julian Date
|
|
24
|
+
* @param tt2 TT as a 2-part Julian Date
|
|
25
|
+
* @param dtr TDB-TT in seconds
|
|
26
|
+
* @returns [tdb1, tdb2, status]: TDB as a 2-part Julian Date, and status: 0 = OK
|
|
27
|
+
*/
|
|
28
|
+
export function tttdb(tt1, tt2, dtr) {
|
|
29
|
+
let tdb1, tdb2;
|
|
30
|
+
// Result, safeguarding precision.
|
|
31
|
+
const dtrd = dtr / DAYSEC;
|
|
32
|
+
if (Math.abs(tt1) > Math.abs(tt2)) {
|
|
33
|
+
tdb1 = tt1;
|
|
34
|
+
tdb2 = tt2 + dtrd;
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
tdb1 = tt1 + dtrd;
|
|
38
|
+
tdb2 = tt2;
|
|
39
|
+
}
|
|
40
|
+
// Status (always OK).
|
|
41
|
+
return [tdb1, tdb2, 0];
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=tttdb.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tttdb.js","sourceRoot":"","sources":["../src/tttdb.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAEvC;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,KAAK,CACnB,GAAW,EACX,GAAW,EACX,GAAW;IAEX,IAAI,IAAY,EAAE,IAAY,CAAA;IAE9B,kCAAkC;IAClC,MAAM,IAAI,GAAG,GAAG,GAAG,MAAM,CAAA;IACzB,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;QAClC,IAAI,GAAG,GAAG,CAAA;QACV,IAAI,GAAG,GAAG,GAAG,IAAI,CAAA;IACnB,CAAC;SAAM,CAAC;QACN,IAAI,GAAG,GAAG,GAAG,IAAI,CAAA;QACjB,IAAI,GAAG,GAAG,CAAA;IACZ,CAAC;IAED,sBAAsB;IACtB,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;AACxB,CAAC"}
|
package/dist/ttut1.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Time scale transformation: Terrestrial Time, TT, to Universal Time, UT1.
|
|
3
|
+
*
|
|
4
|
+
* Notes:
|
|
5
|
+
* 1. tt1+tt2 is Julian Date, apportioned in any convenient way between the two arguments,
|
|
6
|
+
* for example where tt1 is the Julian Day Number and tt2 is the fraction of a day. The
|
|
7
|
+
* returned ut11,ut12 follow suit.
|
|
8
|
+
* 2. The argument dt is classical Delta T.
|
|
9
|
+
*
|
|
10
|
+
* Reference: Explanatory Supplement to the Astronomical Almanac, P. Kenneth Seidelmann
|
|
11
|
+
* (ed), University Science Books (1992)
|
|
12
|
+
*
|
|
13
|
+
* @param tt1 TT as a 2-part Julian Date
|
|
14
|
+
* @param tt2 TT as a 2-part Julian Date
|
|
15
|
+
* @param dt TT-UT1 in seconds
|
|
16
|
+
* @returns [ut11, ut12, status]: UT1 as a 2-part Julian Date, and status: 0 = OK
|
|
17
|
+
*/
|
|
18
|
+
export declare function ttut1(tt1: number, tt2: number, dt: number): [ut11: number, ut12: number, status: number];
|
|
19
|
+
//# sourceMappingURL=ttut1.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ttut1.d.ts","sourceRoot":"","sources":["../src/ttut1.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,KAAK,CACnB,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,EAAE,EAAE,MAAM,GACT,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAe9C"}
|
package/dist/ttut1.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Translated from ERFA 2.0.1 eraTtut1 (ttut1.c); see LICENSE.
|
|
2
|
+
import { DAYSEC } from './constants.js';
|
|
3
|
+
/**
|
|
4
|
+
* Time scale transformation: Terrestrial Time, TT, to Universal Time, UT1.
|
|
5
|
+
*
|
|
6
|
+
* Notes:
|
|
7
|
+
* 1. tt1+tt2 is Julian Date, apportioned in any convenient way between the two arguments,
|
|
8
|
+
* for example where tt1 is the Julian Day Number and tt2 is the fraction of a day. The
|
|
9
|
+
* returned ut11,ut12 follow suit.
|
|
10
|
+
* 2. The argument dt is classical Delta T.
|
|
11
|
+
*
|
|
12
|
+
* Reference: Explanatory Supplement to the Astronomical Almanac, P. Kenneth Seidelmann
|
|
13
|
+
* (ed), University Science Books (1992)
|
|
14
|
+
*
|
|
15
|
+
* @param tt1 TT as a 2-part Julian Date
|
|
16
|
+
* @param tt2 TT as a 2-part Julian Date
|
|
17
|
+
* @param dt TT-UT1 in seconds
|
|
18
|
+
* @returns [ut11, ut12, status]: UT1 as a 2-part Julian Date, and status: 0 = OK
|
|
19
|
+
*/
|
|
20
|
+
export function ttut1(tt1, tt2, dt) {
|
|
21
|
+
let ut11, ut12;
|
|
22
|
+
// Result, safeguarding precision.
|
|
23
|
+
const dtd = dt / DAYSEC;
|
|
24
|
+
if (Math.abs(tt1) > Math.abs(tt2)) {
|
|
25
|
+
ut11 = tt1;
|
|
26
|
+
ut12 = tt2 - dtd;
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
ut11 = tt1 - dtd;
|
|
30
|
+
ut12 = tt2;
|
|
31
|
+
}
|
|
32
|
+
// Status (always OK).
|
|
33
|
+
return [ut11, ut12, 0];
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=ttut1.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ttut1.js","sourceRoot":"","sources":["../src/ttut1.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAEvC;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,KAAK,CACnB,GAAW,EACX,GAAW,EACX,EAAU;IAEV,IAAI,IAAY,EAAE,IAAY,CAAA;IAE9B,kCAAkC;IAClC,MAAM,GAAG,GAAG,EAAE,GAAG,MAAM,CAAA;IACvB,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;QAClC,IAAI,GAAG,GAAG,CAAA;QACV,IAAI,GAAG,GAAG,GAAG,GAAG,CAAA;IAClB,CAAC;SAAM,CAAC;QACN,IAAI,GAAG,GAAG,GAAG,GAAG,CAAA;QAChB,IAAI,GAAG,GAAG,CAAA;IACZ,CAAC;IAED,sBAAsB;IACtB,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;AACxB,CAAC"}
|
package/dist/ut1tai.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Time scale transformation: Universal Time, UT1, to International Atomic Time, TAI.
|
|
3
|
+
*
|
|
4
|
+
* Notes:
|
|
5
|
+
* 1. ut11+ut12 is Julian Date, apportioned in any convenient way between the two arguments,
|
|
6
|
+
* for example where ut11 is the Julian Day Number and ut12 is the fraction of a day. The
|
|
7
|
+
* returned tai1,tai2 follow suit.
|
|
8
|
+
* 2. The argument dta, i.e. UT1-TAI, is an observed quantity, and is available from IERS
|
|
9
|
+
* tabulations.
|
|
10
|
+
*
|
|
11
|
+
* Reference: Explanatory Supplement to the Astronomical Almanac, P. Kenneth Seidelmann
|
|
12
|
+
* (ed), University Science Books (1992)
|
|
13
|
+
*
|
|
14
|
+
* @param ut11 UT1 as a 2-part Julian Date
|
|
15
|
+
* @param ut12 UT1 as a 2-part Julian Date
|
|
16
|
+
* @param dta UT1-TAI in seconds
|
|
17
|
+
* @returns [tai1, tai2, status]: TAI as a 2-part Julian Date, and status: 0 = OK
|
|
18
|
+
*/
|
|
19
|
+
export declare function ut1tai(ut11: number, ut12: number, dta: number): [tai1: number, tai2: number, status: number];
|
|
20
|
+
//# sourceMappingURL=ut1tai.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ut1tai.d.ts","sourceRoot":"","sources":["../src/ut1tai.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,MAAM,CACpB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,GACV,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAe9C"}
|
package/dist/ut1tai.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// Translated from ERFA 2.0.1 eraUt1tai (ut1tai.c); see LICENSE.
|
|
2
|
+
import { DAYSEC } from './constants.js';
|
|
3
|
+
/**
|
|
4
|
+
* Time scale transformation: Universal Time, UT1, to International Atomic Time, TAI.
|
|
5
|
+
*
|
|
6
|
+
* Notes:
|
|
7
|
+
* 1. ut11+ut12 is Julian Date, apportioned in any convenient way between the two arguments,
|
|
8
|
+
* for example where ut11 is the Julian Day Number and ut12 is the fraction of a day. The
|
|
9
|
+
* returned tai1,tai2 follow suit.
|
|
10
|
+
* 2. The argument dta, i.e. UT1-TAI, is an observed quantity, and is available from IERS
|
|
11
|
+
* tabulations.
|
|
12
|
+
*
|
|
13
|
+
* Reference: Explanatory Supplement to the Astronomical Almanac, P. Kenneth Seidelmann
|
|
14
|
+
* (ed), University Science Books (1992)
|
|
15
|
+
*
|
|
16
|
+
* @param ut11 UT1 as a 2-part Julian Date
|
|
17
|
+
* @param ut12 UT1 as a 2-part Julian Date
|
|
18
|
+
* @param dta UT1-TAI in seconds
|
|
19
|
+
* @returns [tai1, tai2, status]: TAI as a 2-part Julian Date, and status: 0 = OK
|
|
20
|
+
*/
|
|
21
|
+
export function ut1tai(ut11, ut12, dta) {
|
|
22
|
+
let tai1, tai2;
|
|
23
|
+
// Result, safeguarding precision.
|
|
24
|
+
const dtad = dta / DAYSEC;
|
|
25
|
+
if (Math.abs(ut11) > Math.abs(ut12)) {
|
|
26
|
+
tai1 = ut11;
|
|
27
|
+
tai2 = ut12 - dtad;
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
tai1 = ut11 - dtad;
|
|
31
|
+
tai2 = ut12;
|
|
32
|
+
}
|
|
33
|
+
// Status (always OK).
|
|
34
|
+
return [tai1, tai2, 0];
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=ut1tai.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ut1tai.js","sourceRoot":"","sources":["../src/ut1tai.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAEvC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,MAAM,CACpB,IAAY,EACZ,IAAY,EACZ,GAAW;IAEX,IAAI,IAAY,EAAE,IAAY,CAAA;IAE9B,kCAAkC;IAClC,MAAM,IAAI,GAAG,GAAG,GAAG,MAAM,CAAA;IACzB,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;QACpC,IAAI,GAAG,IAAI,CAAA;QACX,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;IACpB,CAAC;SAAM,CAAC;QACN,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;QAClB,IAAI,GAAG,IAAI,CAAA;IACb,CAAC;IAED,sBAAsB;IACtB,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;AACxB,CAAC"}
|
package/dist/ut1tt.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Time scale transformation: Universal Time, UT1, to Terrestrial Time, TT.
|
|
3
|
+
*
|
|
4
|
+
* Notes:
|
|
5
|
+
* 1. ut11+ut12 is Julian Date, apportioned in any convenient way between the two arguments,
|
|
6
|
+
* for example where ut11 is the Julian Day Number and ut12 is the fraction of a day. The
|
|
7
|
+
* returned tt1,tt2 follow suit.
|
|
8
|
+
* 2. The argument dt is classical Delta T.
|
|
9
|
+
*
|
|
10
|
+
* Reference: Explanatory Supplement to the Astronomical Almanac, P. Kenneth Seidelmann
|
|
11
|
+
* (ed), University Science Books (1992)
|
|
12
|
+
*
|
|
13
|
+
* @param ut11 UT1 as a 2-part Julian Date
|
|
14
|
+
* @param ut12 UT1 as a 2-part Julian Date
|
|
15
|
+
* @param dt TT-UT1 in seconds
|
|
16
|
+
* @returns [tt1, tt2, status]: TT as a 2-part Julian Date, and status: 0 = OK
|
|
17
|
+
*/
|
|
18
|
+
export declare function ut1tt(ut11: number, ut12: number, dt: number): [tt1: number, tt2: number, status: number];
|
|
19
|
+
//# sourceMappingURL=ut1tt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ut1tt.d.ts","sourceRoot":"","sources":["../src/ut1tt.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,KAAK,CACnB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,GACT,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAe5C"}
|
package/dist/ut1tt.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Translated from ERFA 2.0.1 eraUt1tt (ut1tt.c); see LICENSE.
|
|
2
|
+
import { DAYSEC } from './constants.js';
|
|
3
|
+
/**
|
|
4
|
+
* Time scale transformation: Universal Time, UT1, to Terrestrial Time, TT.
|
|
5
|
+
*
|
|
6
|
+
* Notes:
|
|
7
|
+
* 1. ut11+ut12 is Julian Date, apportioned in any convenient way between the two arguments,
|
|
8
|
+
* for example where ut11 is the Julian Day Number and ut12 is the fraction of a day. The
|
|
9
|
+
* returned tt1,tt2 follow suit.
|
|
10
|
+
* 2. The argument dt is classical Delta T.
|
|
11
|
+
*
|
|
12
|
+
* Reference: Explanatory Supplement to the Astronomical Almanac, P. Kenneth Seidelmann
|
|
13
|
+
* (ed), University Science Books (1992)
|
|
14
|
+
*
|
|
15
|
+
* @param ut11 UT1 as a 2-part Julian Date
|
|
16
|
+
* @param ut12 UT1 as a 2-part Julian Date
|
|
17
|
+
* @param dt TT-UT1 in seconds
|
|
18
|
+
* @returns [tt1, tt2, status]: TT as a 2-part Julian Date, and status: 0 = OK
|
|
19
|
+
*/
|
|
20
|
+
export function ut1tt(ut11, ut12, dt) {
|
|
21
|
+
let tt1, tt2;
|
|
22
|
+
// Result, safeguarding precision.
|
|
23
|
+
const dtd = dt / DAYSEC;
|
|
24
|
+
if (Math.abs(ut11) > Math.abs(ut12)) {
|
|
25
|
+
tt1 = ut11;
|
|
26
|
+
tt2 = ut12 + dtd;
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
tt1 = ut11 + dtd;
|
|
30
|
+
tt2 = ut12;
|
|
31
|
+
}
|
|
32
|
+
// Status (always OK).
|
|
33
|
+
return [tt1, tt2, 0];
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=ut1tt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ut1tt.js","sourceRoot":"","sources":["../src/ut1tt.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAEvC;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,KAAK,CACnB,IAAY,EACZ,IAAY,EACZ,EAAU;IAEV,IAAI,GAAW,EAAE,GAAW,CAAA;IAE5B,kCAAkC;IAClC,MAAM,GAAG,GAAG,EAAE,GAAG,MAAM,CAAA;IACvB,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;QACpC,GAAG,GAAG,IAAI,CAAA;QACV,GAAG,GAAG,IAAI,GAAG,GAAG,CAAA;IAClB,CAAC;SAAM,CAAC;QACN,GAAG,GAAG,IAAI,GAAG,GAAG,CAAA;QAChB,GAAG,GAAG,IAAI,CAAA;IACZ,CAAC;IAED,sBAAsB;IACtB,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,CAAA;AACtB,CAAC"}
|
package/dist/ut1utc.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Time scale transformation: Universal Time, UT1, to Coordinated Universal Time, UTC.
|
|
3
|
+
*
|
|
4
|
+
* Notes:
|
|
5
|
+
* 1. ut11+ut12 is Julian Date, apportioned in any convenient way between the two arguments,
|
|
6
|
+
* for example where ut11 is the Julian Day Number and ut12 is the fraction of a day. The
|
|
7
|
+
* returned utc1 and utc2 form an analogous pair, except that a special convention is
|
|
8
|
+
* used, to deal with the problem of leap seconds - see Note 3.
|
|
9
|
+
* 2. Delta UT1 can be obtained from tabulations provided by the International Earth Rotation
|
|
10
|
+
* and Reference Systems Service. The value changes abruptly by 1s at a leap second;
|
|
11
|
+
* however, close to a leap second the algorithm used here is tolerant of the "wrong"
|
|
12
|
+
* choice of value being made.
|
|
13
|
+
* 3. JD cannot unambiguously represent UTC during a leap second unless special measures are
|
|
14
|
+
* taken. The convention in the present function is that the returned quasi-JD utc1+utc2
|
|
15
|
+
* represents UTC days whether the length is 86399, 86400 or 86401 SI seconds.
|
|
16
|
+
* 4. The function d2dtf can be used to transform the UTC quasi-JD into calendar date and
|
|
17
|
+
* clock time, including UTC leap second handling.
|
|
18
|
+
* 5. The warning status "dubious year" flags UTCs that predate the introduction of the time
|
|
19
|
+
* scale or that are too far in the future to be trusted. See dat for further details.
|
|
20
|
+
* 6. Where the status is negative, utc1 and utc2 are NaN.
|
|
21
|
+
*
|
|
22
|
+
* References:
|
|
23
|
+
* - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), IERS Technical Note No. 32,
|
|
24
|
+
* BKG (2004)
|
|
25
|
+
* - Explanatory Supplement to the Astronomical Almanac, P. Kenneth Seidelmann (ed),
|
|
26
|
+
* University Science Books (1992)
|
|
27
|
+
*
|
|
28
|
+
* @param ut11 UT1 as a 2-part Julian Date (Note 1)
|
|
29
|
+
* @param ut12 UT1 as a 2-part Julian Date (Note 1)
|
|
30
|
+
* @param dut1 Delta UT1: UT1-UTC in seconds (Note 2)
|
|
31
|
+
* @returns [utc1, utc2, status]: UTC as a 2-part quasi Julian Date (Notes 3, 4), and status:
|
|
32
|
+
* +1 = dubious year (Note 5), 0 = OK, -1 = unacceptable date
|
|
33
|
+
*/
|
|
34
|
+
export declare function ut1utc(ut11: number, ut12: number, dut1: number): [utc1: number, utc2: number, status: number];
|
|
35
|
+
//# sourceMappingURL=ut1utc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ut1utc.d.ts","sourceRoot":"","sources":["../src/ut1utc.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,MAAM,CACpB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GACX,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAuE9C"}
|
package/dist/ut1utc.js
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
// Translated from ERFA 2.0.1 eraUt1utc (ut1utc.c); see LICENSE.
|
|
2
|
+
import { cal2jd } from './cal2jd.js';
|
|
3
|
+
import { DAYSEC } from './constants.js';
|
|
4
|
+
import { dat } from './dat.js';
|
|
5
|
+
import { jd2cal } from './jd2cal.js';
|
|
6
|
+
/**
|
|
7
|
+
* Time scale transformation: Universal Time, UT1, to Coordinated Universal Time, UTC.
|
|
8
|
+
*
|
|
9
|
+
* Notes:
|
|
10
|
+
* 1. ut11+ut12 is Julian Date, apportioned in any convenient way between the two arguments,
|
|
11
|
+
* for example where ut11 is the Julian Day Number and ut12 is the fraction of a day. The
|
|
12
|
+
* returned utc1 and utc2 form an analogous pair, except that a special convention is
|
|
13
|
+
* used, to deal with the problem of leap seconds - see Note 3.
|
|
14
|
+
* 2. Delta UT1 can be obtained from tabulations provided by the International Earth Rotation
|
|
15
|
+
* and Reference Systems Service. The value changes abruptly by 1s at a leap second;
|
|
16
|
+
* however, close to a leap second the algorithm used here is tolerant of the "wrong"
|
|
17
|
+
* choice of value being made.
|
|
18
|
+
* 3. JD cannot unambiguously represent UTC during a leap second unless special measures are
|
|
19
|
+
* taken. The convention in the present function is that the returned quasi-JD utc1+utc2
|
|
20
|
+
* represents UTC days whether the length is 86399, 86400 or 86401 SI seconds.
|
|
21
|
+
* 4. The function d2dtf can be used to transform the UTC quasi-JD into calendar date and
|
|
22
|
+
* clock time, including UTC leap second handling.
|
|
23
|
+
* 5. The warning status "dubious year" flags UTCs that predate the introduction of the time
|
|
24
|
+
* scale or that are too far in the future to be trusted. See dat for further details.
|
|
25
|
+
* 6. Where the status is negative, utc1 and utc2 are NaN.
|
|
26
|
+
*
|
|
27
|
+
* References:
|
|
28
|
+
* - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), IERS Technical Note No. 32,
|
|
29
|
+
* BKG (2004)
|
|
30
|
+
* - Explanatory Supplement to the Astronomical Almanac, P. Kenneth Seidelmann (ed),
|
|
31
|
+
* University Science Books (1992)
|
|
32
|
+
*
|
|
33
|
+
* @param ut11 UT1 as a 2-part Julian Date (Note 1)
|
|
34
|
+
* @param ut12 UT1 as a 2-part Julian Date (Note 1)
|
|
35
|
+
* @param dut1 Delta UT1: UT1-UTC in seconds (Note 2)
|
|
36
|
+
* @returns [utc1, utc2, status]: UTC as a 2-part quasi Julian Date (Notes 3, 4), and status:
|
|
37
|
+
* +1 = dubious year (Note 5), 0 = OK, -1 = unacceptable date
|
|
38
|
+
*/
|
|
39
|
+
export function ut1utc(ut11, ut12, dut1) {
|
|
40
|
+
let iy, im, id, jc;
|
|
41
|
+
let u1, u2, d1, d2, fd, dats2;
|
|
42
|
+
let utc1, utc2;
|
|
43
|
+
let js = 0;
|
|
44
|
+
// UT1-UTC in seconds.
|
|
45
|
+
let duts = dut1;
|
|
46
|
+
// Put the two parts of the UT1 into big-first order.
|
|
47
|
+
const big1 = Math.abs(ut11) >= Math.abs(ut12);
|
|
48
|
+
if (big1) {
|
|
49
|
+
u1 = ut11;
|
|
50
|
+
u2 = ut12;
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
u1 = ut12;
|
|
54
|
+
u2 = ut11;
|
|
55
|
+
}
|
|
56
|
+
// See if the UT1 can possibly be in a leap-second day.
|
|
57
|
+
d1 = u1;
|
|
58
|
+
let dats1 = 0;
|
|
59
|
+
for (let i = -1; i <= 3; i++) {
|
|
60
|
+
d2 = u2 + i;
|
|
61
|
+
[iy, im, id, fd, jc] = jd2cal(d1, d2);
|
|
62
|
+
if (jc)
|
|
63
|
+
return [NaN, NaN, -1];
|
|
64
|
+
[dats2, js] = dat(iy, im, id, 0.0);
|
|
65
|
+
if (js < 0)
|
|
66
|
+
return [NaN, NaN, -1];
|
|
67
|
+
if (i === -1)
|
|
68
|
+
dats1 = dats2;
|
|
69
|
+
const ddats = dats2 - dats1;
|
|
70
|
+
if (Math.abs(ddats) >= 0.5) {
|
|
71
|
+
// Yes, leap second nearby: ensure UT1-UTC is "before" value.
|
|
72
|
+
if (ddats * duts >= 0.0)
|
|
73
|
+
duts -= ddats;
|
|
74
|
+
[d1, d2, jc] = cal2jd(iy, im, id);
|
|
75
|
+
if (jc)
|
|
76
|
+
return [NaN, NaN, -1];
|
|
77
|
+
const us1 = d1;
|
|
78
|
+
const us2 = d2 - 1.0 + duts / DAYSEC;
|
|
79
|
+
// Is the UT1 after this point?
|
|
80
|
+
let du = u1 - us1;
|
|
81
|
+
du += u2 - us2;
|
|
82
|
+
if (du > 0.0) {
|
|
83
|
+
// Yes: fraction of the current UTC day that has elapsed.
|
|
84
|
+
fd = du * DAYSEC / (DAYSEC + ddats);
|
|
85
|
+
// Ramp UT1-UTC to bring about ERFA's JD(UTC) convention.
|
|
86
|
+
duts += ddats * (fd <= 1.0 ? fd : 1.0);
|
|
87
|
+
}
|
|
88
|
+
// Done.
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
dats1 = dats2;
|
|
92
|
+
}
|
|
93
|
+
// Subtract the (possibly adjusted) UT1-UTC from UT1 to give UTC.
|
|
94
|
+
u2 -= duts / DAYSEC;
|
|
95
|
+
// Result, safeguarding precision.
|
|
96
|
+
if (big1) {
|
|
97
|
+
utc1 = u1;
|
|
98
|
+
utc2 = u2;
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
utc1 = u2;
|
|
102
|
+
utc2 = u1;
|
|
103
|
+
}
|
|
104
|
+
// Status.
|
|
105
|
+
return [utc1, utc2, js];
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=ut1utc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ut1utc.js","sourceRoot":"","sources":["../src/ut1utc.ts"],"names":[],"mappings":"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"}
|
package/dist/utctai.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Time scale transformation: Coordinated Universal Time, UTC, to International Atomic Time,
|
|
3
|
+
* TAI.
|
|
4
|
+
*
|
|
5
|
+
* Notes:
|
|
6
|
+
* 1. utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any convenient way between
|
|
7
|
+
* the two arguments, for example where utc1 is the Julian Day Number and utc2 is the
|
|
8
|
+
* fraction of a day.
|
|
9
|
+
* 2. JD cannot unambiguously represent UTC during a leap second unless special measures are
|
|
10
|
+
* taken. The convention in the present function is that the JD day represents UTC days
|
|
11
|
+
* whether the length is 86399, 86400 or 86401 SI seconds. In the 1960-1972 era there
|
|
12
|
+
* were smaller jumps (in either direction) each time the linear UTC(TAI) expression was
|
|
13
|
+
* changed, and these "mini-leaps" are also included in the ERFA convention.
|
|
14
|
+
* 3. The warning status "dubious year" flags UTCs that predate the introduction of the time
|
|
15
|
+
* scale or that are too far in the future to be trusted. See dat for further details.
|
|
16
|
+
* 4. The function dtf2d converts from calendar date and time of day into 2-part Julian Date,
|
|
17
|
+
* and in the case of UTC implements the leap-second-ambiguity convention described above.
|
|
18
|
+
* 5. The returned tai1,tai2 are such that their sum is the TAI Julian Date.
|
|
19
|
+
* 6. Where the status is negative, tai1 and tai2 are NaN.
|
|
20
|
+
*
|
|
21
|
+
* References:
|
|
22
|
+
* - McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003), IERS Technical Note No. 32,
|
|
23
|
+
* BKG (2004)
|
|
24
|
+
* - Explanatory Supplement to the Astronomical Almanac, P. Kenneth Seidelmann (ed),
|
|
25
|
+
* University Science Books (1992)
|
|
26
|
+
*
|
|
27
|
+
* @param utc1 UTC as a 2-part quasi Julian Date (Notes 1-4)
|
|
28
|
+
* @param utc2 UTC as a 2-part quasi Julian Date (Notes 1-4)
|
|
29
|
+
* @returns [tai1, tai2, status]: TAI as a 2-part Julian Date (Note 5), and status: +1 =
|
|
30
|
+
* dubious year (Note 3), 0 = OK, -1 = unacceptable date
|
|
31
|
+
*/
|
|
32
|
+
export declare function utctai(utc1: number, utc2: number): [tai1: number, tai2: number, status: number];
|
|
33
|
+
//# sourceMappingURL=utctai.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utctai.d.ts","sourceRoot":"","sources":["../src/utctai.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CA2D/F"}
|