I want to compute the Earth position (relative to the sun) and axis rotations for a given date and time. It's ok to assume the Sun is stationary at the 0,0,0 coordinate. Very minor deflections, due to the Moons gravitational pull for example, can also be ignored. Anything accurate within a degree or so is good enough.
Are there any libraries/source/data out there that will help me accomplish this?
The aa-56 code, which can be downloaded from here, includes a solar ephemeris that will probably meet your needs. For high-precision work you'd want something more accurate like JPL's DE421, but there are some inconveniently large tables of coefficients involved, and it's probably extreme overkill if you're happy with 1 degree accuracy.
The Earth's rotation at a given time is given by the Greenwich sidereal time.
Jean Meeus' "Astronomical Algorithms" (a good reference to have for these sorts
of calculations!) gives a formula for theta0
(cumulative rotation angle in degrees)
in terms of the 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 the instant when the Greenwich meridian is aligned with right ascension 0:00 in celestial coordinates.