language agnostic - Computing Earth orbit position and rotations -


i want compute earth position (relative sun) , axis rotations given date , time. it's ok assume sun stationary @ 0,0,0 coordinate. minor deflections, due moons gravitational pull example, can ignored. accurate within degree or enough.

are there libraries/source/data out there me accomplish this?

the aa-56 code, which can downloaded here, includes solar ephemeris meet needs. high-precision work you'd want more accurate jpl's de421, there inconveniently large tables of coefficients involved, , it's extreme overkill if you're happy 1 degree accuracy.

the earth's rotation @ given time given greenwich sidereal time.
jean meeus' "astronomical algorithms" (a reference have these sorts of calculations!) gives formula theta0 (cumulative rotation angle in degrees) in terms of julian date jd:

t = (jd - 2451545.0 ) / 36525  theta0 = 280.46061837 + 360.98564736629*(jd-2451545.0) +             0.000387933*t*t - t*t*t/38710000.0 

theta0 = 0 degrees mod 360 represents instant when greenwich meridian aligned right ascension 0:00 in celestial coordinates.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -