skyfielders / python-skyfield

Elegant astronomy for Python
MIT License
1.41k stars 211 forks source link

Orbiting Elements #305

Closed Bernmeister closed 4 years ago

Bernmeister commented 4 years ago

Will Skyfield support loading orbital element data to compute rise/set for comets, asteroids and minor planets, as does PyEphem?

In my PyEphem application, I use data from the Minor Planet Center which provides data in the format for XEphem, but there are other formats available which may be more friendly to Skyfield.

brandon-rhodes commented 4 years ago

Support for generating positions from orbital elements has never yet been added officially because no contributor has yet had time to sit down and make Skyfield agree with NASA HORIZONS about the position, at a given time, of a comet or asteroid.

Someone will need to sit down and write a simple test that takes a OsculatingElements object, fills it with the orbital parameters of a comet or asteroid, and then does the raw math to produce the same (by which I mean "nearly the same") vector position as HORIZONS produces for the same orbital elements and date.

Alternatively, the math might be easier if done with pure vectors. I think I've seen math that goes directly from one position vector to another. If we could do , that would also work.

Either way, once someone reaches the breakthrough of computing a position in Python that gets the same answer as HORIZONS, I can then very easily wrap the result up in the right kind of object so the positions work with the rest of the Skyfield ecosystem.

I believe this is a duplicate of #11. If you agree, we can close this issue and continue discussion there. Also, a solution to this would solve #302.