mag_sensor.py