Math is a strong suit of mine.
I can easily make an application to calculate this for you.
You can give me more specifics about the input/output, otherwise I'll just put in the features I think you'd appreciate (like the choice between using degrees or radians).