started rewriting calibration stuff - not compiling

Change-Id: I6e8c13346c11219ef6fdb3b7a6d0f21bfd19b167