CPC H04W 4/023 (2013.01) [H04B 1/7163 (2013.01); H04B 7/0404 (2013.01)] | 20 Claims |
1. An electronic device comprising:
a display disposed on a front surface of the electronic device;
an ultra-wide band (UWB) antenna including at least one directional antenna disposed on a rear surface opposite to the front surface and an omnidirectional antenna disposed on a surface different from the surface on which the at least one directional antenna is disposed;
a processor;
a communication circuit configured to convert a message to be transmitted to an external electronic device into a radio frequency (RF) signal of a frequency band designated to be used for UWB communication, and output the RF signal to the UWB antenna, and configured to convert an RF signal received from the external electronic device through the UWB antenna into a message; and
a memory operatively connected to the processor,
wherein the memory stores instructions that, when executed, cause the processor to:
receive a first message, transmitted by the external electronic device at a first time, from the UWB antenna at a second time,
transmit a second message to the external electronic device at a third time through the UWB antenna in response to receiving the first message,
receive a third message, transmitted by the external electronic device at a fifth time in response to the second message received at a fourth time, from the at least one directional antenna at a sixth time,
receive the third message, transmitted by the external electronic device, from the omnidirectional antenna at a seventh time,
calculate a first distance between the external electronic device and the electronic device, using time information and a time of receiving a message and a time of transmitting a message based on the at least one directional antenna, wherein the time information is received by the electronic device from the external electronic device through the UWB antenna and includes information about the first time, the fourth time, and the fifth time,
calculate a second distance between the external electronic device and the electronic device, using the time information and a time of receiving a message and a time of transmitting a message based on the UWB antenna including the omnidirectional antenna, and
based on a distance difference between the first distance and the second distance, determine whether the external electronic device exists within a field of view (FoV).
|