Calculate angle and output to spreadsheet