| CPC G01C 17/28 (2013.01) [G01P 15/00 (2013.01)] | 18 Claims |

|
1. An electronic device, comprising:
a geomagnetic sensor;
a posture sensor configured to measure a posture of the electronic device; and
at least one processor, comprising processing circuitry, in operative connection with the geomagnetic sensor and the posture sensor,
wherein the at least one processor, individually and/or collectively, is configured to:
acquire a plurality of magnetic field vectors from the geomagnetic sensor,
acquire posture information of the electronic device from the posture sensor,
correct the plurality of magnetic field vectors based on the posture information,
compare the plurality of corrected magnetic field vectors and a magnetic north vector to determine a plurality of interference vectors,
determine a rotation angle by rotating a straight line formed by connecting a plurality of magnetic field measurement points corresponding to the plurality of magnetic field vectors until extension lines of the plurality of interference vectors converge at one point using a predefined convergence threshold,
identify a moving direction of the electronic device based on the determined rotation angle; and
control an operation of the electronic device based on the identified moving direction.
|