gmiller123456 / vsop87-multilang

VSOP87 in multiple programming languages
https://www.celestialprogramming.com/
Other
55 stars 8 forks source link

Where is astrolib.js #2

Closed artyom-beilis closed 1 year ago

artyom-beilis commented 1 year ago

Hello,

I'm using vsop87 in AstroHopper application. I used Languages/JavaScript/astrolib.js script but when I tried to update to latest version it is gone.

What is an alternative?

I used it to extract RA/DE coordinates of the solar system bodies like this: https://github.com/artyom-beilis/skyhopper/blob/main/astrohopper.html#L1103

I notices some discrepancy between the coordinates I get and other software like stellarium, I wanted to check an updated version but astrolib.js has gone.

gmiller123456 commented 1 year ago

Looks like you found it was just renamed to CelestialProgrammingReduce.js.

Stellarium might not be a good choice for accurate ephemeris. JPL Horizons (https://ssd.jpl.nasa.gov/horizons/app.html#/ ) and NOVAS (https://aa.usno.navy.mil/software/novas_info ) are what I test against.

artyom-beilis commented 1 year ago

Looks like you found it was just renamed to CelestialProgrammingReduce.js.

Yes I found the new API

Stellarium might not be a good choice for accurate ephemeris.

Actually the problem was my bug, it was accurate I printed stuff incorrectly. And for Moon I just needed to use "large" variant and not xsmall.

I'm embedding vsop87s into a small web-page so size matters a lot. The demand for the accuracy for my app isn't high (few minutes of arc is more than sufficient). But for Moon xsmall was just too small. I merged xsmall for planets, large for moon/EMB and micro for EMB/Earth velocity into a single file and got the accuracy I needed.

Thanks a lot for this library!

gmiller123456 commented 1 year ago

If all you need is a few arcminutes accuracy, you can delete the part where it computes aberration, and that will eliminate the need for the velocity of Earth. That would introduce an error on the order of 30 arcseconds max.