Calculate needle orientation

Fixes #7: Added spin calibration to calculate needle orientation.