# How can I obtain the position of the Earth on the orbit for given date?

I would like to be able calculate (or at least download some time-series data of) the position of the Earth on it's orbit at given date. For my purposes, it would be sufficient to account for the first and second Kepler's laws within the range of one Julian year (but any refinement would be welcome). So essentially, I would like to have a function $f(t) = (r, θ)$ where $t$ is date represented as the elapsed time since a selected referential event (I assume a perihelion would be the natural choice, but it could as well be a solstice, New year etc) and $(r, θ)$ are the polar coordinates of the Earth (preferably relative to the Sun as a focus). How would I do that? I thought this would be a standard problem, but I have failed to google it.

• Have you checked Wikipedia's Kepler's laws - Position as a function of time? – stafusa Jan 4 '18 at 1:13
• the astronomical reference book for positions of objects in the sky as functions of seconds, minutes, hours...years is called an ephemeris and is used by nasa to plan space missions. what you want is to get hold of a nasa guy who can extract the info you need from an existing ephemeris. try this on the engineering stack exchange. – niels nielsen Jan 4 '18 at 6:57
• Thanks for the wikipedia page. I was unsure how to compute the anomalies, but it seems described there in sufficient detail. – user1747134 Jan 4 '18 at 10:33
• Have you looked up the JPL HORIZONS project? – honeste_vivere Jan 4 '18 at 13:49
• If you are familiar with Python, have a look at PyEphem project, it has quite active StackOverflow tag – A.V.S. Jan 4 '18 at 19:04