This application claims priority to Chinese Patent Application No. 201410460899.5 filed on Sep. 11, 2014, the contents of which are incorporated by reference herein.
Embodiments of the present disclosure relate to network technology, and particularly to an electronic device and a positioning method using the electronic device.
Electronic devices (for example, mobile phones) typically determine a position using a global positioning system (GPS) device. However, the position obtained by the GPS device may indicate a large area. That is, the large area indicated by the position from the GPS may not be specific to a particular location.
Many aspects of the disclosure can be better understood with reference to the following drawings. The components in the drawings are not necessarily drawn to scale, the emphasis instead being placed upon clearly illustrating the principles of the disclosure. Moreover, in the drawings, like reference numerals designate corresponding parts throughout the several views.
It will be appreciated that for simplicity and clarity of illustration, where appropriate, reference numerals have been repeated among the different figures to indicate corresponding or analogous elements. In addition, numerous specific details are set forth in order to provide a thorough understanding of the embodiments described herein. However, it will be understood by those of ordinary skill in the art that the embodiments described herein can be practiced without these specific details. In other instances, methods, procedures, and components have not been described in detail so as not to obscure the related relevant feature being described. The drawings are not necessarily to scale and the proportions of certain parts may be exaggerated to better illustrate details and features. The description is not to be considered as limiting the scope of the embodiments described herein.
Several definitions that apply throughout this disclosure will now be presented. The term “module” refers to logic embodied in computing or firmware, or to a collection of software instructions, written in a programming language, such as, Java, C, or assembly. One or more software instructions in the modules may be embedded in firmware, such as in an erasable programmable read only memory (EPROM). The modules described herein may be implemented as either software and/or computing modules and may be stored in any type of non-transitory computer-readable medium or other storage device. Some non-limiting examples of non-transitory computer-readable media include CDs, DVDs, BLU-RAY™, flash memory, and hard disk drives. The term “comprising” means “including, but not necessarily limited to”; it specifically indicates open-ended inclusion or membership in a so-described combination, group, series and the like.
In one embodiment, the storage device 250 can be an internal storage device, such as a flash memory, a random access memory (RAM) for temporary storage of information, and/or a read-only memory (ROM) for permanent storage of information. The storage device 250 can also be an external storage device, such as an external hard disk, a storage card, or a data storage medium. The at least one processor 260 can be a central processing unit (CPU), a microprocessor, or other data processor chip that performs functions of the electronic device 2.
The positioning system 20 comprises, but is not limited to, a receiving module 210, a parsing module 220, a calculation module 230, and an insertion module 240. Modules 210-240 can comprise computerized instructions in the form of one or more computer-readable programs that can be stored in a non-transitory computer-readable medium, for example the storage device 250, and executed by the at least one processor 260 of the electronic device 2. A detailed description of the functions of the modules 210-240 is given below in reference to
Referring to
At block 301, a receiving module receives data packets from wireless devices through a wireless network. As shown in
At block 302, a parsing module parses the data packets of each wireless device to obtain position information of each wireless device. In one embodiment, the parsing module parses the data link layer of the data packets of each wireless device to obtain the position information of each wireless device.
At block 303, a calculation module calculates a position of the electronic device according to the position information of each wireless device. In at least one embodiment, the position of the electronic device can be an average of the longitudes of all wireless devices and an average of the latitudes of all wireless devices. For example, the position of the electronic device is the average of the longitudes and the latitudes of six wireless devices as shown in
where n is an amount of the wireless devices, x is a longitude of the electronic device, y is a latitude of the electronic device, xi is a longitude of the ith wireless device, yi is a latitude of the ith wireless device, ki is a signal parameter of the ith wireless device, a and A are constant values, di is a strength of the signal of the ith wireless device.
At block 304, an insertion module inserts the position of the electronic device into data packets of the electronic device. The data packets of the electronic device can be transmitted to other devices, for example, a tablet computer, so that the other devices can determine a position according to the position of the electronic device. For example, each of the other devices uses the block 303 to calculate a position of each of the other devices according to the position of the electronic device.
The embodiments shown and described above are only examples. Even though numerous characteristics and advantages of the present technology have been set forth in the foregoing description, together with details of the structure and function of the present disclosure, the disclosure is illustrative only, and changes may be made in the detail, including in particular the matters of shape, size and arrangement of parts within the principles of the present disclosure, up to and including the full extent established by the broad general meaning of the terms used in the claims.
Number | Date | Country | Kind |
---|---|---|---|
201410460899.5 | Sep 2014 | CN | national |