6
$\begingroup$

I would like to be able to connect to a web-service and retrieve JSON data containing information on current (as of today or so) orbits of planets, comets, asteroids, and dwarf planets in our solar system. (Even just planets would be fine but better if I can get info about asteroids, comets, and dwarf planets as well). I would like to draw planets and their orbits accurately in a 2D animation of our solar system in an Android app in the X-Y coordinate plane as observed from the top of the Z axis.

Where can I find such public web service and how can I access it and get that data?

UPDATE I tried using HORIZONS Web-Interface but out of all variables I need, I can see only "Semi-Annual Axis" information. I need following information:

  • orbital ellipse angle in X-Y coordinate system (i.e 1.5rad or degrees or so)

  • motion direction (pro-grade or retrograde)

  • current position of planet/comet/asteroids on that ellipsis in degrees or radians, say 60deg from x (horizontal) axis

  • time it takes plant to go around the sun (I believe this is called orbital period)

  • eccentricity of ellipse (orbit)

  • semi-annual axis

These are the values that give me enough information to draw orbit (ellipsis) and correctly position planet on that ellipsis, and to calculate speed at which it moves around the sun in my 2D model.

So, I am not interested in inclination or any parameters that would be useful for a 3D model.

I can find this data online but it takes lots of searching since I have not been able to find a central place for it. HORIZONS seems to be such place but out of variables I need (as described above), I can find there only semi-annual axis in HORIZONS. I am surprised that I cannot fine a public web-service offering this info (REST or SOAP, or whatever, does not matter as long as I can fetch that data and process it for my needs from my application).

I apologize if my explanation is somewhat unclear, I am not an astronomer.

Hope that explains.

$\endgroup$
  • 3
    $\begingroup$ Possible duplicate of Planets and moons positions in cartesian coordinates? $\endgroup$ – FJC Oct 12 '15 at 11:51
  • 1
    $\begingroup$ @FJC Thanks for the answer but that was not exactly what I am looking for. I need to access a web service from my application and retrieve following data: eccentricity, semi-major axis, orbital period around sun, position of the body on that day in X-Y coordinate system as observed from top of Z coordinate (2D), preferably, orbiting ellipsis orientation in X-Y coordinates, retrograde or prograde motion. As far as I can see, the above will provide only semi-major axis but not as web service (restfull web service). I have updated my question above. Much appreciated. $\endgroup$ – user9457 Oct 12 '15 at 21:30
  • $\begingroup$ Is the data somewhere? This has been on my mind, too, and if the data is somewhere I'd be happy to see about putting a JSON API front-end on it. $\endgroup$ – dudemonkey Oct 13 '15 at 22:00
  • $\begingroup$ @user9457 I don't think "how can I access it" is on topic here. $\endgroup$ – called2voyage Oct 14 '15 at 13:56
  • 1
    $\begingroup$ As you suspected, you can do this using HORIZONS. Under "Ephemeris Type", choose "orbital elements" instead of "observer". Let me know if that doesn't help. $\endgroup$ – barrycarter Nov 9 '17 at 12:07
2
$\begingroup$

Not quite the webservice, but there is a JavaScript library Orb2.js with examples including X-Y(-Z) in ecliptic coordinates. So maybe you can compute it directly, not relying on some external service:

http://www.lizard-tail.com/isana/lab/orbjs/

As far as I do not use it actively, it just a pointer to site to explore, not a definitive solution for you.

$\endgroup$
2
$\begingroup$

For orbital elements (and more), I can't think of a better source than the web service offered by the Minor Planet Center. Not everything you are asking for comes out of the box, but you can compute them from orbital elements.

MPC Web Service

The MPC is providing a web service interface to users, allowing them to programmatically fetch minor planet properties data from the MPC's database. Data can be returned in either JSON or XML format. The default format is XML, and will be used unless JSON format is specified as a parameter.

A Java interface to this service exists on GitLab.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.