3
$\begingroup$

I'm trying to build a 3D model of the Sun, Earth and Moon in in Javascript (using Three.JS, which relies on x,y,z coordinates for all objects) in order to simulate the Aug. 21 eclipse. I've successfully figured this out using the Kepler method that NASA describes, but would like to use the HORIZON ephemeris data for greater accuracy, given how sensitive the timing of an eclipse can be.

I've read up on celestial coordinates, but still can't quite figure out how to take the output of the HORIZON tool and convert RA, Dec, etc into 3D coordinates, the way the Kepler document outlines. Can anyone point me to an authoritative primer one how to get from celestial coordinates to geometric coordinates?

Coordinates based on AU are just fine -- I've already figured out how to scale that in the simulator.

Thank you!

$\endgroup$
2
  • $\begingroup$ I think what you really need/want are the CSPICE libraries (which is where HORIZONS gets its answers): naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/index.html -- you can get 3D coordinates directly from that (and you should be able to get them from HORIZONS, no?). You may also like wgc.jpl.nasa.gov:8080/webgeocalc/#NewCalculation which definitely gives x y z values. $\endgroup$
    – user21
    Jul 15, 2017 at 18:22
  • $\begingroup$ Feel free to ping me for free help-- contact info should be in profile. $\endgroup$
    – user21
    Jul 15, 2017 at 18:32

1 Answer 1

1
$\begingroup$

I just went through this by myself. The principal thing you have to do is choose the vector format for your ephemeris, and then download the ephemeris as a plain text (ascii) table. This is way easier than using the Spice tools.

$\endgroup$
2
  • $\begingroup$ I was actually able to using the Python SpicyPy library to get the coordinates quite easily! It's a fantastic tool. $\endgroup$ Jul 19, 2017 at 21:29
  • $\begingroup$ @ChrisWilson if you are so inclined, you could leave an answer here and even accept it. Also, this answer has lots of python goodies for calculating orbits and reading Horizons data. $\endgroup$
    – uhoh
    Oct 16, 2017 at 17:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .