System and Method for Calibrating a Magnetometer on a Mobile Device
A method and system are provided for calibrating a magnetometer on a mobile device. The method includes initiating a calibration of the magnetometer, determining an intermediate parameter associated with the calibration and when a characteristic indicative of a state of the mobile device is detected using the intermediate parameter, applying at least one stored calibration parameter associated with the state as an active calibration parameter.
1 . A method of calibrating a magnetometer on a mobile device, the method comprising:
initiating a calibration of the magnetometer;
determining an intermediate parameter associated with the calibration; and
when a characteristic indicative of a state of the mobile device is detected using the intermediate parameter, applying at least one stored calibration parameter associated with the state as an active calibration parameter.
2 . The method of claim 1 , wherein when the characteristic is not detected, the method further comprises:
completing the calibration to obtain at least one new calibration parameter; and
storing the at least one new calibration parameter.
3 . The method of claim 2 , wherein when the characteristic is not detected, the method further comprises:
determining a detectable characteristic for the state using the intermediate parameter;
associating the at least one new calibration parameter with the state; and
storing the characteristic to enable the state to be subsequently detected.
4 . The method of claim 1 , wherein the characteristic corresponds to one or more properties of a previous calibration performed while in the state.
5 . The method of claim 4 , wherein the one or more properties comprises a profile of the intermediate parameter generated in the previous calibration.
6 . The method of claim 5 , wherein the characteristic is detected if the intermediate parameter falls within the profile.
7 . A computer readable storage medium for calibrating a magnetometer on a mobile device, the computer readable storage medium comprising computer executable instructions for:
initiating a calibration of the magnetometer;
determining an intermediate parameter associated with the calibration; and
when a characteristic indicative of a state of the mobile device is detected using the intermediate parameter, applying at least one stored calibration parameter associated with the state as an active calibration parameter.
8 . The computer readable storage medium of claim 7 , wherein when the characteristic is not detected, the computer readable storage medium further comprises computer executable instructions for:
completing the calibration to obtain at least one new calibration parameter; and
storing the at least one new calibration parameter.
9 . The computer readable storage medium of claim 8 , wherein when the characteristic is not detected, the computer readable storage medium further comprises computer executable instructions for:
determining a detectable characteristic for the state using the intermediate parameter;
associating the at least one new calibration parameter with the state; and
storing the characteristic to enable the state to be subsequently detected.
10 . The computer readable storage medium of claim 7 , wherein the characteristic corresponds to one or more properties of a previous calibration performed while in the state.
11 . The computer readable storage medium of claim 10 , wherein the one or more properties comprises a profile of the intermediate parameter generated in the previous calibration.
12 . The computer readable storage medium of claim 11 , wherein the characteristic is detected if the intermediate parameter falls within the profile.
13 . A mobile device comprising a processor coupled to a memory, a magnetometer and a gyroscope, the memory comprising computer executable instructions for:
initiating a calibration of the magnetometer;
determining an intermediate parameter associated with the calibration; and
when a characteristic indicative of a state of the mobile device is detected using the intermediate parameter, applying at least one stored calibration parameter associated with the state as an active calibration parameter.
14 . The mobile device of claim 13 , wherein when the characteristic is not detected, the memory further comprises computer executable instructions for:
completing the calibration to obtain at least one new calibration parameter; and
storing the at least one new calibration parameter.
15 . The mobile device of claim 14 , wherein when the characteristic is not detected, the memory further comprises computer executable instructions for:
determining a detectable characteristic for the state using the intermediate parameter;
associating the at least one new calibration parameter with the state; and
storing the characteristic to enable the state to be subsequently detected.
16 . The mobile device of claim 13 , wherein the characteristic corresponds to one or more properties of a previous calibration performed while in the state.
17 . The mobile device of claim 16 , wherein the one or more properties comprises a profile of the intermediate parameter generated in the previous calibration.
18 . The mobile device of claim 17 , wherein the characteristic is detected if the intermediate parameter falls within the profile.