A control method of an electronic device , the control method comprising: determining whether an obstacle exists in a first direction with the electronic device as a reference; determining that the electronic device is disposed indoors, if it is determined that the obstacle exists in the first direction; and determining that the electronic device is disposed outdoors, if it is determined that the obstacle does not exist in the first direction, wherein the determining of whether the obstacle exists in the first direction with the electronic device as the reference comprises: receiving a Global Positioning System, GPS, signal from satellites, analysing the received GPS signal to identify GNSS Satellites in View, GPGSV, information; setting a celestial sphere map and mapping locations of satellites to the celestial sphere map using the identified GPGSV information, determining whether a strength of a GPS signal from a mapped satellite in a preset range of the celestial sphere map exceeds a preset threshold, and determining that the obstacle exists in the first direction, if the strength of the GPS signal from the mapped satellite in the preset range is less than or equal to the preset threshold, or determining that the obstacle does not exist in the first direction, if the strength of the GPS signal from the mapped satellite in the preset range exceeds the preset threshold. determining whether an obstacle exists in a first direction with the electronic device as a reference; determining that the electronic device is disposed indoors, if it is determined that the obstacle exists in the first direction; and determining that the electronic device is disposed outdoors, if it is determined that the obstacle does not exist in the first direction, wherein the determining of whether the obstacle exists in the first direction with the electronic device as the reference comprises: receiving a Global Positioning System, GPS, signal from satellites, analysing the received GPS signal to identify GNSS Satellites in View, GPGSV, information; setting a celestial sphere map and mapping locations of satellites to the celestial sphere map using the identified GPGSV information, determining whether a strength of a GPS signal from a mapped satellite in a preset range of the celestial sphere map exceeds a preset threshold, and determining that the obstacle exists in the first direction, if the strength of the GPS signal from the mapped satellite in the preset range is less than or equal to the preset threshold, or determining that the obstacle does not exist in the first direction, if the strength of the GPS signal from the mapped satellite in the preset range exceeds the preset threshold. receiving a Global Positioning System, GPS, signal from satellites, analysing the received GPS signal to identify GNSS Satellites in View, GPGSV, information; setting a celestial sphere map and mapping locations of satellites to the celestial sphere map using the identified GPGSV information, determining whether a strength of a GPS signal from a mapped satellite in a preset range of the celestial sphere map exceeds a preset threshold, and determining that the obstacle exists in the first direction, if the strength of the GPS signal from the mapped satellite in the preset range is less than or equal to the preset threshold, or determining that the obstacle does not exist in the first direction, if the strength of the GPS signal from the mapped satellite in the preset range exceeds the preset threshold. <EOS>