Added MAG functionality to SENSORLIB