Nasa has an open source tool for this that handles light time. http://naif.jpl.nasa.gov/naif/toolkit.html
Sadly, language options are c, FORTRAN, or poorly maintained MATLAB.
Sadly, language options are c, FORTRAN, or poorly maintained MATLAB.
It's sad that that makes you sad.