I have been wondering how the iPhone determines location based on wifi, because I want to integrate this functionality into a java app of mine.
When I run a location check on my ip, it throws me all the way into some other neighborhood... But when I use my iPhone's location feature, it points right too me. (and GPS is turned off)
How does the iPhone determine location? Because I know it's not using an ip location.
It uses a wifi access point database. See: http://skyhookwireless.com/ and specifically http://www.skyhookwireless.com/press/skyhookapple.php.
It's using a triangulation scheme based off of known wifi access points. When this was first announced, I heard the name Skyhook Wireless thrown around, so it's possible that the iPhone is using their databases for location.
Cell tower triangulation? It can see the neighbouring GSM antennas and knows the relative signal strengths. This allows a pretty good estimate
Related
I want to write an application that it can record the wifi hotspot's location we are accessing and display them in map. But the problem is - how do I get wifi hotspot's location?
I think I can use the wifi signal to get the wifi hotspot's location, but it may not be very accuracy at first time. And if there is no other solution, I could record the location of GPS when access wifi hotspot at the first time.
You'll not be able to find the hotspots location and you'll not be able to determine the direction and distance from your current position to the actual hotspot.
The hotspots don't report their coordinates (my wifi box doesn't even know it's own geographical coordinates). Google captured hotspots during their streetview missions and used the results to triangulate the positions of wifi hotspots and other companies did the same to build up databases.
So to get the information, you'll need access to a database that knows the coordinates of hotspots.
TL;DR
Such services (1, 2) and apps exist and you can just be downloaded and/or readily used.
Technical possibilities of localization
A very rough localization is possible via the IP address. This technically (and not always) only allows you to find the location of the ISP through which the internet is accessed, not the AP/hotspot itself (since a certain IP address pool is assigned to a given ISP). However, unless a VPN is used, that will usually at least tell you the country and often be even accurate to less than 50km (since ISPs are usually somewhat close to the internet access node). Many readily avaiable services are available for this, simply searching for something along the lines of "ip to location API free" should yield good results.
As you thought yourself, and as other answers already mentioned (in vague terms), there is however a better (or at least additional) option. You could just use the many devices out there to record the received WiFi signals and associate the strength of the signal with locations. With such a database, you could then in turn located devices, based on the received signals. Actually there are several such services, most prominently the one created by google and used (and fed with data by) pretty much any android phone out there. Fortunately, some of these are open and free to use (and contribute to), such as the one provided by mozilla, and another one.
Cell towers (and according databases) often allows localization down to tens or hundreds of meters.
In some places dedicated bluetooth APs are used to increase localization accuracy, especially indoors.
If you have a lot of time (several hours to days) and a more-or-less accurate time, you can also use the light (from sun and moon) to get a location. Even with the simplest means you can get down to a few dozen kilometers.
Watching the inclination of geomagnetic field against center of gravity in combination with an according dataset (very inaccurate, but cheap).
Of course dedicated satellite navigation systems such as GPS (~5m), BeiDou (10m~10cm), Galileo (1m~1cm), GLONASS (7~3m), where the lower numbers in the brackets are commercial/military only-systems. However, each of these require dedicated receivers.
These satellite navigation systems are often augmented by Ground Based Augmentation Systems (GBAS), which require additional receivers.
So now you can pick and chose for your application, which of these are most useful to you.
I don't think so. I use iPod touch maps and Samsung Galaxy Wonder as hotspot. iPod could tell my location! My guess is Samsung stealthily follow Apple's doing of communicate geo info through wi-fi.
I am trying to test a Location aware application on Android and iPhone in which I need to go to different locations.
Is it possible to mask/change the GPS location of the smart phone in which the GPS app is running using some code in.Net /Java? This is to make testing easier...
Pretty sure something like that would require hacking the onboard GPS chip. The easiest solution here would be to actually have your app mock the GPS coordinates instead.
I use a free 'Fake GPS' application from the Google Play Store for that purpose. I'm sure there are several available on both your target platforms
I'm writing a server side java application that takes location updates from an android device. The device is traveling along a route and I want to be able to determine if it had arrived at its location.
The obvious solution is to define a geo-fence...of the current location of the android device is within this fence then it has arrived at its location.
My question is whether this is possible to do in serverside java. I know there are probably ways to do it with google maps API on the client side but that's not possible for me.
Are there any libraries out there that will provide this functionality?
Thanks in advance
B
Actually, most of these answers don't solve the problem. A geofence is a regular n-gon and the original question isn't trying to determine the distance to a point within the fence (i.e. am I close to a lat/lon) but rather whether or not they are within a box of geometry.
For that, the best answer is to do the following:
http://www.codeproject.com/Articles/62482/A-Simple-Geo-Fencing-Using-Polygon-Method
I'm doing some work for my theses in networking, and have stumbled into a little problem. One of the first steps in the work I must do consists on having a computer working as an AP (I am using hostapd for this) and with it, detect all the devices in the room which currently have wifi turned on (do not need to be associated with any AP).
I have found a thread that pretty much asks the same ( discover mobil devices using wifi ), and I understand the answers that were given, but they don't give any hint as to how this can be done. The post ends saying that the person was able to do this using Kismet, however I can only seem to use Kismet to discover clients already associated with an AP.
Can someone point me in the right direction here please? If not using Kismet, then maybe suggest a different tool that works with Ubuntu.
Ps. I will need to run a continuous scan of the "room" to find any new devices and then send this information to an event manager written in Java.
I guess you could have a WiFi card, in monitor mode, scanning every channel for beacons. On Linux, aircrack-ng is the tool suite you are looking for. airodump-ng is the tool that shows you a list of devices present around your location. It is designed to display first the hotspots with the potentials clients, but also shows all the devices that are connected to an AP or trying to probe to an AP.
However, you won't be able to scan devices having their WiFi connection turned down. I'm not sure about devices not associated to an AP, my guess is you will be able to detect them if they send beacons one way or another (for example, to detect WiFi hotspots).
If you need this in Java, you can write a wrapper to airodump-ng, or you can launch airodump-ng as a service outputing to a file and read this file from a Java app.
No concrete answer I'm afraid, but I hope these will help you figure a way to solve your problem.
How can one get more accurate location coordinates from mobile device (smarthphone, iPhone, BlackBerry ...) other than from IP address. For example by using GPS query from smartphone API. And how would one go about integrating with Java?
This depends on what you're asking.
If you mean "How can one retrieve GPS coordinates using Java in a native application on a smartphone?", then that answer will differ for every smartphone platform, and there is no answer for iPhones because iPhones do not run Java.
If you mean "How can one retrieve GPS coordinates in a web application using Java on the backend?", then you can use the Geolocation API in HTML5, assuming the browser supports it (as far as I know, Mobile Safari and the browser in Android support this. I don't know about Blackberry, and would assume that it does not). See here.