# How to specify a point along the ephemerides of a comet

I'm working on a tool to simulate comet trajectories. Just the usual method where you place the sun and the planets in their orbits and then solve for the comets' trajectories using the gravitation law (perhaps taking into account sublimation etc. for better precision). There are websites that will give you the orbital elements corresponding to a comet, with some epoch. However it is not specified where the comet is at the epoch. Question:

I would like to put a known comet on its observed ephemerides a fair distance away from the sun on its way in, so I can observe it coming in, turning, and going out. How can I find such a position using data in the available databases?

(This is the algorithm I use to determine the position of the planets, I think it might be helpful in this case as well.)

• To address the specific question, in the HORIZONS ephemerides when asking for "elements" as an example, you will find TP for time at periapsis. E.g. for Halley's comet, you will see TP= 2446467.3953170511 and TP= 1986-Feb-05.8953170511. With the time at periapsis, you can find the position of the comet at any time. You can also ask for "vectors" on that system, and get position and velocity directly at the requested times. Today, Halley's comet is at -2.044172910106513E+01 2.492823871168252E+01 -9.730954540464577E+00, in AU. Feb 26 '14 at 14:45