Core: Extracting magnetometer calibration code to a new classs