Completed implementation of calibration math and structures
Implemented first part of sampling routine for calibration.  Added code takes 32 samples and calculates variance.
Added calibrate function to test routine