Finished the calib program with a solution to the rotation problem.