The easiest method for anyone is to save 89 angles (at say 1 degree intervals from 1-89 degrees) into internal EEPROM, and interpolate the intermediate points. Your accuracy will be remarkably close and you can impliment the code in about five minutes.