Finally managed to get both the calculations needed and got to make a little program out of it. You can get it
here, or for the source included,
here. Just a little reminder for those that would want to change my name in the source to theirs and claim the program to be made by them: such people don't even have the least amount of self respect, so just don't do such things ::)
Anyways, enjoy yourselves
