An electronic device comprising: a magnetometer comprising three sensors providing three orthogonal sensing axes; a gyroscope; a temperature sensor; a memory; and a processor coupled with the magnetometer, gyroscope, temperature sensor and memory, the processor configured to: detect a temperature event based on temperature data associated with the temperature sensor; generate new calibration data for the magnetometer; and correct a magnetometer reading based on the new calibration data; characterised in that the magnetometer comprises a Hall Effect sensor associated with a first sensing axis and a sensor of another type associated with a second sensing axis, wherein the sensor associated with the second sensing axis is a magnetometer of another type than a Hall Effect sensor; and in that the processor is configured to: maintain a cache, in the memory, of gyroscope data associated with the gyroscope and magnetometer data representing magnetometer readings obtained from the magnetometer; determine an expected magnetometer reading following the temperature event by determining, from the gyroscope data, an amount of rotation that occurred after a magnetometer reading obtained prior to the temperature event, and adjusting that magnetometer reading based on the amount of rotation; compare the expected magnetometer reading to a magnetometer reading obtained from the magnetometer after the temperature event to determine a calibration correction amount; compare a difference between the magnetometer reading obtained after the temperature event and the expected magnetometer reading for the second sensing axis to a threshold; and generate the new calibration data for the magnetometer based on the comparison to the threshold, wherein the new calibration data is based on the calibration correction amount. a magnetometer comprising three sensors providing three orthogonal sensing axes; a gyroscope; a temperature sensor; a memory; and a processor coupled with the magnetometer, gyroscope, temperature sensor and memory, the processor configured to: detect a temperature event based on temperature data associated with the temperature sensor; generate new calibration data for the magnetometer; and correct a magnetometer reading based on the new calibration data; characterised in that the magnetometer comprises a Hall Effect sensor associated with a first sensing axis and a sensor of another type associated with a second sensing axis, wherein the sensor associated with the second sensing axis is a magnetometer of another type than a Hall Effect sensor; and in that the processor is configured to: maintain a cache, in the memory, of gyroscope data associated with the gyroscope and magnetometer data representing magnetometer readings obtained from the magnetometer; detect a temperature event based on temperature data associated with the temperature sensor; generate new calibration data for the magnetometer; and correct a magnetometer reading based on the new calibration data; characterised in that the magnetometer comprises a Hall Effect sensor associated with a first sensing axis and a sensor of another type associated with a second sensing axis, wherein the sensor associated with the second sensing axis is a magnetometer of another type than a Hall Effect sensor; and in that the processor is configured to: maintain a cache, in the memory, of gyroscope data associated with the gyroscope and magnetometer data representing magnetometer readings obtained from the magnetometer; maintain a cache, in the memory, of gyroscope data associated with the gyroscope and magnetometer data representing magnetometer readings obtained from the magnetometer; determine an expected magnetometer reading following the temperature event by determining, from the gyroscope data, an amount of rotation that occurred after a magnetometer reading obtained prior to the temperature event, and adjusting that magnetometer reading based on the amount of rotation; compare the expected magnetometer reading to a magnetometer reading obtained from the magnetometer after the temperature event to determine a calibration correction amount; compare a difference between the magnetometer reading obtained after the temperature event and the expected magnetometer reading for the second sensing axis to a threshold; and generate the new calibration data for the magnetometer based on the comparison to the threshold, wherein the new calibration data is based on the calibration correction amount.