Is iPhone Proximity detection possible with Bluetooth? - iphone

Would it be possible to fill a building with 20 - 30 bluetooth devices that act as proximity detectors and write an app that can calculate location in the building based on distance from the current detected sensors.
I've looked at the GameKit API, but I don't see anything about calculating distance from devices.
Can someone point me in the direction of an Apple API, or a 3rd party API that can be used for this kind of application.

We don't get the low level BlueTooth or WiFi control that would be required to do this. So unless you jailbreak you can't.

Low level Bluetooth can provide RSSI and Trasmit power level at the maximum for any kind of proximity indications.
As I understand it is extremely difficult to calculate the distance from these reliably.

Location services is surprisingly good at estimating location even in a residential area with only secured wireless APs detectable. But how you would add your APs into that DB, I don't know.

Related

Indoor navigation hardware/software requirements for iOS

I'm developing navigation system for my university as some kind of research activity. I'm using SVGKit to display floor plans. And now I need to provide user locationing service for navigation and tracking. So here's my questions:
1) Do I need some special hardware installed in university (Cisco MSE for example, or some cheaper analogues), or I can apply some software/technologies to our current hardware for server-side user location determining? If I do, what equipment do I need for it? I mean, it would be one unit for the whole university, or one per each floor, or what?
2)
Q: Why doesn't the Redpin iPhone client conform to the iPhone SDK
Agreement? A: Apple does not provide a public API to retrieve WiFi
data. In order to get the iPhone client working we had to use a
private API, which is disallowed by the iPhone SDK Agreement.
(c) http://redpin.org/faq.html Does it mean that RedPin is unacceptable in AppStore, so I can't use it?
3)Does Navizon I.T.S. requires some specific hardware equipment except standart routers?
Thank you all, maybe you can offer me better solutions, I hope. Thanks in advance.
Indoor positioning is a very vast field and many different solutions are available which all use a different combination of hardware/software. Some need no specific hardware to work, others need a very expensive infrastructure to be put in place. In the end, it all depends on the accuracy you are trying to achieve. Here are the most common solutions used, I ordered them by the type of technology used:
Wifi: two main techniques are used here, trilateration and fingerprinting. Both do not require specific hardware if your uni already has deployed access points (APs). Trilateration converts signal strength to distance and then intersect circles (almost exactly like GPS). In general this has poorish accuracy and you need to know the exact position of APs for it to work. Fingerprinting is a pattern matching technique where you first build a wireless map of the environment and then match the measurement against this map.
Bluetooth: same techniques as above can be used with Bluetooth nodes. Of course, there's less Bluetooth nodes than Wifi so you might need to deploy some extra nodes for it to be accurate enough. Same accuracy as Wifi (roughly 5 meters)
Dead reckoning: uses an accelerometer, gyroscope and compass to calculate the speed of heading of the user. Needs to be initialized and calibrated regularly by another absolute positioning technique. Subject to drift so accuracy degrades quickly over time. Upside is its very cheap, no extra hardware or initial survey phase are needed.
UWB: very accurate techniques based on time of flight measurements. Requires expensive hardware for both transmitter and receiver. You can achieve cm accuracy with this but it's probably not what you're after
This is still an field of research so it's not that easy to find something that just works. I suggest contacting the IT department of your university, if they run a Cisco system, I know some of them provide some sort of positioning capabilities but I don't have much details.
As for your iPhone question, any app that accesses the private API to access Wifi measurements will be rejected by the App store, so you won't be able to publish anything that relies on Wifi. You can still use it for research purpose though, you'll just have to figure out the code yourself as there's no official documentation (some unofficial doc is out there though)
Good luck!

Detect if Device has GPS

How to detect if GPS is available?
The iPod touch and iPad WiFi version don't have GPS, they have something else based on WiFi.
Anyway, how to know if GPS is available?
Or how to detect iPod Touch or iPad Wifi model?
This is a common difficulty on iOS... One way would be to get a location and check if the altitude is present.
if a valid altitude is present, the position has most probably been computed using GPS
else either the GPS has not picked-up any signal yet or it is not present.
Anyway on iOS Apple has a single interface for all location providers because they intend the developers to express their requirements in terms of accuracy, the control of the technology used should be left to the OS.
Not sure yet if my solution will cover every device... but... What I do is if it's an iPad ask if the device has a cellular connection (Know if iOS device has cellular data capabilities). If so, it will most likely also have GPS.
Not sure if this will cover every device correctly, but at least my test-devices are detected correctly.
To be 100% sure that it is a GPS loaction, check for attribute course. if this is valid then its from GPS. but when not moving course is invalid too.
you can use that condition as initial trigger that now you have GPS.
If you need an initial valid GPS when not moving, check for
vertical accuracy < 100 and horicontal < 50m

Is there a technology that can pinpoint an iPhone's *exact* location (to the feet/couple feet, indoors)?

Is there is a way to determine an iPhone's exact location (indoors, and to a distance of just a couple of feet) via use of radio/antenna's or some other infrastructure located around premises (i.e a hospital, shopping mall, school). Will appreciate any ideas/direction (technologies, research) as for how to overcome this limitation.
If you mean for an area you have control over (setting up a location network for a specific school/hospital) as opposed to generic location, you'd be able to triangulate your position based on wifi signal power for APs with known locations.
If you wanted it to be a generic solution, and you know there would be multiple APs in/around the buildings you wanted, you could triangulate all wifi signals while you have GPS outside the building, and then reference those locations when you lose gps accuracy. The first part is something that many wardriving applications already do.
Here's an article describing a commercial technology for this purpose in high-level detail: link
And here's a link to a SO page where people have started discussing possible methodologies: link
Use the GPS and hope that you got good coverage.
Other than this, you can deploy several wifi hotspots that can measure the signal strength for each packet and do a triangulation to calculate the iPhone position with regards to three or more of these hotspots based on the signal strength each of them measured.
A quick search for "signal triangulation" on the internet reveals a Wi-Fi Based Real-Time Location Tracking technology from Cisco. I have not used it, so I can't vouch for it; and I suspect it's rather expensive. There might be other solutions as well.
The alternative would be to buy several wifi routers or access points and flash them with your own version of the firmware. You can probably use OpenWRT or DD-WRT as a base for this.

iPhone Development - Assisted GPS

What's the deal with iPhone's GPS? I never get a good reading when i'm in my office building, or in my room. What really ticks it! and what doesn't? Please help me understand the assisted GPS science.
If I'm not mistaken, the gps tries to pinpoint your position using three methods:
1. Satellite
2. Mobile network
3. Wi-fi networks
So if you don't have a good reading, then probably one or more of these methods cannot be used properly in your area. For instance, satellite will not always work that well in buildings with thick walls and ceilings.
Assisted GPS means that it may have it's location from different sources than GPS satellites, for instance known wifi hotspots, or GSM masts. However these sources are less accurate the true GPS.
Claus
For the actual GPS in your iphone to get a good position, it has to be in direct sight of the GPS satellites. It cannot do that inside a building. So if you are inside you are not going to get the best position from the iphone. It can give you a position using other methods such as the cell phone network and public wi-fi networks, but these positions aren't as accurate as the real GPS position.
Here is an article that explains the GPS system:
http://en.wikipedia.org/wiki/Gps
Depends on whose definition of Assisted GPS.
True 'assisted GPS' means the GPS receiver uses a known initial position, from the cell tower location, to bootstrap the GPS position calculations. If you know where you are it's much quicker for the position solution to lock to the signal - that's why GPS take so long to find first fix compared to updating.
Some APIs use assisted GPS as shorthand for alternate location services where if GPS is not available, is disabled, or would use too much battery power it will supply a lower grade position based on cell tower triangulation or other methods.
There are many answers I found in WWDC 2010 – Session 115 - Using Core Location in iOS 4.
Very advised.

How accurate is the triangulated GPS of the non-3G iPhone?

Does anyone have any experience with the triangulated GPS used by the non-3G iPhone? How does it compare with 3G positioning? Does the iPhone 3G use triangulation in the event that there is no GPS signal available? Is there anyway to determine the accuracy of the non 3G coordinates? Thanks.
I have done a lot of mobile software with a bunch of different devices including 3G iphones and 3G blackberry's and here is what I have found.
The blackberry and iPhone GPS is really good when you have clear line of sight and at least 9 satellites present. In some dense residential or urban areas you might only get 5-6 satellites which can take a while to converge.
If you do not have a signal, GSM phones like the iPhone will try and find your position using cell tower signal strength but it is NOT as accurate as GPS... not by a long shot.
I have heard, though this has not been confirmed that the iPhone also uses some server side machine learning when it can't find a GPS lock meaning that it takes the average all of the cell towers, plus the average of all the users who have used GPS in your area to try and find your best position. This is sometimes called AGPS or assisted GPS where the GPS information and cell tower strength are used together.
Also, the only thing I can think of for finding the accuracy of the non 3G coordinates would be to programmaticly switch providers in your code, or simply go into preferences and turn off 3G and write an application that does some tests.
The Pragmatic Programmers have a great iPhone SDK book that just added a chapter on using the Location API, so that might be a great place to start.
Hope this helps.
The CLLocation class has the properties 'horizontalAccuracy' (for latitude/longitude) and 'verticalAccuracy' (for elevation).
In addition to cell towers and GPS, locations may also determined by Skyhook Wireless, which has a database of Wi-Fi base station MAC addresses and locations.
When using only GSM towers, it's +/- 500m (it varies greatly, sometimes it's more precise).
If it finds known Wi-Fi network, then it's down to +/- 50m.