Magnetic inclinometer