Method and apparatus for determining angle, method and apparatus for transmitting signals
A method for determining an angel includes: sending a control message to a target device on a first channel. The control message carries at least channel switch information configured to instruct the target device to transmit signals on a second channel. The method further includes determining an angle from the target device to the terminal according to a first signal and a second signal. The first signal transmitted by the target device is received on the first channel. The second signal transmitted by the target device is received on the second channel.
1 . A method for determining an angle, comprising:
sending, by a terminal, a control message to a target device on a first channel, wherein the control message carries channel switch information and a ranging device management list, wherein the channel switch information is configured to indicate to the target device a second channel to switch to, and the ranging device management list comprises a scheduled ultra-bandwidth (UWB) message and a ranging slot index, wherein the scheduled UWB message carries identification information configured to indicate identifiers of UWB messages for two-way ranging and an identifier of a channel switch message, and the ranging slot index indicates time domain resources for the two-way ranging and a target time domain resource for switching to the second channel and transmission of the channel switch message on the second channel;
switching, by the terminal, to the second channel within the target time domain resource, and receiving the channel switch message transmitted by the target device on the second channel within the target time domain resource; and
determining, by the terminal, an angle from the target device to the terminal according to a first signal and a second signal, wherein the first signal transmitted by the target device is received on the first channel, and the second signal transmitted by the target device is received on the second channel.
2 . The method of claim 1 , wherein the channel switch information is carried in reserved bits of the control message.
3 . The method of claim 1 , wherein the channel switch information is further configured to indicate
channel switch disabled.
4 . The method of claim 1 , further comprising:
performing two-way ranging with the target device on the first channel, wherein the first signal transmitted by the target device is received during performing the two-way ranging.
5 . The method of claim 4 , further comprising:
after performing the two-way ranging with the target device on the first channel, receiving, on the second channel, the second signal transmitted by the target device.
6 . The method of claim 1 , wherein a first frequency corresponding to the first channel and a second frequency corresponding to the second channel comprise at least one of following frequencies:
6489.6 MHz, 6988.8 MHz, 7488.0 MHz, and 7987.2 MHz.
7 . The method of claim 1 , wherein at least a first antenna and a second antenna are provided in the terminal, and determining the angle from the target device to the terminal according to the first signal and the second signal comprises:
determining a first phase difference of receiving the first signal transmitted by the target device through the first antenna and the second antenna, and determining a second phase difference of receiving the second signal transmitted by the target device through the first antenna and the second antenna;
calculating a difference between the first phase difference and the second phase difference;
determining the angle from the target device to the terminal according to the difference.
8 . The method of claim 7 , wherein determining the angle from the target device to the terminal according to the difference comprises:
determining an actual phase difference corresponding to the difference according to a correlation between the difference and the actual phase difference;
determining the angle from the target device to the terminal according to the actual phase difference.
9 . An electronic device, comprising:
a first antenna, a second antenna, and a processor;
a memory configured to store instructions executable by the processor;
wherein the processor is configured to:
send a control message to a target device on a first channel, wherein the control message carries channel switch information and a ranging device management list, wherein the channel switch information is configured to indicate to the target device a second channel to switch to, and the ranging device management list comprises a scheduled ultra-bandwidth (UWB) message and a ranging slot index, wherein the scheduled UWB message carries identification information configured to indicate identifiers of UWB messages for two-way ranging and an identifier of a channel switch message, and the ranging slot index indicates time domain resources for the two-way ranging and a target time domain resource for switching to the second channel and transmission of the channel switch message on the second channel;
switch to the second channel within the target time domain resource, and receive the channel switch message transmitted by the target device on the second channel within the target time domain resource; and
determine an angle from the target device to the electronic device according to a first signal and a second signal, wherein the first signal transmitted by the target device is received on the first channel, and the second signal transmitted by the target device is received on the second channel.