There are four main methods: according to the accuracy of high and low, followed by GPS positioning, WiFi location, base station positioning, IP location. In fact, if there is offline data in the local, that does not network can also be located, see Baidu Map offline navigation positioning principle? ,
However, the positioning accuracy may be better when connected to the Internet. HTML5 provides a geo-location interface, and the implementation is different for each browser, but it is also the following ways.
No1. GPS positioning
This requires the GPS module hardware, the general computer does not have this module, so can not be used. GPS positioning is not consumption of network traffic, because it is with satellite communications, you can not connect to the Internet, we have to connect to the Internet,
Just because no offline maps are used. In-vehicle GPS is the use of offline maps to navigate. If you use offline maps on your phone, you can also navigate without consuming traffic. See Baidu Map the principle of offline navigation positioning?
GPS has a cold start, warm start, hot start. Warm start-up is a satellite almanac, user summary location and local time, which can be used to predict which satellites are visible and satellite to the user's approximate distance,
To reduce the time required to search for signals. It will take a while for the signal to capture to be able to locate, this part of time is through the demodulation signal contains the navigation message to obtain the Ephemeris, obtains the ephemeris to calculate the satellite the precise position,
The user coordinates can be calculated by collecting four stars or more. The Almanac is valid for a long period of time and can take up to one year. But the Ephemeris is valid for only two hours. If the boot is hot starting within two hours after the last location. Cold Start is discontent
conditions for foot temperature start and heat start. As for the location of the network after the faster, because the network one can be located through the base station location to determine the user's approximate location (within hundreds of meters), two can be directly from the Internet to obtain the ephemeris. So the signal search time
Speed up, do not wait for the message in the Star calendar, within a few seconds can be positioned. There is also the ability to compress the search range and improve the sensitivity after acquiring the ephemeris, especially in the vehicle (the signal attenuation is severe when the metal shading film is attached) and other signals are weak.
The signal may be difficult to catch if the sensitivity is not high.
Rollo
Links: https://www.zhihu.com/question/23528331/answer/91451592
Source: Know
Copyright belongs to the author. Commercial reprint please contact the author for authorization, non-commercial reprint please specify the source. No2. WiFi location
Mobile phone is sure to support, computer words, requires a wireless network card to line. My computer has wireless network card, but the current use is wired Internet, in the new version of Baidu Map, can be more accurate positioning to my cell, the error of more than 300 meters.
Because the main means of computer positioning is WiFi and IP, and IP can not be located so accurate, so can only be WiFi location. As long as you can search for a WiFi signal, and these wifi signals have at least one server record, that
can be positioned.
1. Each wireless AP has a globally unique MAC address, and in general wireless APs will not move for a period of time
2. When the device is turned on Wi-Fi, it can scan and collect the surrounding AP signals, whether or not encrypted, connected, or even signal strength is not enough to display in the wireless signal list, to get to the AP broadcast MAC address
3. The device sends these AP-capable data to the location server, the server retrieves the geographic location of each AP, calculates the location of the device and returns it to the user device, combined with the strength of each signal
4. Location service providers should constantly update and replenish their databases to ensure the accuracy of the data, after all, wireless APs are not as basic as the base station tower 100% will not move
Such a location service providers now only Skyhook and Google two, the domestic Baidu, gold is likely to use this way. How do they collect WiFi GPS?
1. Active acquisition
Google's Street View car also has an important function is to collect the wireless signal along the way, and hit the GPS-positioned coordinates back to the server, so that the WiFi GPS location
2. User Submissions
Android phone users will be prompted to allow Google's Location Services anonymous location data (add by Zhj: As I understand it should be when users turn on GPS and WiFi) when they turn on use wireless network targeting
Will submit these WiFi and their current GPs to Google)
Conditions for WiFi targeting:
First, to turn on WiFi, and to be able to search for at least one wifi nearby, whether the connection does not affect the location
second, in the location of service providers, such as Baidu, gold, Google there is a record of the WiFi for GPs.
Little Han and Han
Links: https://www.zhihu.com/question/20593603/answer/16523229
Source: Know
No3. Base station positioning
Only for mobile phones, because the computer does not connect to the base station.
Base station positioning is also not consuming traffic. The accuracy of base station positioning depends primarily on the base station density of the current environment. From three and more than three base stations to determine the overall position of the mobile terminal, the higher the density of precision naturally higher.
Of course, will also receive the network environmental impact caused a large degree of deviation.
Reference http://bbs.feng.com/read-htm-tid-7709847.html
mobile phone after inserting SIM card boot, need to search around the base station information (is to find signal), usually in the place of the signal, the phone can search for Base Station more than one, just like your notebook in the Community
can search for more than one open router. The phone will then automatically select the best signal from these base stations (if the base station a) connection is registered. Is the rest of the base station all right? No, the phone is still searching.
If you leave base station a for a certain distance, the signal of base station A is not as good as Base station B, and the cell phone will automatically switch to base station B. This is why it is also a day of standby, you have more power on the train than at home .
, the mobile phone needs to search and connect the base station constantly.
when the mobile phone network coverage to a certain extent, the base station positioning has emerged. The principle is as follows: As we all know, the farther away from the base station, the worse the signal, so the intensity of the signal can be roughly estimated
Simultaneous search for at least three base station signals (now the network coverage is a very easy thing), mobile phone in addition to the best one to connect the signal, at the same time, according to the base station signal strength, roughly estimated the distance
Distance from the base station. Because the base station location is determined, so it is easy to determine the location, only need to base station as the center point, the distance is a radius to draw a circle, but at least three base station signal can be.
Positioning conditions must be in the location of the base station signal, the phone is in the SIM card registration status (flight mode to open WiFi and unplug the SIM card is not), and must receive 3 base station signal, whether indoors or not. However, the positioning speed
Ultra-fast, once the signal can be positioned, the main purpose is no GPS without WiFi in the case of a quick general understanding of your location (such as can make the weather forecast where to go to where to update). Also, if your phone
There is no base station location packet, it needs to be networked.
No4. IP location
HTML5 defines the Geolocation interface for Firefox/chrome, which uses Google's location services to upload WiFi information to Google servers that you can find nearby, as well as your ip,google location.
This information will be used. See Https://www.mozilla.org/zh-CN/firefox/geolocation/,IP positioning accuracy is relatively poor, at most is accurate to the city level, for Unicom, IP is the mobile phone number attribution,
For example, my mobile phone number is Beijing, then I go to Nanjing, that IP or Beijing. For mobile (telecommunications seems to be), IP is the location, that is, I went to Nanjing, that IP is Nanjing
How to locate your phone/computer