fixed up calibration script to first transform the data, added roll and pitch compensation for magnetometer readings