@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/sepp.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Vec3 } from './internal.ts';
|
|
2
|
+
/**
|
|
3
|
+
* Angular separation between two p-vectors.
|
|
4
|
+
*
|
|
5
|
+
* Notes:
|
|
6
|
+
* 1. If either vector is null, a zero result is returned.
|
|
7
|
+
* 2. The angular separation is most simply formulated in terms of scalar product. However,
|
|
8
|
+
* this gives poor accuracy for angles near zero and pi. The present algorithm uses both
|
|
9
|
+
* cross product and dot product, to deliver full accuracy whatever the size of the angle.
|
|
10
|
+
*
|
|
11
|
+
* @param a first p-vector (not necessarily unit length)
|
|
12
|
+
* @param b second p-vector (not necessarily unit length)
|
|
13
|
+
* @returns angular separation (radians, always positive)
|
|
14
|
+
*/
|
|
15
|
+
export declare function sepp(a: Vec3, b: Vec3): number;
|
|
16
|
+
//# sourceMappingURL=sepp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sepp.d.ts","sourceRoot":"","sources":["../src/sepp.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAKzC;;;;;;;;;;;;GAYG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,GAAG,MAAM,CAQ7C"}
|
package/dist/sepp.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { pdp } from './pdp.js';
|
|
2
|
+
import { pm } from './pm.js';
|
|
3
|
+
import { pxp } from './pxp.js';
|
|
4
|
+
/**
|
|
5
|
+
* Angular separation between two p-vectors.
|
|
6
|
+
*
|
|
7
|
+
* Notes:
|
|
8
|
+
* 1. If either vector is null, a zero result is returned.
|
|
9
|
+
* 2. The angular separation is most simply formulated in terms of scalar product. However,
|
|
10
|
+
* this gives poor accuracy for angles near zero and pi. The present algorithm uses both
|
|
11
|
+
* cross product and dot product, to deliver full accuracy whatever the size of the angle.
|
|
12
|
+
*
|
|
13
|
+
* @param a first p-vector (not necessarily unit length)
|
|
14
|
+
* @param b second p-vector (not necessarily unit length)
|
|
15
|
+
* @returns angular separation (radians, always positive)
|
|
16
|
+
*/
|
|
17
|
+
export function sepp(a, b) {
|
|
18
|
+
// Sine of angle between the vectors, multiplied by the two moduli.
|
|
19
|
+
const axb = pxp(a, b);
|
|
20
|
+
const ss = pm(axb);
|
|
21
|
+
// Cosine of the angle, multiplied by the two moduli.
|
|
22
|
+
const cs = pdp(a, b);
|
|
23
|
+
// The angle.
|
|
24
|
+
return ss !== 0.0 || cs !== 0.0 ? Math.atan2(ss, cs) : 0.0;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=sepp.js.map
|
package/dist/sepp.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sepp.js","sourceRoot":"","sources":["../src/sepp.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAC9B,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAE9B;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,IAAI,CAAC,CAAO,EAAE,CAAO;IACnC,mEAAmE;IACnE,MAAM,GAAG,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IACrB,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAAA;IAClB,qDAAqD;IACrD,MAAM,EAAE,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IACpB,aAAa;IACb,OAAO,EAAE,KAAK,GAAG,IAAI,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAA;AAC5D,CAAC"}
|
package/dist/seps.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Angular separation between two sets of spherical coordinates.
|
|
3
|
+
*
|
|
4
|
+
* @param al first longitude (radians)
|
|
5
|
+
* @param ap first latitude (radians)
|
|
6
|
+
* @param bl second longitude (radians)
|
|
7
|
+
* @param bp second latitude (radians)
|
|
8
|
+
* @returns angular separation (radians)
|
|
9
|
+
*/
|
|
10
|
+
export declare function seps(al: number, ap: number, bl: number, bp: number): number;
|
|
11
|
+
//# sourceMappingURL=seps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seps.d.ts","sourceRoot":"","sources":["../src/seps.ts"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AACH,wBAAgB,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAM3E"}
|
package/dist/seps.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Translated from ERFA 2.0.1 eraSeps (seps.c); see LICENSE.
|
|
2
|
+
import { s2c } from './s2c.js';
|
|
3
|
+
import { sepp } from './sepp.js';
|
|
4
|
+
/**
|
|
5
|
+
* Angular separation between two sets of spherical coordinates.
|
|
6
|
+
*
|
|
7
|
+
* @param al first longitude (radians)
|
|
8
|
+
* @param ap first latitude (radians)
|
|
9
|
+
* @param bl second longitude (radians)
|
|
10
|
+
* @param bp second latitude (radians)
|
|
11
|
+
* @returns angular separation (radians)
|
|
12
|
+
*/
|
|
13
|
+
export function seps(al, ap, bl, bp) {
|
|
14
|
+
// Spherical to Cartesian.
|
|
15
|
+
const ac = s2c(al, ap);
|
|
16
|
+
const bc = s2c(bl, bp);
|
|
17
|
+
// Angle between the vectors.
|
|
18
|
+
return sepp(ac, bc);
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=seps.js.map
|
package/dist/seps.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seps.js","sourceRoot":"","sources":["../src/seps.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEhC;;;;;;;;GAQG;AACH,MAAM,UAAU,IAAI,CAAC,EAAU,EAAE,EAAU,EAAE,EAAU,EAAE,EAAU;IACjE,0BAA0B;IAC1B,MAAM,EAAE,GAAG,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;IACtB,MAAM,EAAE,GAAG,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;IACtB,6BAA6B;IAC7B,OAAO,IAAI,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;AACrB,CAAC"}
|
package/dist/starpm.d.ts
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Star proper motion: update star catalog data for space motion.
|
|
3
|
+
*
|
|
4
|
+
* Notes:
|
|
5
|
+
* 1. The starting and ending TDB dates ep1a+ep1b and ep2a+ep2b are Julian Dates, apportioned
|
|
6
|
+
* in any convenient way between the two parts (A and B). For example, JD(TDB)=2450123.7
|
|
7
|
+
* could be given as (2450123.7, 0.0), the JD method; (2451545.0, -1421.3), the J2000
|
|
8
|
+
* method; (2400000.5, 50123.2), the MJD method; or (2450123.5, 0.2), the date and time
|
|
9
|
+
* method. The J2000 method is best matched to the way the argument is handled internally
|
|
10
|
+
* and will deliver the optimum resolution.
|
|
11
|
+
* 2. In accordance with normal star-catalog conventions, the object's right ascension and
|
|
12
|
+
* declination are freed from the effects of secular aberration. The frame, which is
|
|
13
|
+
* aligned to the catalog equator and equinox, is Lorentzian and centered on the SSB.
|
|
14
|
+
*
|
|
15
|
+
* The proper motions are the rate of change of the right ascension and declination at
|
|
16
|
+
* the catalog epoch and are in radians per TDB Julian year.
|
|
17
|
+
*
|
|
18
|
+
* The parallax and radial velocity are in the same frame.
|
|
19
|
+
* 3. Care is needed with units. The star coordinates are in radians and the proper motions
|
|
20
|
+
* in radians per Julian year, but the parallax is in arcseconds.
|
|
21
|
+
* 4. The RA proper motion is in terms of coordinate angle, not true angle. If the catalog
|
|
22
|
+
* uses arcseconds for both RA and Dec proper motions, the RA proper motion will need to
|
|
23
|
+
* be divided by cos(Dec) before use.
|
|
24
|
+
* 5. Straight-line motion at constant speed, in the inertial frame, is assumed.
|
|
25
|
+
* 6. An extremely small (or zero or negative) parallax is interpreted to mean that the
|
|
26
|
+
* object is on the "celestial sphere", the radius of which is an arbitrary (large) value
|
|
27
|
+
* (see the starpv function for the value used). When the distance is overridden in this
|
|
28
|
+
* way, the status, initially zero, has 1 added to it.
|
|
29
|
+
* 7. If the space velocity is a significant fraction of c (see the constant VMAX in the
|
|
30
|
+
* function starpv), it is arbitrarily set to zero. When this action occurs, 2 is added
|
|
31
|
+
* to the status.
|
|
32
|
+
* 8. The relativistic adjustment carried out in the starpv function involves an iterative
|
|
33
|
+
* calculation. If the process fails to converge within a set number of iterations, 4 is
|
|
34
|
+
* added to the status.
|
|
35
|
+
* 9. Where the status is -1, C leaves the outputs unset (or, when pvstar fails, those it
|
|
36
|
+
* leaves unset), and they are NaN.
|
|
37
|
+
*
|
|
38
|
+
* @param ra1 right ascension (radians), before
|
|
39
|
+
* @param dec1 declination (radians), before
|
|
40
|
+
* @param pmr1 RA proper motion (radians/year), before
|
|
41
|
+
* @param pmd1 Dec proper motion (radians/year), before
|
|
42
|
+
* @param px1 parallax (arcseconds), before
|
|
43
|
+
* @param rv1 radial velocity (km/s, +ve = receding), before
|
|
44
|
+
* @param ep1a "before" epoch, part A (Note 1)
|
|
45
|
+
* @param ep1b "before" epoch, part B (Note 1)
|
|
46
|
+
* @param ep2a "after" epoch, part A (Note 1)
|
|
47
|
+
* @param ep2b "after" epoch, part B (Note 1)
|
|
48
|
+
* @returns [ra2, dec2, pmr2, pmd2, px2, rv2, status]: right ascension (radians), declination
|
|
49
|
+
* (radians), RA proper motion (radians/year), Dec proper motion (radians/year), parallax
|
|
50
|
+
* (arcseconds) and radial velocity (km/s, +ve = receding), after; and status: -1 = system
|
|
51
|
+
* error (should not occur), 0 = no warnings or errors, 1 = distance overridden (Note 6),
|
|
52
|
+
* 2 = excessive velocity (Note 7), 4 = solution didn't converge (Note 8), else = binary
|
|
53
|
+
* logical OR of the above warnings
|
|
54
|
+
*/
|
|
55
|
+
export declare function starpm(ra1: number, dec1: number, pmr1: number, pmd1: number, px1: number, rv1: number, ep1a: number, ep1b: number, ep2a: number, ep2b: number): [ra2: number, dec2: number, pmr2: number, pmd2: number, px2: number, rv2: number, status: number];
|
|
56
|
+
//# sourceMappingURL=starpm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"starpm.d.ts","sourceRoot":"","sources":["../src/starpm.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,wBAAgB,MAAM,CACpB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GACX,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAkCnG"}
|
package/dist/starpm.js
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
// Translated from ERFA 2.0.1 eraStarpm (starpm.c); see LICENSE.
|
|
2
|
+
import { DC } from './constants.js';
|
|
3
|
+
import { pdp } from './pdp.js';
|
|
4
|
+
import { pm } from './pm.js';
|
|
5
|
+
import { pvstar } from './pvstar.js';
|
|
6
|
+
import { pvu } from './pvu.js';
|
|
7
|
+
import { starpv } from './starpv.js';
|
|
8
|
+
/**
|
|
9
|
+
* Star proper motion: update star catalog data for space motion.
|
|
10
|
+
*
|
|
11
|
+
* Notes:
|
|
12
|
+
* 1. The starting and ending TDB dates ep1a+ep1b and ep2a+ep2b are Julian Dates, apportioned
|
|
13
|
+
* in any convenient way between the two parts (A and B). For example, JD(TDB)=2450123.7
|
|
14
|
+
* could be given as (2450123.7, 0.0), the JD method; (2451545.0, -1421.3), the J2000
|
|
15
|
+
* method; (2400000.5, 50123.2), the MJD method; or (2450123.5, 0.2), the date and time
|
|
16
|
+
* method. The J2000 method is best matched to the way the argument is handled internally
|
|
17
|
+
* and will deliver the optimum resolution.
|
|
18
|
+
* 2. In accordance with normal star-catalog conventions, the object's right ascension and
|
|
19
|
+
* declination are freed from the effects of secular aberration. The frame, which is
|
|
20
|
+
* aligned to the catalog equator and equinox, is Lorentzian and centered on the SSB.
|
|
21
|
+
*
|
|
22
|
+
* The proper motions are the rate of change of the right ascension and declination at
|
|
23
|
+
* the catalog epoch and are in radians per TDB Julian year.
|
|
24
|
+
*
|
|
25
|
+
* The parallax and radial velocity are in the same frame.
|
|
26
|
+
* 3. Care is needed with units. The star coordinates are in radians and the proper motions
|
|
27
|
+
* in radians per Julian year, but the parallax is in arcseconds.
|
|
28
|
+
* 4. The RA proper motion is in terms of coordinate angle, not true angle. If the catalog
|
|
29
|
+
* uses arcseconds for both RA and Dec proper motions, the RA proper motion will need to
|
|
30
|
+
* be divided by cos(Dec) before use.
|
|
31
|
+
* 5. Straight-line motion at constant speed, in the inertial frame, is assumed.
|
|
32
|
+
* 6. An extremely small (or zero or negative) parallax is interpreted to mean that the
|
|
33
|
+
* object is on the "celestial sphere", the radius of which is an arbitrary (large) value
|
|
34
|
+
* (see the starpv function for the value used). When the distance is overridden in this
|
|
35
|
+
* way, the status, initially zero, has 1 added to it.
|
|
36
|
+
* 7. If the space velocity is a significant fraction of c (see the constant VMAX in the
|
|
37
|
+
* function starpv), it is arbitrarily set to zero. When this action occurs, 2 is added
|
|
38
|
+
* to the status.
|
|
39
|
+
* 8. The relativistic adjustment carried out in the starpv function involves an iterative
|
|
40
|
+
* calculation. If the process fails to converge within a set number of iterations, 4 is
|
|
41
|
+
* added to the status.
|
|
42
|
+
* 9. Where the status is -1, C leaves the outputs unset (or, when pvstar fails, those it
|
|
43
|
+
* leaves unset), and they are NaN.
|
|
44
|
+
*
|
|
45
|
+
* @param ra1 right ascension (radians), before
|
|
46
|
+
* @param dec1 declination (radians), before
|
|
47
|
+
* @param pmr1 RA proper motion (radians/year), before
|
|
48
|
+
* @param pmd1 Dec proper motion (radians/year), before
|
|
49
|
+
* @param px1 parallax (arcseconds), before
|
|
50
|
+
* @param rv1 radial velocity (km/s, +ve = receding), before
|
|
51
|
+
* @param ep1a "before" epoch, part A (Note 1)
|
|
52
|
+
* @param ep1b "before" epoch, part B (Note 1)
|
|
53
|
+
* @param ep2a "after" epoch, part A (Note 1)
|
|
54
|
+
* @param ep2b "after" epoch, part B (Note 1)
|
|
55
|
+
* @returns [ra2, dec2, pmr2, pmd2, px2, rv2, status]: right ascension (radians), declination
|
|
56
|
+
* (radians), RA proper motion (radians/year), Dec proper motion (radians/year), parallax
|
|
57
|
+
* (arcseconds) and radial velocity (km/s, +ve = receding), after; and status: -1 = system
|
|
58
|
+
* error (should not occur), 0 = no warnings or errors, 1 = distance overridden (Note 6),
|
|
59
|
+
* 2 = excessive velocity (Note 7), 4 = solution didn't converge (Note 8), else = binary
|
|
60
|
+
* logical OR of the above warnings
|
|
61
|
+
*/
|
|
62
|
+
export function starpm(ra1, dec1, pmr1, pmd1, px1, rv1, ep1a, ep1b, ep2a, ep2b) {
|
|
63
|
+
// RA,Dec etc. at the "before" epoch to space motion pv-vector.
|
|
64
|
+
const [pv1, j1] = starpv(ra1, dec1, pmr1, pmd1, px1, rv1);
|
|
65
|
+
// Light time when observed (days).
|
|
66
|
+
const tl1 = pm(pv1[0]) / DC;
|
|
67
|
+
// Time interval, "before" to "after" (days).
|
|
68
|
+
const dt = (ep2a - ep1a) + (ep2b - ep1b);
|
|
69
|
+
// Move star along track from the "before" observed position to the "after" geometric
|
|
70
|
+
// position.
|
|
71
|
+
const pv = pvu(dt + tl1, pv1);
|
|
72
|
+
// From this geometric position, deduce the observed light time (days) at the "after"
|
|
73
|
+
// epoch (with theoretically unneccessary error check).
|
|
74
|
+
const r2 = pdp(pv[0], pv[0]);
|
|
75
|
+
const rdv = pdp(pv[0], pv[1]);
|
|
76
|
+
const v2 = pdp(pv[1], pv[1]);
|
|
77
|
+
const c2mv2 = DC * DC - v2;
|
|
78
|
+
if (c2mv2 <= 0.0)
|
|
79
|
+
return [NaN, NaN, NaN, NaN, NaN, NaN, -1];
|
|
80
|
+
const tl2 = (-rdv + Math.sqrt(rdv * rdv + c2mv2 * r2)) / c2mv2;
|
|
81
|
+
// Move the position along track from the observed place at the "before" epoch to the
|
|
82
|
+
// observed place at the "after" epoch.
|
|
83
|
+
const pv2 = pvu(dt + (tl1 - tl2), pv1);
|
|
84
|
+
// Space motion pv-vector to RA,Dec etc. at the "after" epoch.
|
|
85
|
+
const [ra2, dec2, pmr2, pmd2, px2, rv2, j2] = pvstar(pv2);
|
|
86
|
+
// Final status.
|
|
87
|
+
const j = j2 === 0 ? j1 : -1;
|
|
88
|
+
return [ra2, dec2, pmr2, pmd2, px2, rv2, j];
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=starpm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"starpm.js","sourceRoot":"","sources":["../src/starpm.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAA;AACnC,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAC9B,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,MAAM,UAAU,MAAM,CACpB,GAAW,EACX,IAAY,EACZ,IAAY,EACZ,IAAY,EACZ,GAAW,EACX,GAAW,EACX,IAAY,EACZ,IAAY,EACZ,IAAY,EACZ,IAAY;IAEZ,+DAA+D;IAC/D,MAAM,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,MAAM,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA;IAEzD,mCAAmC;IACnC,MAAM,GAAG,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAA;IAE3B,6CAA6C;IAC7C,MAAM,EAAE,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,CAAA;IAExC,qFAAqF;IACrF,YAAY;IACZ,MAAM,EAAE,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,EAAE,GAAG,CAAC,CAAA;IAE7B,qFAAqF;IACrF,uDAAuD;IACvD,MAAM,EAAE,GAAG,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;IAC5B,MAAM,GAAG,GAAG,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;IAC7B,MAAM,EAAE,GAAG,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;IAC5B,MAAM,KAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAA;IAC1B,IAAI,KAAK,IAAI,GAAG;QAAE,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAA;IAC3D,MAAM,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,GAAG,GAAG,KAAK,GAAG,EAAE,CAAC,CAAC,GAAG,KAAK,CAAA;IAE9D,qFAAqF;IACrF,uCAAuC;IACvC,MAAM,GAAG,GAAG,GAAG,CAAC,EAAE,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,EAAE,GAAG,CAAC,CAAA;IAEtC,8DAA8D;IAC9D,MAAM,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;IAEzD,gBAAgB;IAChB,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IAE5B,OAAO,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,CAAA;AAC7C,CAAC"}
|
package/dist/starpv.d.ts
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { PV } from './internal.ts';
|
|
2
|
+
/**
|
|
3
|
+
* Convert star catalog coordinates to position+velocity vector.
|
|
4
|
+
*
|
|
5
|
+
* Notes:
|
|
6
|
+
* 1. The star data accepted by this function are "observables" for an imaginary observer at
|
|
7
|
+
* the solar-system barycenter. Proper motion and radial velocity are, strictly, in terms
|
|
8
|
+
* of barycentric coordinate time, TCB. For most practical applications, it is permissible
|
|
9
|
+
* to neglect the distinction between TCB and ordinary "proper" time on Earth (TT/TAI). The
|
|
10
|
+
* result will, as a rule, be limited by the intrinsic accuracy of the proper-motion and
|
|
11
|
+
* radial-velocity data; moreover, the pv-vector is likely to be merely an intermediate
|
|
12
|
+
* result, so that a change of time unit would cancel out overall.
|
|
13
|
+
*
|
|
14
|
+
* In accordance with normal star-catalog conventions, the object's right ascension and
|
|
15
|
+
* declination are freed from the effects of secular aberration. The frame, which is
|
|
16
|
+
* aligned to the catalog equator and equinox, is Lorentzian and centered on the SSB.
|
|
17
|
+
* 2. The resulting position and velocity pv-vector is with respect to the same frame and,
|
|
18
|
+
* like the catalog coordinates, is freed from the effects of secular aberration. Should
|
|
19
|
+
* the "coordinate direction", where the object was located at the catalog epoch, be
|
|
20
|
+
* required, it may be obtained by calculating the magnitude of the position vector
|
|
21
|
+
* pv[0] dividing by the speed of light in au/day to give the light-time, and then
|
|
22
|
+
* multiplying the space velocity pv[1] by this light-time and adding the result to
|
|
23
|
+
* pv[0].
|
|
24
|
+
*
|
|
25
|
+
* Summarizing, the pv-vector returned is for most stars almost identical to the result
|
|
26
|
+
* of applying the standard geometrical "space motion" transformation. The differences,
|
|
27
|
+
* which are the subject of the Stumpff paper referenced below, are: (i) in stars with
|
|
28
|
+
* significant radial velocity and proper motion, the constantly changing light-time
|
|
29
|
+
* distorts the apparent proper motion (a classical, not a relativistic, effect); (ii) the
|
|
30
|
+
* transformation complies with special relativity.
|
|
31
|
+
* 3. Care is needed with units. The star coordinates are in radians and the proper motions
|
|
32
|
+
* in radians per Julian year, but the parallax is in arcseconds; the radial velocity is
|
|
33
|
+
* in km/s, but the pv-vector result is in au and au/day.
|
|
34
|
+
* 4. The RA proper motion is in terms of coordinate angle, not true angle. If the catalog
|
|
35
|
+
* uses arcseconds for both RA and Dec proper motions, the RA proper motion will need to
|
|
36
|
+
* be divided by cos(Dec) before use.
|
|
37
|
+
* 5. Straight-line motion at constant speed, in the inertial frame, is assumed.
|
|
38
|
+
* 6. An extremely small (or zero or negative) parallax is interpreted to mean that the
|
|
39
|
+
* object is on the "celestial sphere", the radius of which is an arbitrary (large) value
|
|
40
|
+
* (see the constant PXMIN: 1e-7 arcsec, about 2.06e12 au). When the distance is
|
|
41
|
+
* overridden in this way, the status, initially zero, has 1 added to it.
|
|
42
|
+
* 7. If the space velocity is a significant fraction of c (see the constant VMAX: half the
|
|
43
|
+
* speed of light), it is arbitrarily set to zero. When this action occurs, 2 is added to
|
|
44
|
+
* the status.
|
|
45
|
+
* 8. The relativistic adjustment involves an iterative calculation. If the process fails to
|
|
46
|
+
* converge within a set number (IMAX: 100) of iterations, 4 is added to the status.
|
|
47
|
+
* 9. The inverse transformation is performed by the function pvstar.
|
|
48
|
+
*
|
|
49
|
+
* Reference: Stumpff, P., 1985, Astron.Astrophys. 144, 232-240.
|
|
50
|
+
*
|
|
51
|
+
* @param ra right ascension (radians)
|
|
52
|
+
* @param dec declination (radians)
|
|
53
|
+
* @param pmr RA proper motion (radians/year)
|
|
54
|
+
* @param pmd Dec proper motion (radians/year)
|
|
55
|
+
* @param px parallax (arcseconds)
|
|
56
|
+
* @param rv radial velocity (km/s, positive = receding)
|
|
57
|
+
* @returns [pv, status]: pv-vector (au, au/day), and status: 0 = no warnings, 1 = distance
|
|
58
|
+
* overridden (Note 6), 2 = excessive speed (Note 7), 4 = solution didn't converge
|
|
59
|
+
* (Note 8), else = binary logical OR of the above
|
|
60
|
+
*/
|
|
61
|
+
export declare function starpv(ra: number, dec: number, pmr: number, pmd: number, px: number, rv: number): [pv: PV, status: number];
|
|
62
|
+
//# sourceMappingURL=starpv.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"starpv.d.ts","sourceRoot":"","sources":["../src/starpv.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAQ,MAAM,eAAe,CAAA;AAU7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH,wBAAgB,MAAM,CACpB,EAAE,EAAE,MAAM,EACV,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,GACT,CAAC,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,CAwF1B"}
|
package/dist/starpv.js
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
// Translated from ERFA 2.0.1 eraStarpv (starpv.c); see LICENSE.
|
|
2
|
+
import { DAU, DAYSEC, DC, DJY, DR2AS } from './constants.js';
|
|
3
|
+
import { pdp } from './pdp.js';
|
|
4
|
+
import { pm } from './pm.js';
|
|
5
|
+
import { pmp } from './pmp.js';
|
|
6
|
+
import { pn } from './pn.js';
|
|
7
|
+
import { ppp } from './ppp.js';
|
|
8
|
+
import { s2pv } from './s2pv.js';
|
|
9
|
+
import { sxp } from './sxp.js';
|
|
10
|
+
import { zp } from './zp.js';
|
|
11
|
+
/**
|
|
12
|
+
* Convert star catalog coordinates to position+velocity vector.
|
|
13
|
+
*
|
|
14
|
+
* Notes:
|
|
15
|
+
* 1. The star data accepted by this function are "observables" for an imaginary observer at
|
|
16
|
+
* the solar-system barycenter. Proper motion and radial velocity are, strictly, in terms
|
|
17
|
+
* of barycentric coordinate time, TCB. For most practical applications, it is permissible
|
|
18
|
+
* to neglect the distinction between TCB and ordinary "proper" time on Earth (TT/TAI). The
|
|
19
|
+
* result will, as a rule, be limited by the intrinsic accuracy of the proper-motion and
|
|
20
|
+
* radial-velocity data; moreover, the pv-vector is likely to be merely an intermediate
|
|
21
|
+
* result, so that a change of time unit would cancel out overall.
|
|
22
|
+
*
|
|
23
|
+
* In accordance with normal star-catalog conventions, the object's right ascension and
|
|
24
|
+
* declination are freed from the effects of secular aberration. The frame, which is
|
|
25
|
+
* aligned to the catalog equator and equinox, is Lorentzian and centered on the SSB.
|
|
26
|
+
* 2. The resulting position and velocity pv-vector is with respect to the same frame and,
|
|
27
|
+
* like the catalog coordinates, is freed from the effects of secular aberration. Should
|
|
28
|
+
* the "coordinate direction", where the object was located at the catalog epoch, be
|
|
29
|
+
* required, it may be obtained by calculating the magnitude of the position vector
|
|
30
|
+
* pv[0] dividing by the speed of light in au/day to give the light-time, and then
|
|
31
|
+
* multiplying the space velocity pv[1] by this light-time and adding the result to
|
|
32
|
+
* pv[0].
|
|
33
|
+
*
|
|
34
|
+
* Summarizing, the pv-vector returned is for most stars almost identical to the result
|
|
35
|
+
* of applying the standard geometrical "space motion" transformation. The differences,
|
|
36
|
+
* which are the subject of the Stumpff paper referenced below, are: (i) in stars with
|
|
37
|
+
* significant radial velocity and proper motion, the constantly changing light-time
|
|
38
|
+
* distorts the apparent proper motion (a classical, not a relativistic, effect); (ii) the
|
|
39
|
+
* transformation complies with special relativity.
|
|
40
|
+
* 3. Care is needed with units. The star coordinates are in radians and the proper motions
|
|
41
|
+
* in radians per Julian year, but the parallax is in arcseconds; the radial velocity is
|
|
42
|
+
* in km/s, but the pv-vector result is in au and au/day.
|
|
43
|
+
* 4. The RA proper motion is in terms of coordinate angle, not true angle. If the catalog
|
|
44
|
+
* uses arcseconds for both RA and Dec proper motions, the RA proper motion will need to
|
|
45
|
+
* be divided by cos(Dec) before use.
|
|
46
|
+
* 5. Straight-line motion at constant speed, in the inertial frame, is assumed.
|
|
47
|
+
* 6. An extremely small (or zero or negative) parallax is interpreted to mean that the
|
|
48
|
+
* object is on the "celestial sphere", the radius of which is an arbitrary (large) value
|
|
49
|
+
* (see the constant PXMIN: 1e-7 arcsec, about 2.06e12 au). When the distance is
|
|
50
|
+
* overridden in this way, the status, initially zero, has 1 added to it.
|
|
51
|
+
* 7. If the space velocity is a significant fraction of c (see the constant VMAX: half the
|
|
52
|
+
* speed of light), it is arbitrarily set to zero. When this action occurs, 2 is added to
|
|
53
|
+
* the status.
|
|
54
|
+
* 8. The relativistic adjustment involves an iterative calculation. If the process fails to
|
|
55
|
+
* converge within a set number (IMAX: 100) of iterations, 4 is added to the status.
|
|
56
|
+
* 9. The inverse transformation is performed by the function pvstar.
|
|
57
|
+
*
|
|
58
|
+
* Reference: Stumpff, P., 1985, Astron.Astrophys. 144, 232-240.
|
|
59
|
+
*
|
|
60
|
+
* @param ra right ascension (radians)
|
|
61
|
+
* @param dec declination (radians)
|
|
62
|
+
* @param pmr RA proper motion (radians/year)
|
|
63
|
+
* @param pmd Dec proper motion (radians/year)
|
|
64
|
+
* @param px parallax (arcseconds)
|
|
65
|
+
* @param rv radial velocity (km/s, positive = receding)
|
|
66
|
+
* @returns [pv, status]: pv-vector (au, au/day), and status: 0 = no warnings, 1 = distance
|
|
67
|
+
* overridden (Note 6), 2 = excessive speed (Note 7), 4 = solution didn't converge
|
|
68
|
+
* (Note 8), else = binary logical OR of the above
|
|
69
|
+
*/
|
|
70
|
+
export function starpv(ra, dec, pmr, pmd, px, rv) {
|
|
71
|
+
// Smallest allowed parallax
|
|
72
|
+
const PXMIN = 1e-7;
|
|
73
|
+
// Largest allowed speed (fraction of c)
|
|
74
|
+
const VMAX = 0.5;
|
|
75
|
+
// Maximum number of iterations for relativistic solution
|
|
76
|
+
const IMAX = 100;
|
|
77
|
+
let i, iwarn;
|
|
78
|
+
let w, pv, pu, dd, ddel;
|
|
79
|
+
let d = 0.0, del = 0.0; // to prevent
|
|
80
|
+
let odd = 0.0, oddel = 0.0; // compiler
|
|
81
|
+
let od = 0.0, odel = 0.0; // warnings
|
|
82
|
+
// Distance (au).
|
|
83
|
+
if (px >= PXMIN) {
|
|
84
|
+
w = px;
|
|
85
|
+
iwarn = 0;
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
w = PXMIN;
|
|
89
|
+
iwarn = 1;
|
|
90
|
+
}
|
|
91
|
+
const r = DR2AS / w;
|
|
92
|
+
// Radial speed (au/day).
|
|
93
|
+
const rd = DAYSEC * rv * 1e3 / DAU;
|
|
94
|
+
// Proper motion (radian/day).
|
|
95
|
+
const rad = pmr / DJY;
|
|
96
|
+
const decd = pmd / DJY;
|
|
97
|
+
// To pv-vector (au,au/day).
|
|
98
|
+
pv = s2pv(ra, dec, r, rad, decd, rd);
|
|
99
|
+
// If excessive velocity, arbitrarily set it to zero.
|
|
100
|
+
const v = pm(pv[1]);
|
|
101
|
+
if (v / DC > VMAX) {
|
|
102
|
+
pv = [pv[0], zp()];
|
|
103
|
+
iwarn += 2;
|
|
104
|
+
}
|
|
105
|
+
// Isolate the radial component of the velocity (au/day).
|
|
106
|
+
;
|
|
107
|
+
[w, pu] = pn(pv[0]);
|
|
108
|
+
const vsr = pdp(pu, pv[1]);
|
|
109
|
+
const usr = sxp(vsr, pu);
|
|
110
|
+
// Isolate the transverse component of the velocity (au/day).
|
|
111
|
+
const ust = pmp(pv[1], usr);
|
|
112
|
+
const vst = pm(ust);
|
|
113
|
+
// Special-relativity dimensionless parameters.
|
|
114
|
+
const betsr = vsr / DC;
|
|
115
|
+
const betst = vst / DC;
|
|
116
|
+
// Determine the observed-to-inertial correction terms.
|
|
117
|
+
let bett = betst;
|
|
118
|
+
let betr = betsr;
|
|
119
|
+
for (i = 0; i < IMAX; i++) {
|
|
120
|
+
d = 1.0 + betr;
|
|
121
|
+
w = betr * betr + bett * bett;
|
|
122
|
+
del = -w / (Math.sqrt(1.0 - w) + 1.0);
|
|
123
|
+
betr = d * betsr + del;
|
|
124
|
+
bett = d * betst;
|
|
125
|
+
if (i > 0) {
|
|
126
|
+
dd = Math.abs(d - od);
|
|
127
|
+
ddel = Math.abs(del - odel);
|
|
128
|
+
if (i > 1 && dd >= odd && ddel >= oddel)
|
|
129
|
+
break;
|
|
130
|
+
odd = dd;
|
|
131
|
+
oddel = ddel;
|
|
132
|
+
}
|
|
133
|
+
od = d;
|
|
134
|
+
odel = del;
|
|
135
|
+
}
|
|
136
|
+
if (i >= IMAX)
|
|
137
|
+
iwarn += 4;
|
|
138
|
+
// Scale observed tangential velocity vector into inertial (au/d).
|
|
139
|
+
const ut = sxp(d, ust);
|
|
140
|
+
// Compute inertial radial velocity vector (au/d).
|
|
141
|
+
const ur = sxp(DC * (d * betsr + del), pu);
|
|
142
|
+
// Combine the two to obtain the inertial space velocity vector.
|
|
143
|
+
pv = [pv[0], ppp(ur, ut)];
|
|
144
|
+
// Return the status.
|
|
145
|
+
return [pv, iwarn];
|
|
146
|
+
}
|
|
147
|
+
//# sourceMappingURL=starpv.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"starpv.js","sourceRoot":"","sources":["../src/starpv.ts"],"names":[],"mappings":"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"}
|
package/dist/sxp.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sxp.d.ts","sourceRoot":"","sources":["../src/sxp.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAEzC;;;;;;GAMG;AACH,wBAAgB,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,CAE5C"}
|
package/dist/sxp.js
ADDED
package/dist/sxp.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sxp.js","sourceRoot":"","sources":["../src/sxp.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,MAAM,UAAU,GAAG,CAAC,CAAS,EAAE,CAAO;IACpC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AACvC,CAAC"}
|
package/dist/sxpv.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sxpv.d.ts","sourceRoot":"","sources":["../src/sxpv.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,eAAe,CAAA;AAGvC;;;;;;GAMG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,CAE1C"}
|
package/dist/sxpv.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { s2xpv } from './s2xpv.js';
|
|
2
|
+
/**
|
|
3
|
+
* Multiply a pv-vector by a scalar.
|
|
4
|
+
*
|
|
5
|
+
* @param s scalar
|
|
6
|
+
* @param pv pv-vector
|
|
7
|
+
* @returns spv: s * pv
|
|
8
|
+
*/
|
|
9
|
+
export function sxpv(s, pv) {
|
|
10
|
+
return s2xpv(s, s, pv);
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=sxpv.js.map
|
package/dist/sxpv.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sxpv.js","sourceRoot":"","sources":["../src/sxpv.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAElC;;;;;;GAMG;AACH,MAAM,UAAU,IAAI,CAAC,CAAS,EAAE,EAAM;IACpC,OAAO,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;AACxB,CAAC"}
|
package/dist/taitt.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Time scale transformation: International Atomic Time, TAI, to Terrestrial Time, TT.
|
|
3
|
+
*
|
|
4
|
+
* Note: tai1+tai2 is Julian Date, apportioned in any convenient way between the two
|
|
5
|
+
* arguments, for example where tai1 is the Julian Day Number and tai2 is the fraction of a
|
|
6
|
+
* day. The returned tt1,tt2 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 tai1 TAI as a 2-part Julian Date
|
|
15
|
+
* @param tai2 TAI as a 2-part Julian Date
|
|
16
|
+
* @returns [tt1, tt2, status]: TT as a 2-part Julian Date, and status: 0 = OK
|
|
17
|
+
*/
|
|
18
|
+
export declare function taitt(tai1: number, tai2: number): [tt1: number, tt2: number, status: number];
|
|
19
|
+
//# sourceMappingURL=taitt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"taitt.d.ts","sourceRoot":"","sources":["../src/taitt.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAc5F"}
|
package/dist/taitt.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// Translated from ERFA 2.0.1 eraTaitt (taitt.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: International Atomic Time, TAI, to Terrestrial Time, TT.
|
|
7
|
+
*
|
|
8
|
+
* Note: tai1+tai2 is Julian Date, apportioned in any convenient way between the two
|
|
9
|
+
* arguments, for example where tai1 is the Julian Day Number and tai2 is the fraction of a
|
|
10
|
+
* day. The returned tt1,tt2 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 tai1 TAI as a 2-part Julian Date
|
|
19
|
+
* @param tai2 TAI as a 2-part Julian Date
|
|
20
|
+
* @returns [tt1, tt2, status]: TT as a 2-part Julian Date, and status: 0 = OK
|
|
21
|
+
*/
|
|
22
|
+
export function taitt(tai1, tai2) {
|
|
23
|
+
let tt1, tt2;
|
|
24
|
+
// Result, safeguarding precision.
|
|
25
|
+
if (Math.abs(tai1) > Math.abs(tai2)) {
|
|
26
|
+
tt1 = tai1;
|
|
27
|
+
tt2 = tai2 + dtat;
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
tt1 = tai1 + dtat;
|
|
31
|
+
tt2 = tai2;
|
|
32
|
+
}
|
|
33
|
+
// Status (always OK).
|
|
34
|
+
return [tt1, tt2, 0];
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=taitt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"taitt.js","sourceRoot":"","sources":["../src/taitt.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,IAAY,EAAE,IAAY;IAC9C,IAAI,GAAW,EAAE,GAAW,CAAA;IAE5B,kCAAkC;IAClC,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,IAAI,CAAA;IACnB,CAAC;SAAM,CAAC;QACN,GAAG,GAAG,IAAI,GAAG,IAAI,CAAA;QACjB,GAAG,GAAG,IAAI,CAAA;IACZ,CAAC;IAED,sBAAsB;IACtB,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,CAAA;AACtB,CAAC"}
|
package/dist/taiut1.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Time scale transformation: International Atomic Time, TAI, to Universal Time, UT1.
|
|
3
|
+
*
|
|
4
|
+
* Notes:
|
|
5
|
+
* 1. tai1+tai2 is Julian Date, apportioned in any convenient way between the two arguments,
|
|
6
|
+
* for example where tai1 is the Julian Day Number and tai2 is the fraction of a day. The
|
|
7
|
+
* returned ut11,ut12 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 tai1 TAI as a 2-part Julian Date
|
|
15
|
+
* @param tai2 TAI as a 2-part Julian Date
|
|
16
|
+
* @param dta UT1-TAI in seconds
|
|
17
|
+
* @returns [ut11, ut12, status]: UT1 as a 2-part Julian Date, and status: 0 = OK
|
|
18
|
+
*/
|
|
19
|
+
export declare function taiut1(tai1: number, tai2: number, dta: number): [ut11: number, ut12: number, status: number];
|
|
20
|
+
//# sourceMappingURL=taiut1.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"taiut1.d.ts","sourceRoot":"","sources":["../src/taiut1.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"}
|