I am developing a C++ program where I'd like to be able to see the Suns direction vector and distance from Earth at a given time, since 2000 Jan 0.0 TDT. The reference frame I want to calculate it is from the Earth, with the up vector running along the axis of the poles.
What I have tried so far has been based off http://www.stjarnhimlen.se/comp/tutorial.html#5, but its not entirely the output I'm after; and I feel I can probably achieve this much easier.
Any ideas? Sorry if this is off-topic.