TWI536859B - Method, electronic apparatus and computer program product for determining relative position of apparatus - Google Patents

Method, electronic apparatus and computer program product for determining relative position of apparatus Download PDF

Info

Publication number
TWI536859B
TWI536859B TW103110873A TW103110873A TWI536859B TW I536859 B TWI536859 B TW I536859B TW 103110873 A TW103110873 A TW 103110873A TW 103110873 A TW103110873 A TW 103110873A TW I536859 B TWI536859 B TW I536859B
Authority
TW
Taiwan
Prior art keywords
electronic device
distance
displacement
relative position
relative
Prior art date
Application number
TW103110873A
Other languages
Chinese (zh)
Other versions
TW201538013A (en
Inventor
張宇先
Original Assignee
宏達國際電子股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 宏達國際電子股份有限公司 filed Critical 宏達國際電子股份有限公司
Priority to TW103110873A priority Critical patent/TWI536859B/en
Publication of TW201538013A publication Critical patent/TW201538013A/en
Application granted granted Critical
Publication of TWI536859B publication Critical patent/TWI536859B/en

Links

Landscapes

  • Navigation (AREA)
  • Position Fixing By Use Of Radio Waves (AREA)

Description

裝置相對位置的判定方法、電子裝置及電腦程式產品 Method for judging relative position of device, electronic device and computer program product

本案是有關於一種定位技術,且特別是有關於一種裝置相對位置的判定方法及電子裝置。 The present invention relates to a positioning technique, and in particular to a method and a device for determining the relative position of a device.

近年來,隨著電子科技及通訊技術的不斷演進及改良,諸如手機、智慧型手機等不佔空間且可隨身攜帶的電子裝置也推陳出新。這些市面上的行動裝置莫不整合多項功能以提昇其競爭力,除了一般的照相、通話、上網功能之外,現在連全球定位系統(Global Positioning System,GPS)與電子地圖也都整合在手持通訊裝置上,使用者可隨時隨地藉由行動裝置的定位功能掌握本身所在的位置。 In recent years, with the continuous evolution and improvement of electronic technology and communication technology, electronic devices such as mobile phones and smart phones that do not take up space and can be carried around are also being introduced. These mobile devices in the market do not integrate multiple functions to enhance their competitiveness. In addition to the general camera, call and Internet functions, even the Global Positioning System (GPS) and electronic maps are integrated into the handheld communication device. In this way, the user can grasp the location of the mobile device by using the positioning function of the mobile device anytime and anywhere.

GPS是結合衛星與無線通訊的一種定位技術,其能提供精確的定位、速度及時間資訊。GPS可與電子地圖結合,而能夠將其定位所得的定位資訊顯示在電子地圖上,以提供給使用者了 解其目前所在位置。 GPS is a positioning technology that combines satellite and wireless communications to provide accurate positioning, speed and time information. GPS can be combined with an electronic map, and the positioning information obtained by positioning it can be displayed on the electronic map to be provided to the user. Solve its current location.

然而,GPS只能應用在可接收到衛星信號的場所,當使 用者進入例如室內等GPS即無法接收到衛星信號的地方或是使用者沒有開啟GPS定位功能的時候,也就失去了定位功能。此時,若使用者需要了解自身所在位置,或是想要了解其他人在該場所內的相對位置,通常只能由雙方自我觀察周圍建築或物件的特徵,並以電話聯繫的方式告知對方,以便對方找尋,結果往往會花費不少時間在找尋過程中。因此,有必要提供一種可應用於室內的定位方式,來幫助使用者得知其他人相對於自己的相對位置。 However, GPS can only be used in places where satellite signals can be received, when When the user enters, for example, a GPS such as a room, where the satellite signal cannot be received, or when the user does not turn on the GPS positioning function, the positioning function is lost. At this time, if the user needs to know his or her location, or wants to know the relative position of other people in the place, usually the two parties can only observe the characteristics of the surrounding buildings or objects and inform the other party by telephone. In order for the other party to find, the result often takes a lot of time to find the process. Therefore, it is necessary to provide a positioning method that can be applied indoors to help the user know the relative position of other people relative to themselves.

本案提供一種裝置相對位置的判定方法、電子裝置及電腦程式產品,可取得其他電子裝置相對於本身的相對位置。 The present invention provides a method for determining the relative position of a device, an electronic device, and a computer program product, which can obtain relative positions of other electronic devices relative to themselves.

本案的裝置相對位置的判定方法,適於由第一電子裝置偵測並判定其周圍第二電子裝置的相對位置。此方法係根據與第二電子裝置之間的無線信號,計算第二電子裝置與第一電子裝置的第一距離。經過第一單位時間後,根據無線信號以計算第二電子裝置與第一電子裝置的第二距離,以及計算第一電子裝置於第一單位時間內移動之第一位移。再經過第二單位時間後,根據無線信號以計算第二電子裝置與第一電子裝置之間的第三距離以及計算第一電子裝置於第二單位時間內移動之第二位移。最後,以第一電子裝置的當前位置作為參考點,將上述第一距離、第一位 移與第二距離,以及第二位移與第三距離計算第二電子裝置相對於第一電子裝置的第一相對位置。 The method for determining the relative position of the device in the present case is adapted to detect and determine the relative position of the second electronic device around the first electronic device. The method calculates a first distance between the second electronic device and the first electronic device based on the wireless signal with the second electronic device. After the first unit time, the second distance between the second electronic device and the first electronic device is calculated according to the wireless signal, and the first displacement of the first electronic device to move in the first unit time is calculated. After the second unit time, the third distance between the second electronic device and the first electronic device is calculated according to the wireless signal and the second displacement of the first electronic device in the second unit time is calculated. Finally, using the current position of the first electronic device as a reference point, the first distance and the first position are And shifting the second distance, and the second displacement and the third distance to calculate a first relative position of the second electronic device relative to the first electronic device.

在本案的一實施例中,所述方法更在經過k-1個單位時間後,根據無線信號以計算第二電子裝置與第一電子裝置之間的第k距離,在經過k個單位時間後,根據無線信號以計算第二電子裝置與第一電子裝置之間的第k+1距離,以及計算第一電子裝置於第k個單位時間內移動之第k位移,其中k為正整數。依據上述第k位移、第k-1距離以及第k距離,計算第k-1單位時間時第二電子裝置相對於第一電子裝置的第k相對位置以及第k單位時間後第二電子裝置相對於第一電子裝置的第k+1相對位置之間誤差最小之值以確定第二電子裝置相對於第一電子裝置的第k相對位置。 In an embodiment of the present invention, the method further calculates a kth distance between the second electronic device and the first electronic device according to the wireless signal after k-1 unit time, after k unit time Calculating a k+1th distance between the second electronic device and the first electronic device according to the wireless signal, and calculating a kth displacement of the first electronic device moving in the kth unit time, where k is a positive integer. Calculating, according to the kth displacement, the k-1th distance, and the kth distance, the kth relative position of the second electronic device relative to the first electronic device and the second electronic device after the kth unit time The value of the smallest error between the k+1th relative positions of the first electronic device determines a kth relative position of the second electronic device relative to the first electronic device.

在本案的一實施例中,所述方法更存取先前計算的第二電子裝置相對於第一電子裝置的第一相對位置至第k個相對位置,而以第一電子裝置的當前位置作為參考點,根據上述第一位移至第k位移,分別將第一相對位置至第k個相對位置修正為相對於參考點的k個修正位置。以參考點為中心,以圖形化介面顯示所述修正位置,以表示第二電子裝置相對於參考點的移動軌跡。 In an embodiment of the present invention, the method further accesses the previously calculated first relative position to the kth relative position of the second electronic device relative to the first electronic device, with the current position of the first electronic device as a reference. Point, according to the first displacement to the kth displacement, respectively correcting the first relative position to the kth relative position to k correction positions with respect to the reference point. Centering on the reference point, the modified position is displayed in a graphical interface to indicate a movement trajectory of the second electronic device relative to the reference point.

在本案的一實施例中,在上述計算第一電子裝置於第一單位時間內所移動之第一位移,且根據無線信號計算第二電子裝置相對於第一電子裝置的第二距離的步驟之後,所述方法更由第二電子裝置計算其於第一單位時間內所移動之第三位移,並傳送 給第一電子裝置。然後,以第一電子裝置作為參考點,根據上述第一距離、第一位移與第三位移之差以及第二距離計算第二電子裝置相對於第一電子裝置的第一相對位置。 In an embodiment of the present invention, after the step of calculating the first displacement of the first electronic device in the first unit time and calculating the second distance of the second electronic device relative to the first electronic device according to the wireless signal, The method further calculates, by the second electronic device, the third displacement that is moved in the first unit time, and transmits Give the first electronic device. Then, using the first electronic device as a reference point, calculating a first relative position of the second electronic device relative to the first electronic device according to the first distance, the difference between the first displacement and the third displacement, and the second distance.

在本案的一實施例中,上述根據與第二電子裝置之間的 無線信號,計算第二電子裝置與第一電子裝置的第一距離的步驟是在發送無線信號後,接收第二電子裝置響應無線信號回傳的回饋信號,再計算自發送無線信號至接收到上述回饋信號所經過的往返時間,而根據上述往返時間與無線信號的傳送速度來計算第一距離。 In an embodiment of the present invention, the foregoing according to the second electronic device The wireless signal, the step of calculating the first distance between the second electronic device and the first electronic device is: after transmitting the wireless signal, receiving the feedback signal sent by the second electronic device in response to the wireless signal, and calculating the self-transmitting wireless signal to receiving the above The round trip time through which the signal is fed back, and the first distance is calculated based on the round trip time and the transmission speed of the wireless signal.

在本案的一實施例中,上述計算第一電子裝置與第二電 子裝置之間的第一距離步驟是在發送無線信號後,接收第二電子裝置響應無線信號回傳的回饋信號,再將此回饋信號的信號強度與距離對照表比對以取得第一距離。 In an embodiment of the present invention, the calculating the first electronic device and the second electrical The first distance step between the sub-devices is to receive the feedback signal sent back by the second electronic device in response to the wireless signal after transmitting the wireless signal, and compare the signal strength of the feedback signal with the distance comparison table to obtain the first distance.

在本案的一實施例中,上述計算第一電子裝置與第二電 子裝置之間的第一距離步驟更包括開啟一特定應用程式,以及以近場通訊方式與該第二裝置進行溝通以進行認證及/或配對程序。 In an embodiment of the present invention, the calculating the first electronic device and the second electrical The first distance step between the child devices further includes opening a particular application and communicating with the second device in a near field communication manner for authentication and/or pairing procedures.

在本案的一實施例中,上述計算第一電子裝置於單位時 間內移動之第一位移的步驟是利用加速度計、陀螺儀以及羅盤所接收的感測資訊計算上述第一位移。 In an embodiment of the present invention, the calculating the first electronic device in the unit The first displacement of the in-situ movement is to calculate the first displacement using the accelerometer, the gyroscope, and the sensing information received by the compass.

在本案的一實施例中,在上述計算第一電子裝置與第二 電子裝置之間的第一相對位置的步驟之後,所述方法更以參考點為中心,以圖形化介面顯示上述第一相對位置。 In an embodiment of the present invention, the first electronic device and the second are calculated in the above After the step of the first relative position between the electronic devices, the method further displays the first relative position in a graphical interface centered on the reference point.

在本案的一實施例中,在經過單位時間後,所述方法更 利用定位單元對第一電子裝置進行定位,以取得第一電子裝置的第一絕對位置。然後,根據第一絕對位置與第一相對位置,計算第二電子裝置的第二絕對位置。 In an embodiment of the present invention, after the unit time has elapsed, the method is more The first electronic device is positioned by the positioning unit to obtain a first absolute position of the first electronic device. Then, the second absolute position of the second electronic device is calculated according to the first absolute position and the first relative position.

在本案的一實施例中,在經過單位時間後,所述方法更 由第二電子裝置利用定位單元進行定位,以取得第二絕對位置,並將第二絕對位置傳送給第一電子裝置,而由第一電子裝置根據上述第二絕對位置與第一相對位置,計算第一電子裝置的第一絕對位置。 In an embodiment of the present invention, after the unit time has elapsed, the method is more Positioning by the second electronic device by using the positioning unit to obtain the second absolute position, and transmitting the second absolute position to the first electronic device, and calculating, by the first electronic device, the second absolute position and the first relative position The first absolute position of the first electronic device.

本案的裝置相對位置的電子裝置,此電子裝置包括無線 通訊單元、感測器、儲存單元及處理單元,其中無線通訊單元用以與第二電子裝置傳送無線信號,儲存單元用以記錄模組。處理單元係連接無線通訊單元、感測器及儲存單元,而用以存取並執行儲存單元中記錄的模組,上述模組包括距離計算模組、位移計算模組及相對位置計算模組,其中距離計算模組根據無線信號,計算第二電子裝置與電子裝置之間的第一距離。在經過第一單位時間後,距離計算模組根據無線信號以計算第二電子裝置與電子裝置的第二距離,以及位移計算模組利用感測器偵測並計算電子裝置於第一單位時間內移動之第一位移。再經過第二單位時間後,距離計算模組次根據該無線信號以計算第二電子裝置與電子裝置之間的第三距離,以及位移計算模組利用感測器偵測並計算電子裝置於第二單位時間內移動之第二位移。相對位置計算模組 以電子裝置的當前位置作為參考點,將第一距離、第一位移與第二距離,以及第二位移與第三距離計算第二電子裝置相對於電子裝置的第一相對位置。 The electronic device of the device relative position of the case, the electronic device includes wireless The communication unit, the sensor, the storage unit and the processing unit, wherein the wireless communication unit is configured to transmit a wireless signal to the second electronic device, and the storage unit is configured to record the module. The processing unit is connected to the wireless communication unit, the sensor and the storage unit for accessing and executing the module recorded in the storage unit, and the module includes a distance calculation module, a displacement calculation module and a relative position calculation module. The distance calculation module calculates a first distance between the second electronic device and the electronic device according to the wireless signal. After the first unit time, the distance calculation module calculates a second distance between the second electronic device and the electronic device according to the wireless signal, and the displacement calculation module detects and calculates the electronic device in the first unit time by using the sensor. The first displacement of the movement. After the second unit time, the distance calculation module calculates the third distance between the second electronic device and the electronic device according to the wireless signal, and the displacement calculation module detects and calculates the electronic device by using the sensor. The second displacement of the movement in two unit time. Relative position calculation module Taking the current position of the electronic device as a reference point, the first distance, the first displacement and the second distance, and the second displacement and the third distance are used to calculate a first relative position of the second electronic device relative to the electronic device.

在本案的一實施例中,其中距離計算模組在經過k個單 位時間後,利用無線通訊單元發送無線信號以偵測第二電子裝置,距離計算模組並依據無線信號計算第二電子裝置與電子裝置之間的第k距離,以及位移計算模組藉由感測器計算電子裝置於第k個單位時間內移動之第k位移,其中k為正整數。並且,相對位置計算模組依據第k位移、第k-1距離以及第k距離,且計算第k-1單位時間時第二電子裝置相對於電子裝置的第k-1相對位置以及第k單位時間後第二電子裝置相對於電子裝置的第k相對位置誤差最小之值,並依據上述計算結果來確定第二電子裝置相對於電子裝置的第k相對位置。 In an embodiment of the present invention, wherein the distance calculation module passes through k orders After the bit time, the wireless communication unit sends a wireless signal to detect the second electronic device, and the distance calculation module calculates the kth distance between the second electronic device and the electronic device according to the wireless signal, and the displacement calculation module senses The detector calculates the kth displacement of the electronic device moving in the kth unit time, where k is a positive integer. And the relative position calculation module calculates the k-1th relative position and the kth unit of the second electronic device relative to the electronic device according to the kth displacement, the k-1th distance, and the kth distance, and calculates the k-1th unit time After the time, the error of the kth relative position error of the second electronic device relative to the electronic device is the smallest, and the kth relative position of the second electronic device relative to the electronic device is determined according to the calculation result.

在本案的一實施例中,上述的電子裝置更包括顯示單 元,且電子裝置的模組更包括顯示模組。其中,相對位置計算模組經由儲存單元存取先前計算的第二電子裝置相對於電子裝置的第一相對位置至第k-1個相對位置,以電子裝置的當前位置作為參考點,根據第一位移至第k-1位移,分別修正第一相對位置至第k-1個相對位置為相對於參考點的k-1個修正位置,以及顯示模組以參考點為中心,利用圖形化介面顯示修正位置於顯示單元,以表示第二電子裝置相對於參考點的移動軌跡。 In an embodiment of the present disclosure, the electronic device further includes a display list And the module of the electronic device further comprises a display module. The relative position calculation module accesses the first relative position of the previously calculated second electronic device relative to the electronic device to the k-1th relative position via the storage unit, with the current position of the electronic device as a reference point, according to the first Displacement to the k-1th displacement, respectively correcting the first relative position to the k-1th relative position as k-1 correction positions relative to the reference point, and the display module is centered on the reference point, and is displayed by using a graphical interface The correction position is on the display unit to indicate the movement trajectory of the second electronic device relative to the reference point.

在本案的一實施例中,上述的第二電子裝置包括計算其 於單位時間內所移動之第二位移,並傳送給電子裝置。其中,相對位置計算模組更以電子裝置作為參考點,將第一距離、第一位移與第二位移之差以及第二距離作為三角形的三個邊,利用三角不等式計算第二電子裝置相對於電子裝置的第一相對位置。 In an embodiment of the present disclosure, the second electronic device includes calculating The second displacement moved in unit time and transmitted to the electronic device. Wherein, the relative position calculation module further uses the electronic device as a reference point, and uses the first distance, the difference between the first displacement and the second displacement, and the second distance as the three sides of the triangle, and calculates the second electronic device relative to the triangle inequality. The first relative position of the electronic device.

在本案的一實施例中,上述的距離計算模組更利用無線 通訊單元發送無線信號並接收第二電子裝置響應無線信號回傳的回饋信,且計算自發送無線信號至接收到回饋信號所經過的往返時間。並且,距離計算模組更根據往返時間與無線信號的傳送速度來計算第一距離。 In an embodiment of the present invention, the distance calculation module uses wireless The communication unit transmits the wireless signal and receives the feedback message sent back by the second electronic device in response to the wireless signal, and calculates a round trip time elapsed from the time the wireless signal is transmitted to the time when the feedback signal is received. Moreover, the distance calculation module calculates the first distance based on the round trip time and the transmission speed of the wireless signal.

在本案的一實施例中,上述的距離計算模組更利用無線 通訊單元發送上述無線信號並接收第二電子裝置響應無線信號回傳的回饋信號。並且,距離計算模組更依據上述回饋信號的信號強度與距離對照表比對以取得第一距離。 In an embodiment of the present invention, the distance calculation module uses wireless The communication unit transmits the wireless signal and receives a feedback signal sent back by the second electronic device in response to the wireless signal. Moreover, the distance calculation module compares the signal strength of the feedback signal with the distance comparison table to obtain the first distance.

在本案的一實施例中,上述的電子裝置更包括一特定應 用程式,其中在該特定應用程式開啟後,該電子裝置以近場通訊方式與該第二裝置進行溝通以進行認證及/或配對程序。 In an embodiment of the present invention, the electronic device further includes a specific The program, wherein after the specific application is turned on, the electronic device communicates with the second device in a near field communication manner for authentication and/or pairing procedures.

在本案的一實施例中,上述的感測器包括加速度計、陀螺儀以及羅盤其中之一或其組合。 In an embodiment of the present invention, the sensor includes one of an accelerometer, a gyroscope, and a compass, or a combination thereof.

在本案的一實施例中,上述的電子裝置更包括定位系統,此定位系統連接處理單元。定位系統定位電子裝置,以取得電子裝置的第一絕對位置,且上述模組更包括絕對位置計算模組,絕對位置計算模組更根據第一絕對位置與第一相對位置,計 算第二電子裝置的第二絕對位置。 In an embodiment of the present invention, the electronic device further includes a positioning system, and the positioning system is coupled to the processing unit. The positioning system locates the electronic device to obtain the first absolute position of the electronic device, and the module further includes an absolute position calculation module, and the absolute position calculation module further calculates the first absolute position and the first relative position. Calculating the second absolute position of the second electronic device.

在本案的一實施例中,其中第二電子裝置利用定位系統 進行定位,以取得一第二絕對位置,並傳送給判定電子裝置,且上述的模組更包括絕對位置計算模組,絕對位置計算模組根據上述第二絕對位置與第一相對位置,計算電子裝置的第一絕對位置。 In an embodiment of the present invention, wherein the second electronic device utilizes a positioning system Positioning to obtain a second absolute position and transmitting to the determining electronic device, and the module further includes an absolute position calculating module, and the absolute position calculating module calculates the electronic device according to the second absolute position and the first relative position The first absolute position of the device.

本案另提供一種電腦程式產品,其係經由第一電子裝置 載入以執行下列步驟。首先,根據與第二電子裝置之間的無線信號,計算第二電子裝置與第一電子裝置的第一距離。經過第一單位時間後,根據無線信號以計算第二電子裝置與第一電子裝置的第二距離,以及計算第一電子裝置於第一單位時間內移動之第一位移。再經過第二單位時間後,根據無線信號以計算第二電子裝置與第一電子裝置之間的第三距離以及計算第一電子裝置於第二單位時間內移動之第二位移。最後,以第一電子裝置的當前位置作為參考點,將上述第一距離、第一位移與第二距離,以及第二位移與第三距離計算第二電子裝置相對於第一電子裝置的第一相對位置。 The present invention further provides a computer program product via a first electronic device Load to perform the following steps. First, a first distance between the second electronic device and the first electronic device is calculated according to a wireless signal with the second electronic device. After the first unit time, the second distance between the second electronic device and the first electronic device is calculated according to the wireless signal, and the first displacement of the first electronic device to move in the first unit time is calculated. After the second unit time, the third distance between the second electronic device and the first electronic device is calculated according to the wireless signal and the second displacement of the first electronic device in the second unit time is calculated. Finally, the first distance, the first displacement and the second distance, and the second displacement and the third distance are used to calculate the first electronic device relative to the first electronic device by using the current position of the first electronic device as a reference point relative position.

基於上述,本案的裝置相對位置的判定方法、電子裝置及電腦程式產品在單位時間前後分別利用無線信號偵測且計算與第二電子裝置之間的距離,計算單位時間內此電子裝置所移動的位移,且依據上述位移以及兩個不同時間點計算的距離來計算第二電子裝置相對於此電子裝置的相對位置。藉此,使用者利用與其他裝置的距離和自身的位移而不透過定位系統,仍可得知其他 裝置相對於自己的相對位置。 Based on the above, the method for determining the relative position of the device, the electronic device, and the computer program product respectively use the wireless signal to detect and calculate the distance from the second electronic device before and after the unit time, and calculate the movement of the electronic device in a unit time. Displacement, and calculating the relative position of the second electronic device relative to the electronic device based on the displacement and the distance calculated at two different time points. Thereby, the user can still know the other by using the distance from other devices and the displacement of the device without passing through the positioning system. The relative position of the device relative to itself.

為讓本案的上述特徵和優點能更明顯易懂,下文特舉實施例,並配合所附圖式作詳細說明如下。 In order to make the above features and advantages of the present invention more comprehensible, the following embodiments are described in detail with reference to the accompanying drawings.

10、20、50、55、70、75、91~99‧‧‧電子裝置 10, 20, 50, 55, 70, 75, 91~99‧‧‧ electronic devices

12‧‧‧無線通訊單元 12‧‧‧Wireless communication unit

14‧‧‧感測器 14‧‧‧Sensor

16‧‧‧儲存單元 16‧‧‧ storage unit

161‧‧‧距離計算模組 161‧‧‧ Distance calculation module

162‧‧‧位移計算模組 162‧‧‧Displacement calculation module

163‧‧‧相對位置計算模組 163‧‧‧ Relative Position Calculation Module

S210~S270‧‧‧步驟 S210~S270‧‧‧Steps

401、601~616‧‧‧點 401, 601~616‧‧ points

t‧‧‧單位時間 T‧‧‧ unit time

r0~rk、L1、L2‧‧‧距離 r 0 ~r k , L1, L2‧‧‧ distance

d1~d3、dA,1、dB,1‧‧‧位移 d 1 ~d 3 , d A,1 ,d B,1 ‧‧‧displacement

~‧‧‧向量 , ~ , , , , , , ‧‧‧vector

A0、A1、A1’、B0、B1、P0~Pk、Q‧‧‧端點 A 0 , A 1 , A 1 ', B 0 , B 1 , P 0 ~ P k , Q‧‧‧ end points

E、e d e r ‧‧‧誤差 E, e d , e r ‧‧‧ error

圖1是依照本案一實施例所繪示的裝置相對位置的電子裝置的方塊圖。 1 is a block diagram of an electronic device in accordance with an embodiment of the present invention.

圖2是依照本案一實施例所繪示之裝置相對位置的判定方法的流程圖。 2 is a flow chart of a method for determining a relative position of a device according to an embodiment of the present invention.

圖3是依照本案一實施例所繪示之裝置相對位置的判定方法的示意圖。 FIG. 3 is a schematic diagram of a method for determining a relative position of a device according to an embodiment of the present invention.

圖4A及4B是依照本案一實施例所繪示之裝置相對位置的判定方法的範例。 4A and 4B are diagrams showing an example of a method for determining a relative position of a device according to an embodiment of the present invention.

圖5是依照本案另一實施例所繪示之裝置相對位置的判定方法的示意圖。 FIG. 5 is a schematic diagram of a method for determining a relative position of a device according to another embodiment of the present invention.

圖6A及6B是依照本案另一實施例所繪示之裝置相對位置的判定方法的範例。 6A and 6B are diagrams showing an example of a method for determining a relative position of a device according to another embodiment of the present invention.

圖7是依照本案再一實施例所繪示之裝置相對位置的判定方法的示意圖。 FIG. 7 is a schematic diagram of a method for determining a relative position of a device according to still another embodiment of the present invention.

圖8是依照本案再一實施例所繪示之裝置相對位置的判定方法的範例。 FIG. 8 is an illustration of a method for determining a relative position of a device according to still another embodiment of the present invention.

圖9是依照本案再一實施例所繪示之裝置相對位置的判定方法的示意圖。 FIG. 9 is a schematic diagram of a method for determining a relative position of a device according to still another embodiment of the present invention.

本案是由電子裝置利用無線信號偵測周圍其他電子裝 置,並根據這些電子裝置回饋信號的信號強度或信號往返時間等資訊推算電子裝置移動在單位時間前後與其他電子裝置之間的距離。另一方面,本案還利用電子裝置本身配備的加速度計(accelerometer)、陀螺儀(gyrosensor)、電子羅盤(compass)等感測器偵測並計算電子裝置在上述單位時間內移動的位移,從而與上述裝置間的距離資訊結合,利用例如三角關係推算出其他電子裝置相對於電子裝置本身的相對位置,最後再以圖形化介面的方式將這些電子裝置的相對位置顯示在電子裝置的螢幕上,也可顯示這些電子裝置的移動軌跡。藉此,使用者便可從電子裝置顯示的圖形化介面得知其他電子裝置的相對位置,也可參考移動的軌跡路線,讓使用者更容易找到其他電子裝置的使用者。 In this case, the electronic device uses wireless signals to detect other electronic devices around. And according to the information such as the signal strength of the feedback signal of the electronic device or the round-trip time of the signal, the distance between the electronic device and the other electronic devices before and after the unit time is estimated. On the other hand, the present invention also uses an accelerometer, a gyrosensor, an electronic compass, and the like provided in the electronic device to detect and calculate the displacement of the electronic device in the above unit time, thereby Combining the distance information between the devices, the relative position of the other electronic devices relative to the electronic device itself is calculated by, for example, a triangular relationship, and finally the relative positions of the electronic devices are displayed on the screen of the electronic device in a graphical interface. The movement trajectory of these electronic devices can be displayed. Thereby, the user can know the relative position of other electronic devices from the graphical interface displayed by the electronic device, and can also refer to the moving track route, so that the user can more easily find the users of other electronic devices.

圖1是依照本案一實施例所繪示的用以電子裝置相對位 置的電子裝置的方塊圖。請參照圖1,本實施例的電子裝置10包括無線通訊單元12、感測器14、儲存單元16及處理單元18。電子裝置10可以是例如行動電子裝置,包括手機、平板電腦、筆記型電腦等電子裝置或車用電子裝置,在此不設限。 1 is a relative position of an electronic device according to an embodiment of the present invention. A block diagram of the placed electronic device. Referring to FIG. 1 , the electronic device 10 of the embodiment includes a wireless communication unit 12 , a sensor 14 , a storage unit 16 , and a processing unit 18 . The electronic device 10 can be, for example, a mobile electronic device, including an electronic device such as a mobile phone, a tablet computer, a notebook computer, or a vehicle electronic device, and is not limited herein.

無線通訊單元12可支援至少一種下列無線信號傳輸的技 術:無線保真直連(WiFi Direct)、藍芽、近場通訊(Near Field Communication;NFC)、裝置到裝置(Device to device;D2D)通訊等無線通訊技術,但不僅限於此。 The wireless communication unit 12 can support at least one of the following wireless signal transmission techniques Technology: Wireless Direct communication (WiFi Direct), Bluetooth, Near Field Communication (NFC), Device to device (D2D) communication and other wireless communication technologies, but not limited to this.

感測器14可以是加速度計、陀螺儀、電子羅盤等用以偵測電子裝置移動相關資訊之感測器或這些感測器的組合。 The sensor 14 can be an accelerometer, a gyroscope, an electronic compass, or the like, or a combination of these sensors for detecting information related to movement of the electronic device.

儲存單元16可以是任何型態的固定或可移動隨機存取記憶體(random access memory,RAM)、唯讀記憶體(read-only memory,ROM)、快閃記憶體(flash memory)或類似元件或上述元件的組合。在本實施例中,儲存單元16用以記錄距離計算模組161、位移計算模組162及相對位置計算模組163。這些模組例如是儲存在儲存單元16中的程式,其可載入電子裝置10的處理單元18,而執行裝置相對位置的判定功能。 The storage unit 16 can be any type of fixed or removable random access memory (RAM), read-only memory (ROM), flash memory or the like. Or a combination of the above elements. In this embodiment, the storage unit 16 is configured to record the distance calculation module 161, the displacement calculation module 162, and the relative position calculation module 163. These modules are, for example, programs stored in the storage unit 16, which can be loaded into the processing unit 18 of the electronic device 10 to perform the determination function of the relative position of the devices.

處理單元18分別與無線通訊單元12、感測器14及儲存單元16連接。處理單元18可以是中央處理單元(Central Processing Unit;CPU),或是其他可程式化之一般用途或特殊用途的微處理器(Microprocessor)、數位信號處理器(Digital Signal Processor;DSP)、可程式化控制器、特殊應用積體電路(Application Specific Integrated Circuit;ASIC)或其他類似元件或上述元件的組合。在本實施例中,處理單元18用以存取並執行上述儲存單元16中記錄的模組,藉以實現本案實施例的裝置相對位置的判定方法。 The processing unit 18 is connected to the wireless communication unit 12, the sensor 14 and the storage unit 16, respectively. The processing unit 18 can be a central processing unit (CPU), or other programmable general purpose or special purpose microprocessor (Microprocessor), digital signal processor (DSP), programmable A controller, an Application Specific Integrated Circuit (ASIC) or other similar component or a combination of the above components. In this embodiment, the processing unit 18 is configured to access and execute the module recorded in the storage unit 16 to implement the method for determining the relative position of the device in the embodiment of the present invention.

圖2是依照本案一實施例所繪示之裝置相對位置的判定方法的流程圖。圖3是依照本案一實施例所繪示之裝置相對位置 的判定方法的示意圖。請同時參照圖1、圖2及圖3,本實施例的方法適用於上述的電子裝置10,其中圖3繪示電子裝置10與其周圍的另一個電子裝置20之間的位置關係。以下即搭配圖1中電子裝置10的各項元件,說明本實施例方法的詳細流程。 2 is a flow chart of a method for determining a relative position of a device according to an embodiment of the present invention. 3 is a relative position of the device according to an embodiment of the present invention. Schematic diagram of the determination method. Referring to FIG. 1 , FIG. 2 and FIG. 3 , the method of the embodiment is applicable to the electronic device 10 described above, wherein FIG. 3 illustrates the positional relationship between the electronic device 10 and another electronic device 20 around it. The detailed flow of the method of this embodiment will be described below in conjunction with the components of the electronic device 10 of FIG.

在步驟S210中,距離計算模組161依據無線通訊單元12與電子裝置20之間傳送的無線信號,計算電子裝置10與電子裝置20的第一距離r0。其中,在一實施例中,距離計算模組161可利用無線通訊單元12自發送無線信號至接收到電子裝置20回饋信號所經過的時間或是信號強度推算電子裝置10與電子裝置20之間的距離。 In step S210, the distance calculation module 161 calculates the first distance r 0 of the electronic device 10 and the electronic device 20 according to the wireless signal transmitted between the wireless communication unit 12 and the electronic device 20. In an embodiment, the distance calculation module 161 can use the time between the wireless communication unit 12 to transmit the wireless signal to receive the feedback signal from the electronic device 20 or the signal strength between the electronic device 10 and the electronic device 20 . distance.

詳言之,在一實施例中,距離計算模組161利用無線通訊單元12發送無線信號,並接收電子裝置20響應此無線信號回傳的回饋信號,從而計算無線通訊單元12自發送無線信號至接收到回饋信號所經過的往返時間(Round Trip Time;RTT)。最後,根據此往返時間與無線信號的傳送速度,距離計算模組161即可計算出電子裝置10與電子裝置20之間的第一距離r0。此第一距離r0例如是往返時間與無線信號的傳送速度之乘積的一半。其中,距離計算模組161可藉由無線通訊單元12傳送網際網路控制信息協定(internet control message protocol;ICMP)封包或其他資料給電子裝置20,以便計算往返時間,在此不設限。 In detail, in an embodiment, the distance calculation module 161 uses the wireless communication unit 12 to transmit a wireless signal, and receives the feedback signal returned by the electronic device 20 in response to the wireless signal, thereby calculating the wireless communication unit 12 from transmitting the wireless signal to Round Trip Time (RTT) when the feedback signal is received. Finally, based on the round trip time and the transmission speed of the wireless signal, the distance calculation module 161 can calculate the first distance r 0 between the electronic device 10 and the electronic device 20. This first distance r 0 is, for example, half the product of the round trip time and the transmission speed of the wireless signal. The distance calculation module 161 can transmit an internet control message protocol (ICMP) packet or other data to the electronic device 20 through the wireless communication unit 12 to calculate the round-trip time, which is not limited herein.

在另一實施例中,距離計算模組161亦可依據無線通訊單元12所偵測到由電子裝置20響應無線信號所發送之回饋信號 的信號強度或是由電子裝置20本身主動發送之無線信號的信號強度,藉由例如比對距離對照表以取得第一距離r0。具體而言,距離計算模組161在利用無線通訊單元12接收回饋信號後,可依據此回饋信號的信號強度,查詢預先儲存在儲存模組16中的一個信號強度與距離對照表,從而得到回饋信號之信號強度所對應的距離,而用以作為電子裝置10與電子裝置20之間的第一距離r0In another embodiment, the distance calculation module 161 can also detect the signal strength of the feedback signal sent by the electronic device 20 in response to the wireless signal or the wireless signal actively sent by the electronic device 20 according to the wireless communication unit 12. The signal strength is obtained by, for example, comparing the distance tables to obtain a first distance r 0 . Specifically, after receiving the feedback signal by using the wireless communication unit 12, the distance calculation module 161 can query a signal strength and distance comparison table stored in the storage module 16 according to the signal strength of the feedback signal, thereby obtaining feedback. The distance corresponding to the signal strength of the signal is used as the first distance r 0 between the electronic device 10 and the electronic device 20.

需說明的是,在一實施例中,電子裝置10在偵測電子裝置20之前,還可先利用無線通訊單元12所支援的無線通訊技術(例如,WiFi Direct、藍芽、近場通訊等),並可搭配特定的應用程式或網路服務,與電子裝置20進行溝通以進行認證(authentication)或配對(pairing)程序,以建立信號傳遞的通道。 此進行溝通的動作可代表電子裝置10欲開始使用追蹤電子裝置20的相對位置的功能,亦即開始判定電子裝置20的相對位置。配對後,電子裝置10及電子裝置20即可藉由此通道傳遞無線信號,以便進行距離估測。例如,兩位分別持有電子裝置10及電子裝置20的使用者,可預先進行溝通以完成認證或配對,並在需要知道對方相對位置的時候,啟動判斷對方相對位置的功能,或可在需要使用判斷對方相對位置的功能時,再進行溝通以認證或是配對。例如,兩位使用者可開啟相關的應用程式,並可藉由例如近場通訊(Near Field Communication,NFC)的方式進行配對,並直接以進行配對的位置作為起點,並開始追蹤對方的相對位置,並可將起點以及彼此的移動軌跡顯示在電子裝置上。 It should be noted that, in an embodiment, before detecting the electronic device 20, the electronic device 10 may first utilize wireless communication technologies supported by the wireless communication unit 12 (eg, WiFi Direct, Bluetooth, near field communication, etc.). And can be used with a specific application or network service to communicate with the electronic device 20 for authentication or pairing procedures to establish a signal transmission channel. The act of communicating may represent the function of the electronic device 10 to start using the relative position of the tracking electronic device 20, that is, to determine the relative position of the electronic device 20. After pairing, the electronic device 10 and the electronic device 20 can transmit wireless signals through the channel for distance estimation. For example, two users holding the electronic device 10 and the electronic device 20 respectively can communicate in advance to complete authentication or pairing, and when it is necessary to know the relative position of the other party, start the function of determining the relative position of the other party, or can When using the function of judging the relative position of the other party, communicate again to authenticate or pair. For example, two users can open related applications, and can be paired by, for example, Near Field Communication (NFC), and directly use the position to be paired as a starting point, and start tracking the relative position of the other party. And the starting point and the movement trajectory of each other are displayed on the electronic device.

而在其他實施例中,若電子裝置10已知電子裝置20的 無線通訊單元的裝置識別碼(device ID)時,亦可於配對的過程中,依據電子裝置20響應的回饋信號的信號強度,直接計算電子裝置10與電子裝置20之間的第一距離r0。上述計算第一距離r0的方法僅為示例,應用本實施例者可依其需求而調整測量往返時間及信號強度的方法或是使用其他方法計算第一距離r0,本案對此並不限制。 In other embodiments, if the electronic device 10 knows the device ID of the wireless communication unit of the electronic device 20, the signal strength of the feedback signal according to the response of the electronic device 20 may also be used in the pairing process. The first distance r 0 between the electronic device 10 and the electronic device 20 is directly calculated. The method for calculating the first distance r 0 is only an example. The method for measuring the round trip time and the signal strength may be adjusted according to the requirements of the embodiment, or the first distance r 0 may be calculated by using other methods. .

回到圖2的流程,在經過單位時間t後,在步驟S230中, 距離計算模組161會再次利用無線通訊單元12發送無線信號以偵測電子裝置20,並據以計算電子裝置10與電子裝置20的第二距離r1。同時,位移計算模組162還會計算電子裝置於單位時間t內移動之第一位移d1。其中,距離計算模組161計算第二距離r1的方法與上述計算第一距離r0的方法相同,在此不再贅述。 Returning to the flow of FIG. 2, after the unit time t has elapsed, in step S230, the distance calculation module 161 transmits the wireless signal again by the wireless communication unit 12 to detect the electronic device 20, and calculates the electronic device 10 and the electronic device accordingly. The second distance r 1 of the device 20. At the same time, the displacement calculation module 162 also calculates the first displacement d 1 of the electronic device moving within the unit time t. The method for calculating the second distance r 1 by the distance calculation module 161 is the same as the method for calculating the first distance r 0 , and details are not described herein again.

在本實施例中,位移計算模組162可利用電子裝置10本身配備的加速度計、陀螺儀或電子羅盤等感測器偵測電子裝置10在移動單位時間t內移動的第一位移d1。具體而言,三軸加速度計的加速度計可偵測三個軸向的加速度運動,而藉由所偵測到的加速度便可計算出每一個軸向的位移量。例如,加速度經過兩次積分後即可得到位移量。此外,陀螺儀可偵測電子裝置10的旋轉量,電子羅盤則可偵測電子裝置10的方位。藉此,電子裝置10便可藉由方位推估(Dead Reckoning;DR)或慣性導航(inertial navigation)等定位方式得知第一位移d1的移動距離與移動方向。 In this embodiment, the displacement calculation module 162 can detect the first displacement d 1 of the electronic device 10 moving during the unit time t by using a sensor such as an accelerometer, a gyroscope or an electronic compass provided by the electronic device 10 itself. Specifically, the accelerometer of the three-axis accelerometer can detect three axial acceleration motions, and the amount of displacement in each axial direction can be calculated by the detected acceleration. For example, the acceleration can be obtained after two integrations. In addition, the gyroscope can detect the amount of rotation of the electronic device 10, and the electronic compass can detect the orientation of the electronic device 10. Thereby, the electronic device 10 can know the moving distance and the moving direction of the first displacement d 1 by using a positioning method such as a position estimation (DR) or an inertial navigation.

在又經過單位時間t(即,總共經過2個單位時間t)後, 在步驟S250中,距離計算模組161會再次利用無線通訊單元12發送無線信號以偵測電子裝置20,並據以計算電子裝置10與電子裝置20的第三距離r2。同時,位移計算模組162還會計算電子裝置於此單位時間t內移動之第二位移d2。其中,距離計算模組161計算第三距離r2的方法與上述計算第一距離r0的方法相同,在此不再贅述。 After the unit time t has elapsed (that is, after a total of 2 unit times t), in step S250, the distance calculation module 161 transmits the wireless signal again by the wireless communication unit 12 to detect the electronic device 20, and calculates The third distance r 2 of the electronic device 10 and the electronic device 20. At the same time, the displacement calculation module 162 also calculates a second displacement d 2 that the electronic device moves within the unit time t. The method for calculating the third distance r 2 by the distance calculation module 161 is the same as the method for calculating the first distance r 0 , and details are not described herein again.

最後,在步驟S270中,相對位置計算模組163將以電子 裝置10的當前位置作為參考點,根據上述計算的第一距離r0、第一位移d1與第二距離r1,以及第二位移d2與第三距離r2計算電子裝置20相對於電子裝置10的第一相對位置。其中,相對位置計算模組163例如會先將上述計算的第一距離r0、第一位移d1與第二距離r1作為三角形的三個邊,利用三角不等式計算在經過單位時間t之後,電子裝置20相對於電子裝置10的相對位置,然後再將上述計算的第二距離r1、第二位移d2與第三距離r2作為三角形的三個邊,利用三角不等式計算在經過2個單位時間t之後,電子裝置20相對於電子裝置10的相對位置。其中,本實施例進一步利用第二距離r1、第二位移d2與第三距離r2來計算電子裝置20在第二個單位時間t後的位置,再將此位置與第一個單位時間t後所計算之電子裝置20的位置進行比較,藉以更確認電子裝置20的位置。 Finally, in step S270, the relative position calculation module 163 will take the current position of the electronic device 10 as a reference point, according to the calculated first distance r 0 , the first displacement d 1 and the second distance r 1 , and the second The displacement d 2 and the third distance r 2 calculate a first relative position of the electronic device 20 relative to the electronic device 10. The relative position calculation module 163 firstly calculates the first distance r 0 , the first displacement d 1 and the second distance r 1 as the three sides of the triangle, and calculates the unit time t after the unit time t is calculated by using the triangle inequality. The relative position of the electronic device 20 relative to the electronic device 10, and then the calculated second distance r 1 , the second displacement d 2 and the third distance r 2 are taken as three sides of the triangle, and the two inversions are calculated by using the triangle inequality. The relative position of the electronic device 20 relative to the electronic device 10 after the unit time t. In this embodiment, the second distance r 1 , the second displacement d 2 and the third distance r 2 are further used to calculate the position of the electronic device 20 after the second unit time t, and then the position and the first unit time. The position of the electronic device 20 calculated after t is compared to thereby confirm the position of the electronic device 20.

具體而言,圖4A及4B是依照本案一實施例所繪示之裝 置相對位置的判定方法的範例。請同時參照圖3及圖4A,圖4A是以圖3中電子裝置20的位置做為Q端點(即,座標(0,0)),並以P0及P1端點分別代表電子裝置10在單位時間t前的所在位置以及電子裝置10的當前位置。 Specifically, FIG. 4A and FIG. 4B are diagrams showing an example of a method for determining the relative position of the device according to an embodiment of the present invention. Please refer to FIG. 3 and FIG. 4A simultaneously. FIG. 4A shows the position of the electronic device 20 in FIG. 3 as the Q end point (ie, the coordinate (0, 0)), and represents the electronic device with the P 0 and P 1 end points respectively. 10 is the position before the unit time t and the current position of the electronic device 10.

圖4A中P0端點至Q端點的距離r0即為圖3中的第一距離r0,圖4A中P1端點至Q端點的距離r1即為圖3中的第二距離r1,圖4A中向量=(d x ,d y )即為圖3中的第一位移d1。假設P1端點相對於Q端點為向量,則向量符合下列方程式(1)及(2): 將圖4中距離r1、r2及向量作為三角形的三個邊,則依據三角不等式的方程式(3): ,將方程式(1)及(2)代入方程式(3)中,即可計算出P1端點的座標(P x ,P y ),其中P x =1/2*(K x d x ±K y d y )/(d y 2-d x 2) P y =(r 1 2-P x 2)1/2 (4),且其中K x =r 0 2-r 1 2-r d 2 K y ={[(r 1 2+r d )2-r 0 2][r 0 2-(r 1 2+r d )2]}1/2 Second 4A in FIG. 3 P 0 Q endpoint to endpoint 0 is the distance r in FIG. 3 a first distance r 0, P 1 in the end-to-end in FIG. 4A Q r 1 is the distance in FIG. Distance r 1 , vector in Figure 4A =( d x , d y ) is the first displacement d 1 in FIG. Assume that the P 1 endpoint is a vector relative to the Q endpoint Vector Comply with the following equations (1) and (2): The distances r 1 , r 2 and vectors in Figure 4 As the three sides of the triangle, the equation (3) is based on the triangle inequality: By substituting equations (1) and (2) into equation (3), the coordinates of the endpoints of P 1 ( P x , P y ) can be calculated, where P x = 1/2 * ( K x d x ± K y d y ) / ( d y 2 - d x 2 ) P y = ( r 1 2 - P x 2 ) 1/2 (4), and wherein K x = r 0 2 - r 1 2 - r d 2 K y ={[( r 1 2 + r d ) 2 - r 0 2 ][ r 0 2 -( r 1 2 + r d ) 2 ]} 1/2

接著,以P1端點為參考點,並依據計算的座標(P x ,P y )即 可得知Q端點相對於P1端點的相對位置(即,電子裝置20相對於電子裝置10的第一相對位置)。為方便使用者檢視電子裝置20相對於電子裝置10的第一相對位置,電子裝置10更可將此第一相對位置顯示在顯示單元(未繪示)上,此顯示單元可以是液晶顯示器(Liquid Crystal Display;LCD)、有機電激發光顯示器(Organic Electro-Luminescent Display;OELD)等顯示器,且不受限於此。 Then, using the P 1 end point as a reference point, and according to the calculated coordinates ( P x , P y ), the relative position of the Q end point relative to the P 1 end point can be known (ie, the electronic device 20 is relative to the electronic device 10). The first relative position). The electronic device 10 can display the first relative position on the display unit (not shown), which can be a liquid crystal display (Liquid). A display such as a Crystal Display (LCD) or an Organic Electro-Luminescent Display (OELD) is not limited thereto.

電子裝置10例如由記錄於儲存單元16中的顯示模組(未繪示)以參考點(即電子裝置10的當前位置)作為中心,而於顯示單元上以圖形化介面顯示第一相對位置。請參照圖4B,圖4B中的多個同心圓代表相對於電子裝置10的不同距離,例如,最靠近中心點的同心圓代表距離電子裝置10十公尺的距離,其他同心圓依此類推。圖4B中多個同心圓對應的實際距離僅為示例,在其他實施例中,同心圓對應的實際距離可依據電子裝置20相對於電子裝置10的相對位置而變動,且不受限於此。圖4B中的點401即為電子裝置20相對於電子裝置10的第一相對位置。 The electronic device 10 is, for example, centered on a display module (not shown) recorded in the storage unit 16 at a reference point (ie, the current position of the electronic device 10), and displays a first relative position on the display unit in a graphical interface. Referring to FIG. 4B, the plurality of concentric circles in FIG. 4B represent different distances relative to the electronic device 10. For example, the concentric circles closest to the center point represent the distance of 10 meters from the electronic device, and the other concentric circles and so on. The actual distance corresponding to the plurality of concentric circles in FIG. 4B is only an example. In other embodiments, the actual distance corresponding to the concentric circles may vary according to the relative position of the electronic device 20 relative to the electronic device 10, and is not limited thereto. The point 401 in FIG. 4B is the first relative position of the electronic device 20 relative to the electronic device 10.

藉此,使用者便可在不使用全球定位系統的情況下,直接利用電子裝置的點對點傳輸技術(例如,WiFi Direct、Bluetooth、近場通訊等)測量其與其他裝置的距離,且利用電子裝置的感測器(例如,加速度計、陀螺儀感測器及羅盤感應器等感測器的組合)的偵測得知自己的位移,據此即可推算出周圍其他裝置相對於自己的相對位置。例如,當使用者與其他朋友在擁擠的室內演 唱會或是賣場中,使用者便可藉由本案實施例中的電子裝置得知朋友的所在位置;當使用者位於大型室內停車場時,使用者便可藉由本案實施例中的電子裝置而得知自己車輛停放的位置,例如當電子裝置判斷與車輛的連線分離時,即代表使用者已下車離開車輛,此時電子裝置則開始偵測離開車輛之後的位移,以讓使用者可以循著位移路徑返回以尋找車輛的停放位置;或者,當使用者與小孩同在戶外或是百貨公司中,除了可藉由本案實施例中的電子裝置而得知小孩的所在位置以及移動的軌跡路徑,當小孩離開設定距離範圍(例如,兩百公尺)時,家長電子裝置更可發出警示訊息以通知使用者(例如,發出聲響或於顯示單元上顯示警示訊息),或是小孩的電子裝置發出警示訊息提醒小孩已經遠離了家長超過了設定的距離,此時家長即可參考家長電子裝置所顯示的小孩電子裝置的位置,並可藉由小孩電子裝置的移動軌跡,快速地尋找到小孩。若家長電子裝置本身有移動,也可同時參考家長電子裝置以及小孩電子裝置的移動軌跡以尋找小孩位置。 Thereby, the user can directly measure the distance from other devices by using the point-to-point transmission technology of the electronic device (for example, WiFi Direct, Bluetooth, near field communication, etc.) without using the global positioning system, and utilize the electronic device. The detection of a sensor (for example, a combination of an accelerometer, a gyro sensor, and a sensor such as a compass sensor) detects its own displacement, from which it can calculate the relative position of other devices around itself. . For example, when users and other friends are in a crowded room In the singer or the store, the user can know the location of the friend by the electronic device in the embodiment of the present invention; when the user is located in the large indoor parking lot, the user can use the electronic device in the embodiment of the present invention. Knowing the location where the vehicle is parked, for example, when the electronic device determines that the connection with the vehicle is separated, that is, the user has got off the vehicle and left the vehicle. At this time, the electronic device starts to detect the displacement after leaving the vehicle, so that the user can follow The displacement path is returned to find the parking position of the vehicle; or, when the user is outdoors or in the department store, the position of the child and the path of the movement can be known by the electronic device in the embodiment of the present invention. When the child leaves the set distance range (for example, two hundred meters), the parent electronic device can issue a warning message to notify the user (for example, sounding or displaying a warning message on the display unit), or the child's electronic device. Send a warning message to remind the child that the child has moved away from the set distance. At this time, the parent can refer to the parent electronic device. The position of the child's electronic device is shown, and the child can be quickly found by the movement track of the child's electronic device. If the parent electronic device itself moves, it is also possible to refer to the parent electronic device and the movement track of the child electronic device to find the child's position.

上述實施例中的電子裝置是經由兩次位移得知其他位置 相對於自身的相對位置。而在另一實施例中,本案實施例的裝置相對位置的判定方法更可藉由多次位移來提升所計算之相對位置的精確度。 The electronic device in the above embodiment is aware of other positions via two displacements. Relative position relative to itself. In another embodiment, the method for determining the relative position of the device in the embodiment of the present invention can improve the accuracy of the calculated relative position by multiple displacements.

舉例來說,圖5是依照本案另一實施例所繪示之裝置相 對位置的判定方法的示意圖。圖5中的電子裝置50是使用者所攜帶的裝置,而電子裝置55則是使用者周圍的裝置,其中每經過一 個單位時間t,電子裝置50即會根據上述實施例中的方法偵測電子裝置55並據以計算其與電子裝置55之間的距離r1、r2、r3及r4,並且還會計算其在每個單位時間t內的位移d1、d2及d3。以此類推,在經過k個單位時間t後,電子裝置50可透過發送或接收無線信號以偵測電子裝置55,並且計算其與電子裝置55之間的第k+1距離,並計算其於第k個單位時間t內移動之第k位移,其中k為正整數。而依據上述的第k位移、第k距離以及第k+1距離,電子裝置50即可計算出第k-1單位時間時電子裝置55相對於電子裝置50的第k-1相對位置以及第k單位時間後電子裝置55相對於電子裝置50的第k相對位置誤差最小之值,藉以確定電子裝置55相對於電子裝置50的第k相對位置。 For example, FIG. 5 is a schematic diagram of a method for determining a relative position of a device according to another embodiment of the present disclosure. The electronic device 50 in FIG. 5 is a device carried by the user, and the electronic device 55 is a device around the user. In each unit time t, the electronic device 50 detects the electronic device according to the method in the above embodiment. The device 55 then calculates the distances r 1 , r 2 , r 3 and r 4 between it and the electronic device 55 and also calculates its displacements d 1 , d 2 and d 3 per unit time t. By analogy, after k unit time t, the electronic device 50 can detect the electronic device 55 by transmitting or receiving a wireless signal, and calculate the k+1th distance between the electronic device 55 and the electronic device 55, and calculate the The kth displacement of the kth unit time t, where k is a positive integer. According to the kth displacement, the kth distance, and the k+1th distance, the electronic device 50 can calculate the k-1th relative position of the electronic device 55 relative to the electronic device 50 at the k-1th unit time and the kth The value of the k-th relative position error of the electronic device 55 relative to the electronic device 50 after the unit time is determined to determine the k-th relative position of the electronic device 55 with respect to the electronic device 50.

具體而言,圖6A及6B是依照本案另一實施例所繪示之裝置相對位置的判定方法的範例。請同時參照圖5及圖6A,圖6A是以圖5中電子裝置55的位置作為Q端點(即,座標(0,0)),並以Pk及Pk-1端點分別代表電子裝置50在第k及第k-1單位時間t的所在位置。 Specifically, FIG. 6A and FIG. 6B are diagrams showing an example of a method for determining the relative position of the device according to another embodiment of the present invention. Please refer to FIG. 5 and FIG. 6A simultaneously. FIG. 6A is the position of the electronic device 55 in FIG. 5 as the Q end point (ie, coordinate (0, 0)), and represents the electron at the end points of P k and P k-1 respectively. The device 50 is at the position of the kth and k-1th unit time t.

圖6A中Pk-1端點與Q端點相距為距離rk-1,圖6A中Pk端點與Q端點相距為距離rk,圖6A中向量即代表電子裝置50第k單位時間t內的位移。假設Pk端點相對於Q端點為向量,Pk-1端點相對於Q端點為向量。由於距離rk與向量為分別藉由無線通訊單元與感測器量測的值,因此藉由下列方程式(6)及(7)分別計算其誤差e d e r 並且依據最大相似估測(maximum likelihood estimation)法假設合併誤差E為:E=e d 2+e r 2 (8),且誤差E符合下列方程式(9)及(10): 最後,藉由最小化此誤差E,而可得到: In Fig. 6A, the P k-1 end point is separated from the Q end point by a distance r k-1 , and the P k end point and the Q end point in Fig. 6A are separated by a distance r k , the vector in Fig. 6A That is, it represents the displacement in the kth unit time t of the electronic device 50. Assume that the P k endpoint is a vector relative to the Q endpoint , P k-1 endpoint is a vector relative to the Q endpoint . Due to the distance r k and vector For the values measured by the wireless communication unit and the sensor respectively, the errors e d and e r are respectively calculated by the following equations (6) and (7): And according to the maximum likelihood estimation method, the combined error E is assumed to be: E = e d 2 + e r 2 (8), and the error E meets the following equations (9) and (10): Finally, by minimizing this error E , we get:

藉此,本案實施例的裝置相對位置的判定方法便可將量 測的誤差最小化,以確定電子裝置55相對於電子裝置50的相對位置。而在一實施例中,電子裝置50更可由顯示模組更將所有先前計算的電子裝置55相對於電子裝置50的相對位置以圖形化介面顯示於顯示單元上,以方便使用者檢視電子裝置55的移動軌跡。 Thereby, the method for determining the relative position of the device in the embodiment of the present invention can The measured error is minimized to determine the relative position of the electronic device 55 relative to the electronic device 50. In an embodiment, the electronic device 50 can further display the relative positions of all the previously calculated electronic devices 55 relative to the electronic device 50 on the display unit by the display module, so that the user can view the electronic device 55. The movement track.

舉例而言,電子裝置50可存取其先前計算的電子裝置55相對於電子裝置50的第一相對位置至第k-1個相對位置,而以電子裝置50的當前位置作為參考點,根據其先前計算的第一位移至第k-1位移(分別以電子裝置在經過第一至第k-1的單位時間後所在的當前位置作為參考點),分別將上述的第一相對位置至第k-1個相對位置修正為相對於當前參考點的k-1個修正位置。例如,若以電子裝置50的當前位置作為原點(0,0),當電子裝置55相對 於電子裝置50的第五相對位置為(7,8),電子裝置55相對於電子裝置50的第四相對位置為(5,1),且前一個單位時間的位移為(2,3),則第四相對位置可修正為座標(3,-2)。其餘修正位置則依此類推,在此不再贅述。 For example, the electronic device 50 can access the first relative position of the previously calculated electronic device 55 relative to the electronic device 50 to the k-1th relative position, and the current position of the electronic device 50 as a reference point, according to the The previously calculated first displacement to the k-1th displacement (the current position of the electronic device after the unit time elapsed from the first to the k-1th respectively as a reference point), respectively, the first relative position to the kth - 1 relative position is corrected to k-1 corrected positions with respect to the current reference point. For example, if the current position of the electronic device 50 is taken as the origin (0, 0), when the electronic device 55 is opposite The fifth relative position of the electronic device 50 is (7, 8), the fourth relative position of the electronic device 55 relative to the electronic device 50 is (5, 1), and the displacement of the previous unit time is (2, 3), Then the fourth relative position can be corrected to coordinates (3, -2). The rest of the correction positions are the same, and will not be described here.

此外,電子裝置50更可由顯示模組以參考點(即電子裝置50的當前位置)作為中心,而於顯示單元上以圖形化介面顯示上述的修正位置,以表示電子裝置55相對於參考點的移動軌跡。舉例而言,請參照圖6B,圖6B中的點601代表電子裝置55當前相對於電子裝置50的相對位置,而點611至616分別代表修正後的電子裝置55於之前各單位時間相對於電子裝置50的當前位置的相對位置。 In addition, the electronic device 50 may further display, by the display module, a reference point (ie, a current position of the electronic device 50), and display the modified position on the display unit in a graphical interface to indicate that the electronic device 55 is relative to the reference point. Move the track. For example, please refer to FIG. 6B. Point 601 in FIG. 6B represents the relative position of the electronic device 55 relative to the electronic device 50, and points 611 to 616 respectively represent the corrected electronic device 55 in the previous unit time relative to the electronic device. The relative position of the current position of device 50.

在一實施例中,電子裝置50可預先存取或是即時下載所在位置的地圖,例如,賣場、停車場等場所的地圖,而可藉由顯示模組將此地圖與上述移動軌跡合併顯示在顯示單元上,以方便使用者依據此“顯示在地圖上的移動軌跡”來快速找到前往電子裝置55所在位置的最佳路經。在此實施例中,使用者可藉由在地圖上點選的方式或是透過選單的方式選擇使用者電子裝置50目前的位置,或是可藉由定位系統定位電子裝置50的目前位置,而顯示在電子地圖上。在其他實施例中,電子裝置50更可由路徑規劃模組(未繪示)依據地圖資訊與移動軌跡計算使用者前往電子裝置55所在位置的最佳路徑。而在其他實施例中,也可藉由距離計算模組,計算使用者與電子裝置55之間的直線計離,也可根據路徑 規劃模組所規劃之路徑計算路徑距離。 In an embodiment, the electronic device 50 can pre-access or instantly download a map of the location, for example, a map of a store, a parking lot, etc., and the map can be combined with the moving track to be displayed on the display by the display module. On the unit, the user can quickly find the best way to go to the location of the electronic device 55 according to the "moving track displayed on the map". In this embodiment, the user can select the current location of the user electronic device 50 by clicking on the map or by way of a menu, or can locate the current location of the electronic device 50 by using the positioning system. Displayed on the electronic map. In other embodiments, the electronic device 50 can further calculate an optimal path for the user to go to the location of the electronic device 55 according to the map information and the movement track by the path planning module (not shown). In other embodiments, the distance calculation module can also calculate the linear separation between the user and the electronic device 55, or according to the path. The path planned by the planning module calculates the path distance.

藉此,本案實施例的裝置相對位置的判定方法可提供使用者周圍其他裝置相對於使用者當前位置的移動軌跡,以方便使用者瞭解其他裝置的移動狀態,進而方便使用者前往其他裝置的所在位置。需說明的是,上述實施例皆應用在電子裝置20固定不動,而電子裝置10移動的情況。在另一實施例中,當電子裝置10及電子裝置20皆移動時,本案實施例的裝置相對位置的判定方法亦可取得電子裝置20相對於電子裝置10的相對位置。以下則再舉一實施例詳細說明。 Therefore, the method for determining the relative position of the device in the embodiment of the present invention can provide a movement track of other devices around the user relative to the current position of the user, so as to facilitate the user to understand the movement state of other devices, thereby facilitating the user to go to other devices. position. It should be noted that the above embodiments are applied to the case where the electronic device 20 is fixed and the electronic device 10 is moved. In another embodiment, when the electronic device 10 and the electronic device 20 are both moved, the method for determining the relative position of the device in the embodiment of the present invention can also obtain the relative position of the electronic device 20 relative to the electronic device 10. The following is a detailed description of an embodiment.

圖7是依照本案再一實施例所繪示之裝置相對位置的判定方法的示意圖。圖7中的電子裝置70是使用者所攜帶的裝置,而電子裝置75則是使用者周圍的裝置,其中電子裝置70例如會根據上述實施例中的方法在單位時間t前後偵測電子裝置75並計算其與電子裝置75之間的第一距離L1及第二距離L2,同時也計算其在單位時間t內移動的第一位移dA,1。與前述實施例不同的是,在本實施例中,電子裝置75會計算其於單位時間t內移動之第二位移dB,1,並藉由無線通訊單元傳送給電子裝置70,此第二位移dB,1的計算方法亦可參照圖2及3之相關說明,在此不再贅述。接著,電子裝置70將以其當前位置作為參考點,將第一距離L1、第一位移dA,1與第二位移dB,1之差以及第二距離L2作為三角形的三個邊,利用三角不等式計算電子裝置75相對於參考點(即電子裝置70的當前位置)的第一相對位置。 FIG. 7 is a schematic diagram of a method for determining a relative position of a device according to still another embodiment of the present invention. The electronic device 70 in FIG. 7 is a device carried by the user, and the electronic device 75 is a device around the user. The electronic device 70 detects the electronic device 75 before and after the unit time t according to the method in the above embodiment. The first distance L1 and the second distance L2 between the electronic device 75 and the electronic device 75 are calculated, and the first displacement d A,1 which is moved in the unit time t is also calculated. The difference from the foregoing embodiment is that, in this embodiment, the electronic device 75 calculates the second displacement d B,1 that is moved within the unit time t and is transmitted to the electronic device 70 by the wireless communication unit. The calculation method of the displacement d B,1 can also refer to the related descriptions of FIGS. 2 and 3, and details are not described herein again. Next, the electronic device 70 uses the current position as a reference point, and uses the first distance L1, the difference between the first displacement d A,1 and the second displacement d B,1 and the second distance L2 as the three sides of the triangle. The triangular inequality calculates a first relative position of the electronic device 75 relative to the reference point (ie, the current position of the electronic device 70).

具體而言,圖8是依照本案再一實施例所繪示之裝置相對位置的判定方法的範例。請同時參照圖7及圖8,圖8是以圖7中電子裝置75的初始位置作為B0端點(即,座標(0,0)),並以圖7中電子裝置70的初始位置作為A0端點。此外,A1及B1端點則分別代表單位時間t後電子裝置70及75的所在位置。 Specifically, FIG. 8 is an example of a method for determining a relative position of a device according to still another embodiment of the present disclosure. Please refer to FIG. 7 and FIG. 8 simultaneously. FIG. 8 is the initial position of the electronic device 75 in FIG. 7 as the B 0 end point (ie, coordinate (0, 0)), and is taken as the initial position of the electronic device 70 in FIG. A 0 endpoint. In addition, the A 1 and B 1 endpoints respectively represent the positions of the electronic devices 70 and 75 after the unit time t.

圖8中A0端點至B0端點的距離L1即為圖7中的第一距離L1,圖8中A1端點至B1端點的距離L2即為圖7中的第二距離L2,圖8中向量代表圖7中的第一位移dA,1,且圖8中向量代表為圖7中的第二位移dB,1。假設B0端點向右平行於A1端點與B1端點之連線而延伸距離L2可產生A1’端點,且以A0端點為基準至A1’端點之向量為。由A0、A1、B0及A1’端點連線可形成平行四邊形,而向量為向量之差。將圖8中距離L1、L2及向量作為三角形的三個邊,則依據圖4A說明之三角不等式即可得知A1’端點的座標以及以B0端點為基準至A1’端點之向量。由於A0、A1、B0及A1’端點連線為平行四邊形,故以B1端點為基準至A1端點之向量亦為。最後,再以A1端點作為參考點,則可推得電子裝置75當前相對於電子裝置70的第一相對位置。 The distance L 1 from the end of A 0 to the end of B 0 in FIG. 8 is the first distance L 1 in FIG. 7 , and the distance L 2 from the end point of A 1 to the end point of B 1 in FIG. 8 is the same as in FIG. 7 . Second distance L 2 , vector in Figure 8 Represents the first displacement d A,1 in Figure 7, and the vector in Figure 8 Representative is the second displacement d B,1 in Figure 7. Assume that the B 0 endpoint is parallel to the line connecting the A 1 end point and the B 1 end point, and the extension distance L 2 can generate the A 1 'end point, and the vector from the A 0 end point to the A 1 'end point for . A parallel line can be formed by the line connecting A 0 , A 1 , B 0 and A 1 ', and the vector Vector versus Difference. The distances L 1 , L 2 and vectors in Figure 8 As the three sides of the triangle, the coordinates of the A 1 'end point and the vector from the end point of B 0 to the end point of A 1 ' can be known from the triangle inequality illustrated in Fig. 4A. . Since the A 0 , A 1 , B 0 and A 1 'end lines are parallelograms, the vector from the endpoint of B 1 to the endpoint of A 1 is also . Finally, using the A 1 endpoint as a reference point, the first relative position of the electronic device 75 relative to the electronic device 70 can be derived.

藉此,在使用者與其朋友都有移動的情況下,使用者依然可藉由本案實施例的裝置相對位置的判定方法取得其朋友相對於自己的相對位置。 Thereby, in the case that both the user and the friend move, the user can still obtain the relative position of the friend relative to himself by the method for determining the relative position of the device in the embodiment of the present invention.

需說明的是,上述實施例均在不使用定位系統的情況下 取得其他裝置相對於自己的相對位置。然而,在一實施例中,當使用者所攜帶的電子裝置或其周圍的其他裝置其中一個能夠使用定位系統來定位時,本案實施例的裝置相對位置的判定方法更可將上述取得的相對位置與此處裝置定位所得的絕對位置(例如,經緯度座標)結合,從而推知所有裝置的絕對位置。 It should be noted that the above embodiments are all without using a positioning system. Get the relative position of other devices relative to yourself. However, in an embodiment, when one of the electronic devices carried by the user or other devices around the user can be positioned using the positioning system, the method for determining the relative position of the device in the embodiment of the present invention can further obtain the relative position obtained. The absolute position (eg, latitude and longitude coordinates) resulting from the positioning of the device herein is combined to infer the absolute position of all devices.

舉例而言,圖9是依照本案再一實施例所繪示之應用裝 置相對位置的判定方法的示意圖。請參照圖9,電子裝置91至99可利用上述實施例的方法分別偵測鄰近的電子裝置並取得其與這些電子裝置的相對位置,取得相對位置的方法請參照圖2至圖8之相關說明,在此不再贅述。在一實施例中,假設使用者所攜帶的電子裝置91配備有定位系統(未繪示),此定位系統可支援至少一種下列系統:全球定位系統(Global Positioning System,GPS)、輔助全球衛星定位系統(Assisted Global Positioning System,AGPS)、伽利略定位系統(Galileo Positioning System)或全球導航衛星系統(GLObal NAvigation Satellite System,GLONASS),但不受限於此,也可利用基地台或是WiFi熱點進行定位。其中,電子裝置91可由定位系統進行定位,以取得其所在的絕對位置(例如,GPS經緯度座標),且電子裝置91可由絕對位置計算模組(未繪示)根據其所在的絕對位置及電子裝置95相對於電子裝置91的相對位置,計算電子裝置95的絕對位置(例如,將相對位置的座標轉換成經緯度座標,再依據方向與絕對位置相加減)。其餘電子裝置依此類推,亦可取得各自的絕對位置。 For example, FIG. 9 is an application device according to still another embodiment of the present disclosure. A schematic diagram of a method of determining the relative position. Referring to FIG. 9 , the electronic devices 91 to 99 can respectively detect adjacent electronic devices by using the methods in the foregoing embodiments and obtain relative positions with the electronic devices. For the method of obtaining relative positions, please refer to the related descriptions of FIG. 2 to FIG. 8 . , will not repeat them here. In an embodiment, it is assumed that the electronic device 91 carried by the user is equipped with a positioning system (not shown), and the positioning system can support at least one of the following systems: Global Positioning System (GPS), assisted global satellite positioning Assisted Global Positioning System (AGPS), Galileo Positioning System or GLObal NAvigation Satellite System (GLONASS), but not limited to this, can also be used to locate by base station or WiFi hotspot . The electronic device 91 can be positioned by the positioning system to obtain an absolute position (for example, a GPS latitude and longitude coordinate), and the electronic device 91 can be an absolute position calculation module (not shown) according to the absolute position of the device and the electronic device. With respect to the relative position of the electronic device 91, the absolute position of the electronic device 95 is calculated (for example, the coordinates of the relative position are converted into latitude and longitude coordinates, and then added and subtracted according to the direction and the absolute position). The rest of the electronic devices and so on, can also obtain their absolute position.

在另一實施例中,假設使用者攜帶的電子裝置91無法使用定位系統,但電子裝置92具備定位系統。則電子裝置92可利用定位系統進行定位,以取得其所在的絕對位置,並將此絕對位置傳送給電子裝置91。藉此,電子裝置91即可由絕對位置計算模組(未繪示)根據所接收的電子裝置92的絕對位置與電子裝置92相對於電子裝置91的相對位置,計算出電子裝置91的絕對位置(例如,相對位置的座標轉換成經緯度座標,再依據方向與第一絕對位置相加減)。其餘電子裝置依此類推,亦可取得各自的絕對位置。 In another embodiment, it is assumed that the electronic device 91 carried by the user cannot use the positioning system, but the electronic device 92 is provided with a positioning system. The electronic device 92 can be positioned by the positioning system to obtain the absolute position where it is located, and transmit the absolute position to the electronic device 91. Therefore, the absolute position calculation module (not shown) of the electronic device 91 can calculate the absolute position of the electronic device 91 according to the absolute position of the received electronic device 92 and the relative position of the electronic device 92 with respect to the electronic device 91 ( For example, the coordinates of the relative position are converted into latitude and longitude coordinates, and then added and subtracted according to the direction and the first absolute position). The rest of the electronic devices and so on, can also obtain their absolute position.

在另一實施例中,假設電子裝置91至99的使用者無法使用,但電子裝置91至99的使用者的其中之一知道目前其所在的絕對位置,則此使用者可藉由在地圖上點選的方式或是透過選單的方式選擇目前的位置,並將此目前的絕對位置傳送給其餘電子裝置,則其餘電子裝置亦可取得各自的絕對位置。 In another embodiment, assuming that the user of the electronic devices 91 to 99 is unusable, but one of the users of the electronic devices 91 to 99 knows the absolute position at which they are currently located, the user can be on the map. By clicking the method or selecting the current position through the menu, and transmitting the current absolute position to the remaining electronic devices, the remaining electronic devices can also obtain their absolute positions.

藉此,當電子裝置彼此藉由無線信號(例如,WiFi)建立連線後,即可形成如同圖9中的拓樸網路,僅需要其中一台電子裝置能夠藉由定位系統定位或接受目前絕對位置的資訊,則拓樸網路中的其他電子裝置亦推知各自所在的絕對位置。 Thereby, when the electronic devices are connected to each other by a wireless signal (for example, WiFi), a topology network like that in FIG. 9 can be formed, and only one of the electronic devices can be positioned or accepted by the positioning system. For absolute location information, other electronic devices in the topology network also infer the absolute location of each location.

此外,在另一實施例中,當兩位分別持有電子裝置10及電子裝置20的使用者啟動判斷對方相對位置的功能並利用例如NFC完成証證或配對後,電子裝置10及20可以目前的位置當作起始點,並利用感測器,例如加速度計、陀螺儀以及羅盤等,分 別偵測並計算位移的軌跡路徑,再將本身的位移軌跡路徑互相分享給另一電子裝置,如此電子裝置10及20即可藉由起始點的資訊以及電子裝置10及20的位移軌跡路徑資訊推算對方的相對位置;或者可單方向地由電子裝置20將自己的位移軌跡路徑分享給電子裝置10,則電子裝置10即可推算電子裝置20的相對位置。 如此,可單純地利用兩台電子裝置的位移軌跡路徑而推算對方的相對位置,而不需要以三角定位法計算。 In addition, in another embodiment, when the two users respectively holding the electronic device 10 and the electronic device 20 initiate the function of determining the relative position of the other party and complete the verification or pairing by using, for example, NFC, the electronic devices 10 and 20 may be present. The position is used as a starting point and uses sensors such as accelerometers, gyroscopes, and compasses. Do not detect and calculate the trajectory path of the displacement, and then share the path of the displacement trajectory with each other to another electronic device, so that the electronic device 10 and 20 can use the information of the starting point and the displacement trajectory path of the electronic devices 10 and 20. The information can be used to estimate the relative position of the other party; or the electronic device 20 can share the relative position of the electronic device 20 by the electronic device 20 in a single direction. In this way, the relative position of the other party can be estimated by simply using the displacement trajectory path of the two electronic devices without the need of triangulation.

並在需要知道對方相對位置的時候,啟動判斷對方相對 位置的功能,或可在需要使用判斷對方相對位置的功能時,再進行溝通以認證或是配對。例如,兩位使用者可開啟相關的應用程式,並可藉由例如NFC的方式進行配對,並直接以進行配對的位置作為起點,並開始追蹤對方的相對位置,並可將起點以及彼此的移動軌跡顯示在電子裝置上。 And when you need to know the relative position of the other party, start to judge the relative The function of the location, or when you need to use the function to determine the relative position of the other party, then communicate to authenticate or pair. For example, two users can open related applications, and can be paired by, for example, NFC, and directly use the position to be paired as a starting point, and start tracking the relative position of the other party, and can move the starting point and each other. The track is displayed on the electronic device.

本案另提供一種電腦程式產品,其是用以執行上述裝置 相對位置的判定方法的各個步驟,此電腦程式產品是由多數個程式碼片段所組成的(例如建立組織圖程式碼片段、簽核表單程式碼片段、設定程式碼片段、以及部署程式碼片段),並且這些程式碼片段在載入電子裝置中並執行之後,即可完成上述裝置相對位置的判定方法的步驟。 The present invention further provides a computer program product for performing the above device In the steps of the relative position determination method, the computer program product is composed of a plurality of code segments (for example, creating an organization chart code segment, signing a form code segment, setting a code segment, and deploying a code segment). And after the code segments are loaded into the electronic device and executed, the steps of the method for determining the relative position of the devices can be completed.

綜上所述,本案裝置相對位置的判定方法、電子裝置及 電腦程式產品藉由電子裝置在兩個不同時間點分別傳送或接收無線信號以偵測周圍其他裝置,並量測這些裝置回傳信號的信號強 度或往返時間,從而可計算出電子裝置與其他裝置之間的距離。此外,藉由感測器偵測電子裝置本身的位移,即可將上述計算的距離與此位移結合來計算其他裝置相對於電子裝置的相對位置,最後將這些電子裝置的相對位置以圖形化介面顯示在電子裝置的螢幕上。藉此,使用者便可在室內或其他無法或不欲使用定位系統的地方,得知周圍其他裝置相對於自己的相對位置。 In summary, the method for determining the relative position of the device in this case, the electronic device and The computer program product transmits or receives wireless signals at two different time points by the electronic device to detect other surrounding devices, and measures the signal strength of the device back signals. Degree or round trip time, so that the distance between the electronic device and other devices can be calculated. In addition, by detecting the displacement of the electronic device itself by the sensor, the calculated distance can be combined with the displacement to calculate the relative positions of the other devices relative to the electronic device, and finally the relative positions of the electronic devices are graphically interfaced. Displayed on the screen of the electronic device. Thereby, the user can know the relative position of other surrounding devices relative to himself indoors or other places where the positioning system cannot or does not need to be used.

雖然本案已以實施例揭露如上,然其並非用以限定本案,任何所屬技術領域中具有通常知識者,在不脫離本案的精神和範圍內,當可作些許的更動與潤飾,故本案的保護範圍當視後附的申請專利範圍所界定者為準。 Although the present invention has been disclosed in the above embodiments, it is not intended to limit the present case. Any person having ordinary knowledge in the technical field can protect the case without making any changes or refinements without departing from the spirit and scope of the present case. The scope is subject to the definition of the scope of the patent application.

S210~S270‧‧‧步驟 S210~S270‧‧‧Steps

Claims (20)

一種裝置相對位置的判定方法,適於由一第一電子裝置判定一第二電子裝置的一相對位置,該方法包括下列步驟:根據與該第二電子裝置之間的一無線信號,計算該第二電子裝置與該第一電子裝置之間的一第一距離;經過一第一單位時間後,根據該無線信號以計算該第二電子裝置與該第一電子裝置之間的一第二距離以及計算該第一電子裝置於該第一單位時間內移動之一第一位移;再經過一第二單位時間後,根據該無線信號以計算該第二電子裝置與該第一電子裝置之間的一第三距離以及計算該第一電子裝置於該第二單位時間內移動之一第二位移;以及以該第一電子裝置的一當前位置作為一參考點,根據該第一距離、該第一位移與該第二距離,以及該第二位移與該第三距離計算該第二電子裝置相對於該第一電子裝置的一第一相對位置。 A method for determining a relative position of a device is adapted to determine a relative position of a second electronic device by a first electronic device, the method comprising the steps of: calculating the number according to a wireless signal between the second electronic device and the second electronic device a first distance between the second electronic device and the first electronic device; after a first unit time, calculating a second distance between the second electronic device and the first electronic device according to the wireless signal and Calculating a first displacement of the first electronic device in the first unit time; and after a second unit time, calculating a one between the second electronic device and the first electronic device according to the wireless signal a third distance and calculating a second displacement of the first electronic device in the second unit time; and using a current position of the first electronic device as a reference point, according to the first distance, the first displacement Calculating a first relative position of the second electronic device relative to the first electronic device from the second distance, and the second displacement and the third distance. 如申請專利範圍第1項所述的方法,更包括:經過k-1個單位時間後,根據該無線信號以計算該第二電子裝置與該第一電子裝置之間的一第k距離;經過k個單位時間後,根據該無線信號以計算該第二電子裝置與該第一電子裝置之間的一第k+1距離,以及計算該第一電子裝置於第k個單位時間內移動之一第k位移,其中k為正整數;以及依據該第k位移、第k距離以及該第k+1距離,計算第k-1 單位時間時該第二電子裝置相對於該第一電子裝置的一第k相對位置以及第k單位時間後該第二電子裝置相對於該第一電子裝置的一第k+1相對位置之間誤差最小之值,以確定該第二電子裝置相對於該第一電子裝置的該第k相對位置。 The method of claim 1, further comprising: after k-1 unit time, calculating a kth distance between the second electronic device and the first electronic device according to the wireless signal; After k unit time, calculating a k+1th distance between the second electronic device and the first electronic device according to the wireless signal, and calculating one of the movements of the first electronic device in the kth unit time a kth displacement, where k is a positive integer; and calculating k-1 based on the kth displacement, the kth distance, and the k+1th distance An error between the kth relative position of the second electronic device relative to the first electronic device and a k+1 relative position of the second electronic device relative to the first electronic device after the kth unit time per unit time a minimum value to determine the kth relative position of the second electronic device relative to the first electronic device. 如申請專利範圍第2項所述的方法,更包括:存取先前計算的該第二電子裝置相對於該第一電子裝置的該第一相對位置至該第k個相對位置;以該第一電子裝置的該當前位置作為該參考點,根據該第一位移至該第k位移,分別修正該第一相對位置至該第k個相對位置為相對於該參考點的k個修正位置;以及以該參考點為中心,以圖形化介面顯示所述修正位置,以表示該第二電子裝置相對於該參考點的一移動軌跡。 The method of claim 2, further comprising: accessing the previously calculated first relative position of the second electronic device relative to the first electronic device to the kth relative position; Using the current position of the electronic device as the reference point, respectively correcting the first relative position to the kth relative position as k correction positions relative to the reference point according to the first displacement to the kth displacement; The reference point is centered, and the modified position is displayed in a graphical interface to indicate a movement trajectory of the second electronic device relative to the reference point. 如申請專利範圍第1項所述的方法,其中計算該第一電子裝置於該第一單位時間內所移動之該第一位移,且根據該無線信號計算該第二電子裝置相對於該第一電子裝置的該第二距離的步驟之後,更包括:該第二電子裝置計算其於該第一單位時間內所移動之一第三位移,並傳送給該第一電子裝置;以及以該第一電子裝置作為該參考點,根據該第一距離、該第一位移與該第三位移之差以及該第二距離計算該第二電子裝置相對於該第一電子裝置的該第一相對位置。 The method of claim 1, wherein the first displacement of the first electronic device moved in the first unit time is calculated, and the second electronic device is calculated relative to the first electronic device according to the wireless signal After the step of the second distance of the electronic device, the method further includes: the second electronic device calculating a third displacement that is moved in the first unit time, and transmitting the third displacement to the first electronic device; As the reference point, the electronic device calculates the first relative position of the second electronic device relative to the first electronic device according to the first distance, the difference between the first displacement and the third displacement, and the second distance. 如申請專利範圍第1項所述的方法,更包括: 開啟一特定應用程式;以及以近場通訊方式與該第二裝置進行溝通以進行認證及/或配對程序。 For example, the method described in claim 1 of the patent scope further includes: Opening a particular application; and communicating with the second device in near field communication for authentication and/or pairing procedures. 如申請專利範圍第1項所述的方法,其中計算該第一電子裝置與該第二電子裝置之間的該第一距離的步驟包括:發送該無線信號;接收該第二電子裝置響應該無線信號回傳的一回饋信號;以及依據該回饋信號的一信號強度,比對一距離對照表以取得該第一距離。 The method of claim 1, wherein the calculating the first distance between the first electronic device and the second electronic device comprises: transmitting the wireless signal; receiving the second electronic device in response to the wireless a feedback signal returned by the signal; and based on a signal strength of the feedback signal, the distance table is compared to obtain the first distance. 如申請專利範圍第1項所述的方法,其中計算該第一電子裝置於該第一單位時間內移動之該第一位移的步驟包括:利用加速度計、陀螺儀、電子羅盤或其組合所接收的感測資訊計算該第一位移。 The method of claim 1, wherein the step of calculating the first displacement of the first electronic device in the first unit time comprises: receiving by using an accelerometer, a gyroscope, an electronic compass, or a combination thereof The sensing information calculates the first displacement. 如申請專利範圍第1項所述的方法,其中計算該第一電子裝置與該第二電子裝置之間的該第一相對位置的步驟之後,更包括:以該參考點為中心,以圖形化介面顯示該第一相對位置。 The method of claim 1, wherein the step of calculating the first relative position between the first electronic device and the second electronic device further comprises: graphically centering the reference point The interface displays the first relative position. 如申請專利範圍第1項所述的方法,其中在經過該第一單位時間後,更包括:利用一定位系統定位該第一電子裝置,以取得該第一電子裝置的一第一絕對位置;以及 根據該第一絕對位置與該第一相對位置,計算該第二電子裝置的一第二絕對位置。 The method of claim 1, wherein after the first unit time, the method further comprises: positioning the first electronic device by using a positioning system to obtain a first absolute position of the first electronic device; as well as And calculating a second absolute position of the second electronic device according to the first absolute position and the first relative position. 如申請專利範圍第1項所述的方法,其中在經過該第一單位時間後,更包括:該第二電子裝置利用一定位系統進行定位,以取得一第二絕對位置,並傳送給該第一電子裝置;以及該第一電子裝置根據該第二絕對位置與該第一相對位置,計算該第一電子裝置的一第一絕對位置。 The method of claim 1, wherein after the first unit time, the second electronic device is positioned by using a positioning system to obtain a second absolute position and transmitted to the first An electronic device; and the first electronic device calculates a first absolute position of the first electronic device according to the second absolute position and the first relative position. 一種電子裝置,包括:一無線通訊單元,與一第二電子裝置傳送一無線信號;至少一感測器;一儲存單元,記錄多個模組;以及一或多個處理單元,連接該無線通訊單元、所述感測器及該儲存單元,以存取並執行該儲存單元中記錄的所述模組,所述模組包括:一距離計算模組,根據該無線信號,計算該第二電子裝置與該電子裝置之間的一第一距離,經過一第一單位時間後,根據該無線信號計算該第二電子裝置與該電子裝置的一第二距離,以及再經過一第二單位時間後,再次根據該無線信號以計算該第二電子裝置與該電子裝置之間的一第三距離;一位移計算模組,利用所述感測器偵測並計算該第一電子裝置於該第一單位時間內移動之一第一位移以及於該第二單位時 間內移動之一第二位移;以及一相對位置計算模組,以該電子裝置的一當前位置作為一參考點,將該第一距離、該第一位移與該第二距離,以及該第二位移與該第三距離計算該第二電子裝置相對於該電子裝置的一第一相對位置。 An electronic device comprising: a wireless communication unit that transmits a wireless signal with a second electronic device; at least one sensor; a storage unit that records a plurality of modules; and one or more processing units that connect the wireless communication a unit, the sensor, and the storage unit to access and execute the module recorded in the storage unit, the module comprising: a distance calculation module, calculating the second electronic according to the wireless signal a first distance between the device and the electronic device, after a first unit time, calculating a second distance between the second electronic device and the electronic device according to the wireless signal, and after a second unit time And calculating, according to the wireless signal, a third distance between the second electronic device and the electronic device; a displacement calculation module, wherein the first electronic device is detected and calculated by the sensor One of the first displacements per unit time and the second unit a second displacement of the in-between movement; and a relative position calculation module, the first distance, the first displacement and the second distance, and the second The displacement and the third distance calculate a first relative position of the second electronic device relative to the electronic device. 如申請專利範圍第11項所述的電子裝置,其中經過k-1個單位時間後,該距離計算模組根據該無線信號以計算該第二電子裝置與該電子裝置之間的一第k距離;經過k個單位時間後,該距離計算模組根據該無線信號以計算該第二電子裝置與該電子裝置之間的一第k+1距離,以及該位移計算模組藉由所述感測器偵測並計算該電子裝置於第k個單位時間內移動之一第k位移,其中k為正整數;以及該相對位置計算模組依據該第k位移、第k距離以及該第k+1距離,計算第k-1單位時間時該第二電子裝置相對於該電子裝置的一第k相對位置以及第k單位時間後該第二電子裝置相對於該電子裝置的一第k+1相對位置之間誤差最小之值,以確定該第二電子裝置相對於該電子裝置的該第k相對位置。 The electronic device of claim 11, wherein after the k-1 unit time, the distance calculation module calculates a k-th distance between the second electronic device and the electronic device according to the wireless signal. After k unit time, the distance calculation module calculates a k+1th distance between the second electronic device and the electronic device according to the wireless signal, and the displacement calculation module is configured by the sensing Detecting and calculating a kth displacement of the electronic device in the kth unit time, wherein k is a positive integer; and the relative position calculation module is based on the kth displacement, the kth distance, and the k+1th a distance between the kth unit time and a kth relative position of the second electronic device relative to the electronic device and a k+1th relative position of the second electronic device relative to the electronic device after the kth unit time The minimum error is between the values to determine the kth relative position of the second electronic device relative to the electronic device. 如申請專利範圍第12項所述的電子裝置,其中該電子裝置更包括一顯示單元,所述模組更包括一顯示模組,其中該相對位置計算模組存取先前計算的該第二電子裝置相對於該電子裝置的該第一相對位置至該第k個相對位置,該相對位置計算模組以該第一電子裝置的該當前位置作為該 參考點,根據該第一位移至該第k位移,分別修正該第一相對位置至該第k個相對位置為相對於該參考點的k個修正位置,以及該顯示模組以該參考點為中心,以圖形化介面顯示所述修正位置於該顯示單元,以表示該第二電子裝置相對於該參考點的一移動軌跡。 The electronic device of claim 12, wherein the electronic device further comprises a display unit, the module further comprising a display module, wherein the relative position calculation module accesses the previously calculated second electronic The first relative position of the device relative to the electronic device to the kth relative position, the relative position calculation module using the current position of the first electronic device as the a reference point, according to the first displacement to the kth displacement, respectively correcting the first relative position to the kth relative position as k correction positions relative to the reference point, and the display module is The center displays the correction position on the display unit in a graphical interface to indicate a movement trajectory of the second electronic device relative to the reference point. 如申請專利範圍第13項所述的電子裝置,其中該第二電子裝置包括計算其於該第一單位時間內所移動之一第三位移,並傳送給該電子裝置,其中該相對位置計算模組更以該電子裝置作為該參考點,將該第一距離、該第一位移與該第三位移之差以及該第二距離作為一三角形的三個邊,利用該三角不等式計算該第二電子裝置相對於該電子裝置的該第一相對位置。 The electronic device of claim 13, wherein the second electronic device comprises calculating a third displacement that is moved in the first unit time and transmitting the third displacement to the electronic device, wherein the relative position calculation mode The group further uses the electronic device as the reference point, and the first distance, the difference between the first displacement and the third displacement, and the second distance are used as three sides of a triangle, and the second electron is calculated by using the triangular inequality The first relative position of the device relative to the electronic device. 如申請專利範圍第11項所述的電子裝置,更包括一特定應用程式,其中在該特定應用程式開啟後,該電子裝置以近場通訊方式與該第二裝置進行溝通以進行認證及/或配對程序。 The electronic device of claim 11, further comprising a specific application, wherein after the specific application is turned on, the electronic device communicates with the second device in a near field communication manner for authentication and/or pairing program. 如申請專利範圍第11項所述的電子裝置,其中該距離計算模組更利用該無線通訊單元發送該無線信號並接收該第二電子裝置響應該無線信號回傳的一回饋信號,以及依據該回饋信號的一信號強度,比對一距離對照表以取得該第一距離。 The electronic device of claim 11, wherein the distance calculation module further uses the wireless communication unit to transmit the wireless signal and receive a feedback signal sent by the second electronic device in response to the wireless signal, and according to the A signal strength of the feedback signal is compared to a distance map to obtain the first distance. 如申請專利範圍第11項所述的電子裝置,其中所述感測器包括加速度計、陀螺儀、羅盤其中之一或其組合。 The electronic device of claim 11, wherein the sensor comprises one of an accelerometer, a gyroscope, a compass, or a combination thereof. 如申請專利範圍第11項所述的電子裝置,更包括: 一定位系統,連接所述處理單元,定位該電子裝置,以取得該電子裝置的一第一絕對位置,且所述模組更包括:一絕對位置計算模組,根據該第一絕對位置與該第一相對位置,計算該第二電子裝置的一第二絕對位置。 The electronic device of claim 11, further comprising: a positioning system, connecting the processing unit, positioning the electronic device to obtain a first absolute position of the electronic device, and the module further comprises: an absolute position calculation module, according to the first absolute position and the The first relative position calculates a second absolute position of the second electronic device. 如申請專利範圍第11項所述的電子裝置,其中該第二電子裝置更利用一定位系統進行定位,以取得一第二絕對位置,並傳送給該電子裝置,且該電子裝置的所述模組更包括:一絕對位置計算模組,根據該第二絕對位置與該第一相對位置,計算該電子裝置的一第一絕對位置。 The electronic device of claim 11, wherein the second electronic device is further positioned by a positioning system to obtain a second absolute position and transmitted to the electronic device, and the mode of the electronic device The group further includes: an absolute position calculation module, and calculating a first absolute position of the electronic device according to the second absolute position and the first relative position. 一種電腦程式產品,經由一第一電子裝置載入以執行下列步驟:根據與一第二電子裝置之間的一無線信號,計算該第二電子裝置與該第一電子裝置的一第一距離;經過一第一單位時間後,根據該無線信號以計算該第二電子裝置與該第一電子裝置的一第二距離,以及計算該第一電子裝置於該第一單位時間內移動之一第一位移;再經過一第二單位時間後,根據該無線信號以計算該第二電子裝置與該第一電子裝置之間的一第三距離以及計算該第一電子裝置於該第二單位時間內移動之一第二位移;以及以該第一電子裝置的一當前位置作為一參考點,將該第一距離、該第一位移與該第二距離,以及該第二位移與該第三距離計算該第二電子裝置相對於該第一電子裝置的一第一相對位置。 A computer program product is loaded via a first electronic device to perform the following steps: calculating a first distance between the second electronic device and the first electronic device according to a wireless signal between the second electronic device and the second electronic device; After a first unit time, calculating a second distance between the second electronic device and the first electronic device according to the wireless signal, and calculating one of the first electronic devices to move in the first unit time Displacement; after a second unit time, calculating a third distance between the second electronic device and the first electronic device according to the wireless signal, and calculating that the first electronic device moves in the second unit time a second displacement; and calculating, by the current position of the first electronic device as a reference point, the first distance, the first displacement and the second distance, and the second displacement and the third distance a first relative position of the second electronic device relative to the first electronic device.
TW103110873A 2014-03-24 2014-03-24 Method, electronic apparatus and computer program product for determining relative position of apparatus TWI536859B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW103110873A TWI536859B (en) 2014-03-24 2014-03-24 Method, electronic apparatus and computer program product for determining relative position of apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW103110873A TWI536859B (en) 2014-03-24 2014-03-24 Method, electronic apparatus and computer program product for determining relative position of apparatus

Publications (2)

Publication Number Publication Date
TW201538013A TW201538013A (en) 2015-10-01
TWI536859B true TWI536859B (en) 2016-06-01

Family

ID=54851055

Family Applications (1)

Application Number Title Priority Date Filing Date
TW103110873A TWI536859B (en) 2014-03-24 2014-03-24 Method, electronic apparatus and computer program product for determining relative position of apparatus

Country Status (1)

Country Link
TW (1) TWI536859B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108124053A (en) * 2016-11-28 2018-06-05 财团法人资讯工业策进会 Mobile device and operation method
TWI744609B (en) * 2019-02-27 2021-11-01 黃暐皓 Object positioning method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108124053A (en) * 2016-11-28 2018-06-05 财团法人资讯工业策进会 Mobile device and operation method
TWI744609B (en) * 2019-02-27 2021-11-01 黃暐皓 Object positioning method

Also Published As

Publication number Publication date
TW201538013A (en) 2015-10-01

Similar Documents

Publication Publication Date Title
CN104950284B (en) The determination method and electronic device of device relative position
EP3084351B1 (en) Method and device for aligning a movement path with a routing graph
US9599473B2 (en) Utilizing magnetic field based navigation
US9494432B2 (en) Collaborative navigation techniques for mobile devices
US9674668B2 (en) Method, electronic apparatus and computer readable medium for determining relative position of apparatus
US9116000B2 (en) Map-assisted sensor-based positioning of mobile devices
EP2925064A1 (en) Method and apparatus for locating a mobile device using the mobile device orientation
US8965684B2 (en) Mobile terminal, system and method
TWI612829B (en) System of location push notification service, user mobile device, and method of location push notification service
KR20160049447A (en) Simultaneous Localization and Mapping by Using Earth's Magnetic Fields
CN103968846A (en) Positioning and navigation method and device
KR20140031584A (en) Method and apparatus for position detecting and communication of device
WO2015184741A1 (en) Navigation information acquisition method and device, and mobile terminal
WO2016206717A1 (en) Checking map alignment
WO2014002782A1 (en) Mobile terminal, system, and method
US10823577B2 (en) Navigation method and navigation device
Verma et al. A smartphone based indoor navigation system
TWI536859B (en) Method, electronic apparatus and computer program product for determining relative position of apparatus
TW201621273A (en) Mobile positioning apparatus and positioning method thereof
WO2018053969A1 (en) Azimuth calibration method and apparatus
US9402162B1 (en) Mobile device, positioning method and non-transitor computer-readable recording medium