The conky has 2 scripts that make it work.
Firstly there is a bash script that uses the curl function to access a webpage. Then using grep, awk and sed I extracted key astronomical data from the page.
The Lua script is then fed the data via conky and uses the numbers to perform all the necessary calculations. I also display a range of data in the conky via the Lua script.

The figure is all based on equations which are in turn based on the data I gathered. The figure shows a very accurate representation of the position of the sun relative to the horizon.
You can get the code for the bash and Lua script on the crunchbang linux website here.
If you are interested in using this conky then be sure to read my post as you will have to make some changes to the scripts regarding geographical location.