Full Auto-Calibration

Added (ported accross) Rich Cattell's auto calibration script.