@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
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// Translated from ERFA 2.0.1 eraGetLeapSeconds and eraSetLeapSeconds (erfadatextra.c, not
|
|
2
|
+
// derived from SOFA); see LICENSE. pyerfa uses these to load newer leap seconds
|
|
3
|
+
// (erfa.leap_seconds), as Astropy does from the IERS.
|
|
4
|
+
import { dat } from './dat.js';
|
|
5
|
+
import { getTable, setTable } from './datini.js';
|
|
6
|
+
/**
|
|
7
|
+
* Get the current leap second table: the one dat uses, as a copy.
|
|
8
|
+
*
|
|
9
|
+
* Each row is a year, a month and TAI minus UTC in seconds from the start of that month.
|
|
10
|
+
* The built-in table (dat's) starts with the 14 expressions of 1960 to 1968, to which dat
|
|
11
|
+
* adds a drift, and ends with the leap second of 2016 December 31 (37 s from 2017 January).
|
|
12
|
+
*
|
|
13
|
+
* In C, the table is initialized by calling eraDat if no call has yet, and -1 is returned if
|
|
14
|
+
* that fails, which can't happen with the built-in table.
|
|
15
|
+
*
|
|
16
|
+
* @returns the rows in use, copied: changing them changes nothing
|
|
17
|
+
*/
|
|
18
|
+
export function getLeapSeconds() {
|
|
19
|
+
if (getTable()[0] <= 0) {
|
|
20
|
+
dat(2000, 1, 1, 0.0);
|
|
21
|
+
}
|
|
22
|
+
const [NDAT, changes] = getTable();
|
|
23
|
+
return changes.slice(0, NDAT).map(({ iyear, month, delat }) => ({ iyear, month, delat }));
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Set the current leap second table: dat, and everything that calls it, uses it from the
|
|
27
|
+
* next call.
|
|
28
|
+
*
|
|
29
|
+
* Notes:
|
|
30
|
+
* 1. No sanity checks are performed, as in ERFA. The rows must be in date order, each the
|
|
31
|
+
* start of a month. dat applies its pre-1972 drift to the first 14 rows whatever they
|
|
32
|
+
* hold, and treats years before the first row's as before UTC, so a new table should
|
|
33
|
+
* keep the built-in table's rows and add to them (pyerfa's leap_seconds.update does).
|
|
34
|
+
* 2. An empty table, or none, causes a reset of the table to the built-in version.
|
|
35
|
+
* 3. The rows are copied: changing them afterwards changes nothing.
|
|
36
|
+
*
|
|
37
|
+
* @param leapseconds rows of year, month, TAI minus UTC (seconds)
|
|
38
|
+
*/
|
|
39
|
+
export function setLeapSeconds(leapseconds = []) {
|
|
40
|
+
setTable(leapseconds.map(({ iyear, month, delat }) => ({ iyear, month, delat })), leapseconds.length);
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=leap-seconds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"leap-seconds.js","sourceRoot":"","sources":["../src/leap-seconds.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,gFAAgF;AAChF,sDAAsD;AACtD,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAC9B,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAGhD;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,cAAc;IAC5B,IAAI,QAAQ,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;QACvB,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,CAAA;IACtB,CAAC;IACD,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,EAAE,CAAA;IAClC,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAA;AAC3F,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,cAAc,CAAC,WAAW,GAA0B,EAAE;IACpE,QAAQ,CACN,WAAW,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,EACvE,WAAW,CAAC,MAAM,CACnB,CAAA;AACH,CAAC"}
|
package/dist/obl06.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mean obliquity of the ecliptic, IAU 2006 precession model.
|
|
3
|
+
*
|
|
4
|
+
* Notes:
|
|
5
|
+
* 1. The TT date date1+date2 is a Julian Date, apportioned in any convenient way between
|
|
6
|
+
* the two arguments. For example, JD(TT)=2450123.7 could be given as (2450123.7, 0.0),
|
|
7
|
+
* the JD method; (2451545.0, -1421.3), the J2000 method; (2400000.5, 50123.2), the MJD
|
|
8
|
+
* method; or (2450123.5, 0.2), the date and time method. The J2000 method is best matched
|
|
9
|
+
* to the way the argument is handled internally and will deliver the optimum resolution.
|
|
10
|
+
* 2. The result is the angle between the ecliptic and mean equator of date date1+date2.
|
|
11
|
+
*
|
|
12
|
+
* Reference: Hilton, J. et al., 2006, Celest.Mech.Dyn.Astron. 94, 351
|
|
13
|
+
*
|
|
14
|
+
* @param date1 TT as a 2-part Julian Date (Note 1)
|
|
15
|
+
* @param date2 TT as a 2-part Julian Date (Note 1)
|
|
16
|
+
* @returns obliquity of the ecliptic (radians, Note 2)
|
|
17
|
+
*/
|
|
18
|
+
export declare function obl06(date1: number, date2: number): number;
|
|
19
|
+
//# sourceMappingURL=obl06.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"obl06.d.ts","sourceRoot":"","sources":["../src/obl06.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAa1D"}
|
package/dist/obl06.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// Translated from ERFA 2.0.1 eraObl06 (obl06.c); see LICENSE.
|
|
2
|
+
import { DAS2R, DJ00, DJC } from './constants.js';
|
|
3
|
+
/**
|
|
4
|
+
* Mean obliquity of the ecliptic, IAU 2006 precession model.
|
|
5
|
+
*
|
|
6
|
+
* Notes:
|
|
7
|
+
* 1. The TT date date1+date2 is a Julian Date, apportioned in any convenient way between
|
|
8
|
+
* the two arguments. For example, JD(TT)=2450123.7 could be given as (2450123.7, 0.0),
|
|
9
|
+
* the JD method; (2451545.0, -1421.3), the J2000 method; (2400000.5, 50123.2), the MJD
|
|
10
|
+
* method; or (2450123.5, 0.2), the date and time method. The J2000 method is best matched
|
|
11
|
+
* to the way the argument is handled internally and will deliver the optimum resolution.
|
|
12
|
+
* 2. The result is the angle between the ecliptic and mean equator of date date1+date2.
|
|
13
|
+
*
|
|
14
|
+
* Reference: Hilton, J. et al., 2006, Celest.Mech.Dyn.Astron. 94, 351
|
|
15
|
+
*
|
|
16
|
+
* @param date1 TT as a 2-part Julian Date (Note 1)
|
|
17
|
+
* @param date2 TT as a 2-part Julian Date (Note 1)
|
|
18
|
+
* @returns obliquity of the ecliptic (radians, Note 2)
|
|
19
|
+
*/
|
|
20
|
+
export function obl06(date1, date2) {
|
|
21
|
+
// Interval between fundamental date J2000.0 and given date (JC).
|
|
22
|
+
const t = ((date1 - DJ00) + date2) / DJC;
|
|
23
|
+
// Mean obliquity.
|
|
24
|
+
const eps0 = (84381.406 +
|
|
25
|
+
(-46.836769 +
|
|
26
|
+
(-0.0001831 +
|
|
27
|
+
(0.00200340 +
|
|
28
|
+
(-0.000000576 +
|
|
29
|
+
(-0.0000000434) * t) * t) * t) * t) * t) * DAS2R;
|
|
30
|
+
return eps0;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=obl06.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"obl06.js","sourceRoot":"","sources":["../src/obl06.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAA;AAEjD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,KAAK,CAAC,KAAa,EAAE,KAAa;IAChD,iEAAiE;IACjE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC,GAAG,GAAG,CAAA;IAExC,kBAAkB;IAClB,MAAM,IAAI,GAAG,CAAC,SAAS;QACV,CAAC,CAAC,SAAS;YACX,CAAE,CAAC,SAAS;gBACZ,CAAG,UAAU;oBACb,CAAE,CAAC,WAAW;wBACd,CAAE,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAA;IAE9D,OAAO,IAAI,CAAA;AACb,CAAC"}
|
package/dist/pap.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Vec3 } from './internal.ts';
|
|
2
|
+
/**
|
|
3
|
+
* Position-angle from two p-vectors.
|
|
4
|
+
*
|
|
5
|
+
* Notes:
|
|
6
|
+
* 1. The result is the position angle, in radians, of direction b with respect to direction
|
|
7
|
+
* a. It is in the range -pi to +pi. The sense is such that if b is a small distance
|
|
8
|
+
* "north" of a the position angle is approximately zero, and if b is a small distance
|
|
9
|
+
* "east" of a the position angle is approximately +pi/2.
|
|
10
|
+
* 2. The vectors a and b need not be of unit length.
|
|
11
|
+
* 3. Zero is returned if the two directions are the same or if either vector is null.
|
|
12
|
+
* 4. If vector a is at a pole, the result is ill-defined.
|
|
13
|
+
*
|
|
14
|
+
* @param a direction of reference point
|
|
15
|
+
* @param b direction of point whose PA is required
|
|
16
|
+
* @returns position angle of b with respect to a (radians)
|
|
17
|
+
*/
|
|
18
|
+
export declare function pap(a: Vec3, b: Vec3): number;
|
|
19
|
+
//# sourceMappingURL=pap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pap.d.ts","sourceRoot":"","sources":["../src/pap.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAOzC;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,GAAG,MAAM,CA6B5C"}
|
package/dist/pap.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { pdp } from './pdp.js';
|
|
2
|
+
import { pm } from './pm.js';
|
|
3
|
+
import { pmp } from './pmp.js';
|
|
4
|
+
import { pn } from './pn.js';
|
|
5
|
+
import { pxp } from './pxp.js';
|
|
6
|
+
/**
|
|
7
|
+
* Position-angle from two p-vectors.
|
|
8
|
+
*
|
|
9
|
+
* Notes:
|
|
10
|
+
* 1. The result is the position angle, in radians, of direction b with respect to direction
|
|
11
|
+
* a. It is in the range -pi to +pi. The sense is such that if b is a small distance
|
|
12
|
+
* "north" of a the position angle is approximately zero, and if b is a small distance
|
|
13
|
+
* "east" of a the position angle is approximately +pi/2.
|
|
14
|
+
* 2. The vectors a and b need not be of unit length.
|
|
15
|
+
* 3. Zero is returned if the two directions are the same or if either vector is null.
|
|
16
|
+
* 4. If vector a is at a pole, the result is ill-defined.
|
|
17
|
+
*
|
|
18
|
+
* @param a direction of reference point
|
|
19
|
+
* @param b direction of point whose PA is required
|
|
20
|
+
* @returns position angle of b with respect to a (radians)
|
|
21
|
+
*/
|
|
22
|
+
export function pap(a, b) {
|
|
23
|
+
let st, ct;
|
|
24
|
+
const [am, au] = pn(a);
|
|
25
|
+
const bm = pm(b);
|
|
26
|
+
if (am === 0.0 || bm === 0.0) {
|
|
27
|
+
st = 0.0;
|
|
28
|
+
ct = 1.0;
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
const xa = a[0];
|
|
32
|
+
const ya = a[1];
|
|
33
|
+
const za = a[2];
|
|
34
|
+
const eta = [-xa * za, -ya * za, xa * xa + ya * ya];
|
|
35
|
+
const xi = pxp(eta, au);
|
|
36
|
+
const a2b = pmp(b, a);
|
|
37
|
+
st = pdp(a2b, xi);
|
|
38
|
+
ct = pdp(a2b, eta);
|
|
39
|
+
if (st === 0.0 && ct === 0.0)
|
|
40
|
+
ct = 1.0;
|
|
41
|
+
}
|
|
42
|
+
const pa = Math.atan2(st, ct);
|
|
43
|
+
return pa;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=pap.js.map
|
package/dist/pap.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pap.js","sourceRoot":"","sources":["../src/pap.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;AAC9B,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAE9B;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,GAAG,CAAC,CAAO,EAAE,CAAO;IAClC,IAAI,EAAU,EAAE,EAAU,CAAA;IAE1B,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAA;IAEtB,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAA;IAEhB,IAAI,EAAE,KAAK,GAAG,IAAI,EAAE,KAAK,GAAG,EAAE,CAAC;QAC7B,EAAE,GAAG,GAAG,CAAA;QACR,EAAE,GAAG,GAAG,CAAA;IACV,CAAC;SAAM,CAAC;QACN,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QACf,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QACf,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QACf,MAAM,GAAG,GAAS,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAA;QAEzD,MAAM,EAAE,GAAG,GAAG,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;QAEvB,MAAM,GAAG,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QAErB,EAAE,GAAG,GAAG,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;QACjB,EAAE,GAAG,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;QAElB,IAAI,EAAE,KAAK,GAAG,IAAI,EAAE,KAAK,GAAG;YAAE,EAAE,GAAG,GAAG,CAAA;IACxC,CAAC;IAED,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;IAE7B,OAAO,EAAE,CAAA;AACX,CAAC"}
|
package/dist/pas.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Position-angle from spherical coordinates.
|
|
3
|
+
*
|
|
4
|
+
* Notes:
|
|
5
|
+
* 1. The result is the bearing (position angle), in radians, of point B with respect to
|
|
6
|
+
* point A. It is in the range -pi to +pi. The sense is such that if B is a small distance
|
|
7
|
+
* "east" of point A, the bearing is approximately +pi/2.
|
|
8
|
+
* 2. Zero is returned if the two points are coincident.
|
|
9
|
+
*
|
|
10
|
+
* @param al longitude of point A (e.g. RA) in radians
|
|
11
|
+
* @param ap latitude of point A (e.g. Dec) in radians
|
|
12
|
+
* @param bl longitude of point B
|
|
13
|
+
* @param bp latitude of point B
|
|
14
|
+
* @returns position angle of B with respect to A
|
|
15
|
+
*/
|
|
16
|
+
export declare function pas(al: number, ap: number, bl: number, bp: number): number;
|
|
17
|
+
//# sourceMappingURL=pas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pas.d.ts","sourceRoot":"","sources":["../src/pas.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAO1E"}
|
package/dist/pas.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Translated from ERFA 2.0.1 eraPas (pas.c); see LICENSE.
|
|
2
|
+
/**
|
|
3
|
+
* Position-angle from spherical coordinates.
|
|
4
|
+
*
|
|
5
|
+
* Notes:
|
|
6
|
+
* 1. The result is the bearing (position angle), in radians, of point B with respect to
|
|
7
|
+
* point A. It is in the range -pi to +pi. The sense is such that if B is a small distance
|
|
8
|
+
* "east" of point A, the bearing is approximately +pi/2.
|
|
9
|
+
* 2. Zero is returned if the two points are coincident.
|
|
10
|
+
*
|
|
11
|
+
* @param al longitude of point A (e.g. RA) in radians
|
|
12
|
+
* @param ap latitude of point A (e.g. Dec) in radians
|
|
13
|
+
* @param bl longitude of point B
|
|
14
|
+
* @param bp latitude of point B
|
|
15
|
+
* @returns position angle of B with respect to A
|
|
16
|
+
*/
|
|
17
|
+
export function pas(al, ap, bl, bp) {
|
|
18
|
+
const dl = bl - al;
|
|
19
|
+
const y = Math.sin(dl) * Math.cos(bp);
|
|
20
|
+
const x = Math.sin(bp) * Math.cos(ap) - Math.cos(bp) * Math.sin(ap) * Math.cos(dl);
|
|
21
|
+
const pa = x !== 0.0 || y !== 0.0 ? Math.atan2(y, x) : 0.0;
|
|
22
|
+
return pa;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=pas.js.map
|
package/dist/pas.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pas.js","sourceRoot":"","sources":["../src/pas.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAE1D;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,GAAG,CAAC,EAAU,EAAE,EAAU,EAAE,EAAU,EAAE,EAAU;IAChE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,CAAA;IAClB,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;IACrC,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;IAClF,MAAM,EAAE,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAA;IAE1D,OAAO,EAAE,CAAA;AACX,CAAC"}
|
package/dist/pdp.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdp.d.ts","sourceRoot":"","sources":["../src/pdp.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAEzC;;;;GAIG;AACH,wBAAgB,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,GAAG,MAAM,CAE5C"}
|
package/dist/pdp.js
ADDED
package/dist/pdp.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdp.js","sourceRoot":"","sources":["../src/pdp.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,MAAM,UAAU,GAAG,CAAC,CAAO,EAAE,CAAO;IAClC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;AAChD,CAAC"}
|
package/dist/pfw06.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Precession angles, IAU 2006 (Fukushima-Williams 4-angle formulation).
|
|
3
|
+
*
|
|
4
|
+
* Notes:
|
|
5
|
+
* 1. The TT date date1+date2 is a Julian Date, apportioned in any convenient way between
|
|
6
|
+
* the two arguments. For example, JD(TT)=2450123.7 could be given as (2450123.7, 0.0),
|
|
7
|
+
* the JD method; (2451545.0, -1421.3), the J2000 method; (2400000.5, 50123.2), the MJD
|
|
8
|
+
* method; or (2450123.5, 0.2), the date and time method. The J2000 method is best matched
|
|
9
|
+
* to the way the argument is handled internally and will deliver the optimum resolution.
|
|
10
|
+
* 2. Naming the following points:
|
|
11
|
+
*
|
|
12
|
+
* e = J2000.0 ecliptic pole,
|
|
13
|
+
* p = GCRS pole,
|
|
14
|
+
* E = mean ecliptic pole of date,
|
|
15
|
+
* and P = mean pole of date,
|
|
16
|
+
*
|
|
17
|
+
* the four Fukushima-Williams angles are as follows:
|
|
18
|
+
*
|
|
19
|
+
* gamb = gamma_bar = epE
|
|
20
|
+
* phib = phi_bar = pE
|
|
21
|
+
* psib = psi_bar = pEP
|
|
22
|
+
* epsa = epsilon_A = EP
|
|
23
|
+
*
|
|
24
|
+
* 3. The matrix representing the combined effects of frame bias and precession is:
|
|
25
|
+
*
|
|
26
|
+
* PxB = R_1(-epsa).R_3(-psib).R_1(phib).R_3(gamb)
|
|
27
|
+
*
|
|
28
|
+
* 4. The matrix representing the combined effects of frame bias, precession and nutation
|
|
29
|
+
* is simply:
|
|
30
|
+
*
|
|
31
|
+
* NxPxB = R_1(-epsa-dE).R_3(-psib-dP).R_1(phib).R_3(gamb)
|
|
32
|
+
*
|
|
33
|
+
* where dP and dE are the nutation components with respect to the ecliptic of date.
|
|
34
|
+
*
|
|
35
|
+
* Reference: Hilton, J. et al., 2006, Celest.Mech.Dyn.Astron. 94, 351
|
|
36
|
+
*
|
|
37
|
+
* @param date1 TT as a 2-part Julian Date (Note 1)
|
|
38
|
+
* @param date2 TT as a 2-part Julian Date (Note 1)
|
|
39
|
+
* @returns [gamb, phib, psib, epsa]: F-W angles gamma_bar, phi_bar, psi_bar and epsilon_A
|
|
40
|
+
* (radians)
|
|
41
|
+
*/
|
|
42
|
+
export declare function pfw06(date1: number, date2: number): [gamb: number, phib: number, psib: number, epsa: number];
|
|
43
|
+
//# sourceMappingURL=pfw06.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pfw06.d.ts","sourceRoot":"","sources":["../src/pfw06.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAgB,KAAK,CACnB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,GACZ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CA6B1D"}
|
package/dist/pfw06.js
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// Translated from ERFA 2.0.1 eraPfw06 (pfw06.c); see LICENSE.
|
|
2
|
+
import { DAS2R, DJ00, DJC } from './constants.js';
|
|
3
|
+
import { obl06 } from './obl06.js';
|
|
4
|
+
/**
|
|
5
|
+
* Precession angles, IAU 2006 (Fukushima-Williams 4-angle formulation).
|
|
6
|
+
*
|
|
7
|
+
* Notes:
|
|
8
|
+
* 1. The TT date date1+date2 is a Julian Date, apportioned in any convenient way between
|
|
9
|
+
* the two arguments. For example, JD(TT)=2450123.7 could be given as (2450123.7, 0.0),
|
|
10
|
+
* the JD method; (2451545.0, -1421.3), the J2000 method; (2400000.5, 50123.2), the MJD
|
|
11
|
+
* method; or (2450123.5, 0.2), the date and time method. The J2000 method is best matched
|
|
12
|
+
* to the way the argument is handled internally and will deliver the optimum resolution.
|
|
13
|
+
* 2. Naming the following points:
|
|
14
|
+
*
|
|
15
|
+
* e = J2000.0 ecliptic pole,
|
|
16
|
+
* p = GCRS pole,
|
|
17
|
+
* E = mean ecliptic pole of date,
|
|
18
|
+
* and P = mean pole of date,
|
|
19
|
+
*
|
|
20
|
+
* the four Fukushima-Williams angles are as follows:
|
|
21
|
+
*
|
|
22
|
+
* gamb = gamma_bar = epE
|
|
23
|
+
* phib = phi_bar = pE
|
|
24
|
+
* psib = psi_bar = pEP
|
|
25
|
+
* epsa = epsilon_A = EP
|
|
26
|
+
*
|
|
27
|
+
* 3. The matrix representing the combined effects of frame bias and precession is:
|
|
28
|
+
*
|
|
29
|
+
* PxB = R_1(-epsa).R_3(-psib).R_1(phib).R_3(gamb)
|
|
30
|
+
*
|
|
31
|
+
* 4. The matrix representing the combined effects of frame bias, precession and nutation
|
|
32
|
+
* is simply:
|
|
33
|
+
*
|
|
34
|
+
* NxPxB = R_1(-epsa-dE).R_3(-psib-dP).R_1(phib).R_3(gamb)
|
|
35
|
+
*
|
|
36
|
+
* where dP and dE are the nutation components with respect to the ecliptic of date.
|
|
37
|
+
*
|
|
38
|
+
* Reference: Hilton, J. et al., 2006, Celest.Mech.Dyn.Astron. 94, 351
|
|
39
|
+
*
|
|
40
|
+
* @param date1 TT as a 2-part Julian Date (Note 1)
|
|
41
|
+
* @param date2 TT as a 2-part Julian Date (Note 1)
|
|
42
|
+
* @returns [gamb, phib, psib, epsa]: F-W angles gamma_bar, phi_bar, psi_bar and epsilon_A
|
|
43
|
+
* (radians)
|
|
44
|
+
*/
|
|
45
|
+
export function pfw06(date1, date2) {
|
|
46
|
+
// Interval between fundamental date J2000.0 and given date (JC).
|
|
47
|
+
const t = ((date1 - DJ00) + date2) / DJC;
|
|
48
|
+
// P03 bias+precession angles.
|
|
49
|
+
const gamb = (-0.052928 +
|
|
50
|
+
(10.556378 +
|
|
51
|
+
(0.4932044 +
|
|
52
|
+
(-0.00031238 +
|
|
53
|
+
(-0.000002788 +
|
|
54
|
+
(0.0000000260)
|
|
55
|
+
* t) * t) * t) * t) * t) * DAS2R;
|
|
56
|
+
const phib = (84381.412819 +
|
|
57
|
+
(-46.811016 +
|
|
58
|
+
(0.0511268 +
|
|
59
|
+
(0.00053289 +
|
|
60
|
+
(-0.000000440 +
|
|
61
|
+
(-0.0000000176)
|
|
62
|
+
* t) * t) * t) * t) * t) * DAS2R;
|
|
63
|
+
const psib = (-0.041775 +
|
|
64
|
+
(5038.481484 +
|
|
65
|
+
(1.5584175 +
|
|
66
|
+
(-0.00018522 +
|
|
67
|
+
(-0.000026452 +
|
|
68
|
+
(-0.0000000148)
|
|
69
|
+
* t) * t) * t) * t) * t) * DAS2R;
|
|
70
|
+
const epsa = obl06(date1, date2);
|
|
71
|
+
return [gamb, phib, psib, epsa];
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=pfw06.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pfw06.js","sourceRoot":"","sources":["../src/pfw06.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,MAAM,UAAU,KAAK,CACnB,KAAa,EACb,KAAa;IAEb,iEAAiE;IACjE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC,GAAG,GAAG,CAAA;IAExC,8BAA8B;IAC9B,MAAM,IAAI,GAAG,CAAK,CAAC,QAAQ;QACd,CAAK,SAAS;YACd,CAAM,SAAS;gBACf,CAAK,CAAC,UAAU;oBAChB,CAAK,CAAC,WAAW;wBACjB,CAAM,YAAY,CAAE;8BAClB,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAA;IAC7C,MAAM,IAAI,GAAG,CAAE,YAAY;QACd,CAAI,CAAC,SAAS;YACd,CAAM,SAAS;gBACf,CAAM,UAAU;oBAChB,CAAK,CAAC,WAAW;wBACjB,CAAK,CAAC,YAAY,CAAE;8BAClB,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAA;IAC7C,MAAM,IAAI,GAAG,CAAK,CAAC,QAAQ;QACd,CAAG,WAAW;YACd,CAAM,SAAS;gBACf,CAAK,CAAC,UAAU;oBAChB,CAAK,CAAC,WAAW;wBACjB,CAAK,CAAC,YAAY,CAAE;8BAClB,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAA;IAC7C,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;IAEhC,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AACjC,CAAC"}
|
package/dist/pm.d.ts
ADDED
package/dist/pm.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pm.d.ts","sourceRoot":"","sources":["../src/pm.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAEzC;;;;GAIG;AACH,wBAAgB,EAAE,CAAC,CAAC,EAAE,IAAI,GAAG,MAAM,CAElC"}
|
package/dist/pm.js
ADDED
package/dist/pm.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pm.js","sourceRoot":"","sources":["../src/pm.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,MAAM,UAAU,EAAE,CAAC,CAAO;IACxB,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AAC3D,CAAC"}
|
package/dist/pmat06.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Mat3 } from './internal.ts';
|
|
2
|
+
/**
|
|
3
|
+
* Precession matrix (including frame bias) from GCRS to a specified date, IAU 2006 model.
|
|
4
|
+
*
|
|
5
|
+
* Notes:
|
|
6
|
+
* 1. The TT date date1+date2 is a Julian Date, apportioned in any convenient way between
|
|
7
|
+
* the two arguments. For example, JD(TT)=2450123.7 could be given as (2450123.7, 0.0),
|
|
8
|
+
* the JD method; (2451545.0, -1421.3), the J2000 method; (2400000.5, 50123.2), the MJD
|
|
9
|
+
* method; or (2450123.5, 0.2), the date and time method. The J2000 method is best matched
|
|
10
|
+
* to the way the argument is handled internally and will deliver the optimum resolution.
|
|
11
|
+
* 2. The matrix operates in the sense V(date) = rbp * V(GCRS), where the p-vector V(GCRS) is
|
|
12
|
+
* with respect to the Geocentric Celestial Reference System (IAU, 2000) and the p-vector
|
|
13
|
+
* V(date) is with respect to the mean equatorial triad of the given date.
|
|
14
|
+
*
|
|
15
|
+
* References:
|
|
16
|
+
* - Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855
|
|
17
|
+
* - IAU: Trans. International Astronomical Union, Vol. XXIVB; Proc. 24th General Assembly,
|
|
18
|
+
* Manchester, UK. Resolutions B1.3, B1.6. (2000)
|
|
19
|
+
* - Wallace, P.T. & Capitaine, N., 2006, Astron.Astrophys. 459, 981
|
|
20
|
+
*
|
|
21
|
+
* @param date1 TT as a 2-part Julian Date (Note 1)
|
|
22
|
+
* @param date2 TT as a 2-part Julian Date (Note 1)
|
|
23
|
+
* @returns rbp: bias-precession matrix (Note 2)
|
|
24
|
+
*/
|
|
25
|
+
export declare function pmat06(date1: number, date2: number): Mat3;
|
|
26
|
+
//# sourceMappingURL=pmat06.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pmat06.d.ts","sourceRoot":"","sources":["../src/pmat06.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAGzC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAQzD"}
|
package/dist/pmat06.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// Translated from ERFA 2.0.1 eraPmat06 (pmat06.c); see LICENSE.
|
|
2
|
+
import { fw2m } from './fw2m.js';
|
|
3
|
+
import { pfw06 } from './pfw06.js';
|
|
4
|
+
/**
|
|
5
|
+
* Precession matrix (including frame bias) from GCRS to a specified date, IAU 2006 model.
|
|
6
|
+
*
|
|
7
|
+
* Notes:
|
|
8
|
+
* 1. The TT date date1+date2 is a Julian Date, apportioned in any convenient way between
|
|
9
|
+
* the two arguments. For example, JD(TT)=2450123.7 could be given as (2450123.7, 0.0),
|
|
10
|
+
* the JD method; (2451545.0, -1421.3), the J2000 method; (2400000.5, 50123.2), the MJD
|
|
11
|
+
* method; or (2450123.5, 0.2), the date and time method. The J2000 method is best matched
|
|
12
|
+
* to the way the argument is handled internally and will deliver the optimum resolution.
|
|
13
|
+
* 2. The matrix operates in the sense V(date) = rbp * V(GCRS), where the p-vector V(GCRS) is
|
|
14
|
+
* with respect to the Geocentric Celestial Reference System (IAU, 2000) and the p-vector
|
|
15
|
+
* V(date) is with respect to the mean equatorial triad of the given date.
|
|
16
|
+
*
|
|
17
|
+
* References:
|
|
18
|
+
* - Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855
|
|
19
|
+
* - IAU: Trans. International Astronomical Union, Vol. XXIVB; Proc. 24th General Assembly,
|
|
20
|
+
* Manchester, UK. Resolutions B1.3, B1.6. (2000)
|
|
21
|
+
* - Wallace, P.T. & Capitaine, N., 2006, Astron.Astrophys. 459, 981
|
|
22
|
+
*
|
|
23
|
+
* @param date1 TT as a 2-part Julian Date (Note 1)
|
|
24
|
+
* @param date2 TT as a 2-part Julian Date (Note 1)
|
|
25
|
+
* @returns rbp: bias-precession matrix (Note 2)
|
|
26
|
+
*/
|
|
27
|
+
export function pmat06(date1, date2) {
|
|
28
|
+
// Bias-precession Fukushima-Williams angles.
|
|
29
|
+
const [gamb, phib, psib, epsa] = pfw06(date1, date2);
|
|
30
|
+
// Form the matrix.
|
|
31
|
+
const rbp = fw2m(gamb, phib, psib, epsa);
|
|
32
|
+
return rbp;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=pmat06.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pmat06.js","sourceRoot":"","sources":["../src/pmat06.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEhC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAElC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAAU,MAAM,CAAC,KAAa,EAAE,KAAa;IACjD,6CAA6C;IAC7C,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;IAEpD,mBAAmB;IACnB,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;IAExC,OAAO,GAAG,CAAA;AACZ,CAAC"}
|
package/dist/pmp.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pmp.d.ts","sourceRoot":"","sources":["../src/pmp.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAEzC;;;;;;GAMG;AACH,wBAAgB,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,CAE1C"}
|
package/dist/pmp.js
ADDED
package/dist/pmp.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pmp.js","sourceRoot":"","sources":["../src/pmp.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,MAAM,UAAU,GAAG,CAAC,CAAO,EAAE,CAAO;IAClC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AAChD,CAAC"}
|
package/dist/pmpx.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Vec3 } from './internal.ts';
|
|
2
|
+
/**
|
|
3
|
+
* Proper motion and parallax.
|
|
4
|
+
*
|
|
5
|
+
* Notes:
|
|
6
|
+
* 1. The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt.
|
|
7
|
+
* 2. The proper motion time interval is for when the starlight reaches the solar system
|
|
8
|
+
* barycenter.
|
|
9
|
+
* 3. To avoid the need for iteration, the Roemer effect (i.e. the small annual modulation
|
|
10
|
+
* of the proper motion coming from the changing light time) is applied approximately,
|
|
11
|
+
* using the direction of the star at the catalog epoch.
|
|
12
|
+
*
|
|
13
|
+
* References:
|
|
14
|
+
* - 1984 Astronomical Almanac, pp B39-B41.
|
|
15
|
+
* - Urban, S. & Seidelmann, P. K. (eds), Explanatory Supplement to the Astronomical Almanac,
|
|
16
|
+
* 3rd ed., University Science Books (2013), Section 7.2.
|
|
17
|
+
*
|
|
18
|
+
* @param rc ICRS RA at catalog epoch (radians)
|
|
19
|
+
* @param dc ICRS Dec at catalog epoch (radians)
|
|
20
|
+
* @param pr RA proper motion (radians/year, Note 1)
|
|
21
|
+
* @param pd Dec proper motion (radians/year)
|
|
22
|
+
* @param px parallax (arcsec)
|
|
23
|
+
* @param rv radial velocity (km/s, +ve if receding)
|
|
24
|
+
* @param pmt proper motion time interval (SSB, Julian years)
|
|
25
|
+
* @param pob SSB to observer vector (au)
|
|
26
|
+
* @returns pco: coordinate direction (BCRS unit vector)
|
|
27
|
+
*/
|
|
28
|
+
export declare function pmpx(rc: number, dc: number, pr: number, pd: number, px: number, rv: number, pmt: number, pob: Vec3): Vec3;
|
|
29
|
+
//# sourceMappingURL=pmpx.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pmpx.d.ts","sourceRoot":"","sources":["../src/pmpx.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAIzC;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,IAAI,CAClB,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,IAAI,GACR,IAAI,CAiCN"}
|
package/dist/pmpx.js
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// Translated from ERFA 2.0.1 eraPmpx (pmpx.c); see LICENSE.
|
|
2
|
+
import { AULT, DAS2R, DAU, DAYSEC, DJM, DJY } from './constants.js';
|
|
3
|
+
import { pdp } from './pdp.js';
|
|
4
|
+
import { pn } from './pn.js';
|
|
5
|
+
/**
|
|
6
|
+
* Proper motion and parallax.
|
|
7
|
+
*
|
|
8
|
+
* Notes:
|
|
9
|
+
* 1. The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt.
|
|
10
|
+
* 2. The proper motion time interval is for when the starlight reaches the solar system
|
|
11
|
+
* barycenter.
|
|
12
|
+
* 3. To avoid the need for iteration, the Roemer effect (i.e. the small annual modulation
|
|
13
|
+
* of the proper motion coming from the changing light time) is applied approximately,
|
|
14
|
+
* using the direction of the star at the catalog epoch.
|
|
15
|
+
*
|
|
16
|
+
* References:
|
|
17
|
+
* - 1984 Astronomical Almanac, pp B39-B41.
|
|
18
|
+
* - Urban, S. & Seidelmann, P. K. (eds), Explanatory Supplement to the Astronomical Almanac,
|
|
19
|
+
* 3rd ed., University Science Books (2013), Section 7.2.
|
|
20
|
+
*
|
|
21
|
+
* @param rc ICRS RA at catalog epoch (radians)
|
|
22
|
+
* @param dc ICRS Dec at catalog epoch (radians)
|
|
23
|
+
* @param pr RA proper motion (radians/year, Note 1)
|
|
24
|
+
* @param pd Dec proper motion (radians/year)
|
|
25
|
+
* @param px parallax (arcsec)
|
|
26
|
+
* @param rv radial velocity (km/s, +ve if receding)
|
|
27
|
+
* @param pmt proper motion time interval (SSB, Julian years)
|
|
28
|
+
* @param pob SSB to observer vector (au)
|
|
29
|
+
* @returns pco: coordinate direction (BCRS unit vector)
|
|
30
|
+
*/
|
|
31
|
+
export function pmpx(rc, dc, pr, pd, px, rv, pmt, pob) {
|
|
32
|
+
// Km/s to au/year
|
|
33
|
+
const VF = DAYSEC * DJM / DAU;
|
|
34
|
+
// Light time for 1 au, Julian years
|
|
35
|
+
const AULTY = AULT / DAYSEC / DJY;
|
|
36
|
+
// Spherical coordinates to unit vector (and useful functions).
|
|
37
|
+
const sr = Math.sin(rc);
|
|
38
|
+
const cr = Math.cos(rc);
|
|
39
|
+
const sd = Math.sin(dc);
|
|
40
|
+
const cd = Math.cos(dc);
|
|
41
|
+
const x = cr * cd;
|
|
42
|
+
const y = sr * cd;
|
|
43
|
+
const z = sd;
|
|
44
|
+
const p = [x, y, z];
|
|
45
|
+
// Proper motion time interval (y) including Roemer effect.
|
|
46
|
+
const dt = pmt + pdp(p, pob) * AULTY;
|
|
47
|
+
// Space motion (radians per year).
|
|
48
|
+
const pxr = px * DAS2R;
|
|
49
|
+
const w = VF * rv * pxr;
|
|
50
|
+
const pdz = pd * z;
|
|
51
|
+
const pm = [-pr * y - pdz * cr + w * x, pr * x - pdz * sr + w * y, pd * cd + w * z];
|
|
52
|
+
// Coordinate direction of star (unit vector, BCRS).
|
|
53
|
+
for (let i = 0; i < 3; i++) {
|
|
54
|
+
p[i] = p[i] + (dt * pm[i] - pxr * pob[i]);
|
|
55
|
+
}
|
|
56
|
+
const [, pco] = pn(p);
|
|
57
|
+
return pco;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=pmpx.js.map
|
package/dist/pmpx.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pmpx.js","sourceRoot":"","sources":["../src/pmpx.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAA;AAEnE,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAC9B,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAE5B;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,UAAU,IAAI,CAClB,EAAU,EACV,EAAU,EACV,EAAU,EACV,EAAU,EACV,EAAU,EACV,EAAU,EACV,GAAW,EACX,GAAS;IAET,kBAAkB;IAClB,MAAM,EAAE,GAAG,MAAM,GAAG,GAAG,GAAG,GAAG,CAAA;IAE7B,oCAAoC;IACpC,MAAM,KAAK,GAAG,IAAI,GAAG,MAAM,GAAG,GAAG,CAAA;IAEjC,+DAA+D;IAC/D,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;IACvB,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;IACvB,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;IACvB,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;IACvB,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,CAAA;IACjB,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,CAAA;IACjB,MAAM,CAAC,GAAG,EAAE,CAAA;IACZ,MAAM,CAAC,GAA6B,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;IAE7C,2DAA2D;IAC3D,MAAM,EAAE,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,KAAK,CAAA;IAEpC,mCAAmC;IACnC,MAAM,GAAG,GAAG,EAAE,GAAG,KAAK,CAAA;IACtB,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,CAAA;IACvB,MAAM,GAAG,GAAG,EAAE,GAAG,CAAC,CAAA;IAClB,MAAM,EAAE,GAAS,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,GAAG,GAAG,EAAE,GAAG,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,CAAC,GAAG,GAAG,GAAG,EAAE,GAAG,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAAA;IAEzF,oDAAoD;IACpD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC3B,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAE,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAE,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC,CAAE,CAAC,CAAA;IAC9C,CAAC;IACD,MAAM,CAAC,EAAE,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAA;IAErB,OAAO,GAAG,CAAA;AACZ,CAAC"}
|