| CPC G01C 21/1654 (2020.08) [G01C 21/206 (2013.01)] | 20 Claims |

|
1. An electronic device comprising:
a sensor configured to sense a magnetic field;
memory storing instructions; and
at least one processor,
wherein the instructions, when executed individually or collectively by the at least one processor, cause the electronic device to:
collect multiple pieces of first path data based on at least a plurality of first magnetic data obtained during multiple movements of the electronic device in an indoor space by using at least the sensor, each of the multiple pieces of the first path data corresponding to a different path traveled by the electronic device;
identify multiple pieces of second path data, which are similar to each other at a predetermined level or higher, from among the multiple pieces of the first path data;
determine an intersection area in which each of the different paths corresponding to the multiple pieces of the second path data traveled by the electronic device at least partially overlap each other;
determine a first space and a second space in the indoor space based on at least the intersection area and areas corresponding to the identified multiple pieces of second path data, wherein the intersection area is between the first space and the second space.
|