iphone gps location - iphone

What is the distance between the closest gps positions?
If I have multiple devices and I want to get their locations, these devices being within a 20 meter radius, how accurate will the coordinates be?
e.g how close do players need to be before the coordinates are the same?
Thanks

When you query a location via CoreLocation, you get the accuracy in the CLLocation instances. See the horizontalAccuracy and verticalAccuracy.
The accuracy of GPS depends on a number of factors like signal quality (for example, signal quality drops if it's cloudy). Also, the iDevices differ in their GPS receiver's accuracy. I found the iPhone 4 to be more accurate than the iPhone 3G, for example (the iPhone 4 also seems to have a better antenna as I often get a signal with iPhone 4 where the iPhone 3G is having a hard time).

Related

how to use the userAcceleration in iPhone

hi I want to get the acceleration of my iPhone but I dont want the acceleration values to change when the iPhone is tilted.
and I think the answer is the userAcceleration.
but I don't know how to get the userAcceleration values.
I know that I have to use the core motion and use the CMdeviceMotion but i don't know how to initialize and set it up.
I know this question was asked awhile ago, but I'm hoping I can provide some interesting perspective if you're still interested.
userAcceleration will provide watered-down (not raw) data comprised of sets of acceleration & gyroscopic information. You can get the raw acceleration data from CMMotionManager with the method -accelerometerData:
Unfortunately, the purpose of the accelerometer on the iOS device is to determine movement and orientation in a 3-dimensional axis: X, Y and Z coordinates. The iOS system doesn't differentiate between "tilting" and "movement" - they're one in the same. I don't know what purpose you have for divvying out the too, but that's what's laid out in the CoreMotion framework for us.

Changes in accelerometer / gyroscope limitations for iPhone 5 / 5th Gen iPod Touch?

Back when the iPhone 4 and 4th Generation iPod Touch came out, I was toying around with Apple's Core Motion sensor fusion algorithms to see if I could get any interesting results for very local dead reckoning (over the range of a few inches or feet). I didn’t expect anything spectacular, given the relatively low specs of the MEMS sensors. And although Apple’s CMDeviceMotion gravity property uses a decent (though opaque) sensor fusion algorithm, the complementary userAcceleration property isn’t exactly targeted at dead reckoning. Still, I thought there might be enough there to have a bit of fun.
The iPhone 4, iPhone 5, 4th Gen iPod Touch, and 5th Gen iPod Touch all apparently use the STMicroelectronics LIS331DLH accelerometer and L3G4200D gyroscope. (Actually, I haven’t seen the part number for the iTouch-5 gyro yet, so it could be different.)
Teardowns: iPhone-4, iTouch-4, iPhone-5, iTouch-5
The ST specs show that accelerometer could sample at 1000 Hz up to ±8g. And that gyroscope could sample at 800 Hz up to ±2000 dps.
Specs: LIS331DLH, L3G4200D
But, playing with my 4th Gen iPod Touch (both iOS 5 and iOS 6), I can only crank the sampling rates up to 100 Hz. If I set CMMotionManager deviceMotionUpdateInterval any lower than 0.01, it automatically resets to 0.01. Same for accelerometerUpdateInterval and gyroUpdateInterval.
Further, the accelerometer output always seems to be capped at about ±2g.
I've seen others remark on similar bounds for the iPhone 4.
Both these bounds severely limit the local acceleration calculations I can squeeze out the device (experimenting with my 4th Generation iPod touch). I presume Apple has set these bounds low to reduce power consumption. Though I don’t know if they’re set in the hardware, or in iOS somewhere.
Has anyone played with these accelerometer and gyroscope bounds on the iPhone 5 or 5th Generation iPod Touch? (Or any iPads for that matter?) Any sampling rates higher than 100 Hz? Any accelerometer measurements outside the bounds of ±2g?
Of the reading I have done you usually have 2-3 choices when determining what min/max readings an accelerometer will read. 2G is an extremely common choice for accelerometers because the next step (8G) is usually to coarse a reading to get the fine measurements needed when working with a hand movement. If you were dropping it off a building to measure the force of hitting the ground you would want to use the 8G (or 16G as some offer).
It looks like the Hz is intentionally capped at 100Hz according to the folks at Corona Labs. It is to keep from abusing the battery apparently. I had read that the accelerometer is the least power hungry sensor but I guess it's all relative or there is a sharp increase in power use at some point around 100Hz.
I was testing techBASIC on an iPhone 5 and noticed an anomaly that led me to this discussion. Apparently the accelerometer in the iPhone 5 is set to the 8G range! While I can't find any references to confirm it, techBASIC's accelerometer demo showed this when I shook the iPhone 5 up and down:
That's pretty exciting for physics applications. I used a SensorTag to measure the acceleration in a model rocket because it has an optional 8G range, and the iPhone did not--you can now dispense with the SensorTag and just use the iPhone.
http://www.youtube.com/watch?v=8YNjwcNXOK4iPhone Rocket
To help answer the other half of your question, I am using an iPad Mini and when I use Warren Whipple's suggestion, I find that the accelerometerUpdateInterval and gyroUpdateInterval would be reset to 0.01 immediately if I set them to any lesser value.
However, when I run diagnostic tests on the device I find that the real rate at which the accelerometer or gyro data is updated is closer to 0.02 s, i.e. if I set the accelerometerUpdateInterval to 0.01 s and query accelerometer data at 0.01 s, I get a unique reading on every other fetch, but if I set it to 0.02 s (or query at 0.02 s) then I get unique reading on every fetch.

Measuring distance between two iOS Devices

Yeah, I'm currently wondering about this.
In my use case the devices will be 50cm to 10m apart and I'd like it to be accurate to at least 10 cm. (Therefore GPS is not an option)
2 Ways spring to mind:
Sound: I asked about this in the dev forums and I'm in contact with laanlabs, about the code of their sonar ruler.
Picture on one device + Camera on the other: Seems easier to set up, since my user case involves the user facing one device at 90 degrees anyway. But it would be more work for the user to face the camero into the direction and it would not react to a change in distance.
Now the question: Is anyone aware of any code that does something like this already? Possibly a non-iPhone general c-Project?
Method with camera: we already know size for each device. You take a picture of device, calculate it's height/width to determine type of device (iPhone/iPod or iPad), than calculate a distance.
For example - if device is iPhone you know, that its size is 115x58 mm. On picture it NxM pixels. Now you can calculate the distance. (If N & M smaller hence distance is larger)
If you were to use the sound method one approach would be to have device A emit a sound, device B would then be listening for this at all times and on detection echo back a secondary sound. This would give you a round-trip time from which you could calculate distance - don't forget to compensate for latency between detection re-emission as well.
I am not sure about but this is what i found from one of the answers in this previous SO question How to measure distance between two iphone devices using bluetooth?
Using bluetooth for localization is a very well known research field . The short answer is: you can't. Signal strength isn't a good indicator of distance between two connected bluetooth devices, because it is too much subject to environment condition (is there a person between the devices? How is the owner holding his/her device? Is there a wall? Are there any RF reflecting surfaces?). Using bluetooth you can at best obtain a distance resolution of few meters, but you can't calculate the direction, not even roughly.
You may obtain better results by using multiple bluetooth devices and triangulating the various signal strength, but even in this case it's hard to be more accurate than few meters in your estimates.

Using iphone accelerometer to count the number of spins when tossed in the air

I would like to have a program that build a program that uses the accelerometer to count the number of time an iphone spins (either on a table top or when tossed in the air ) any suggestions?
The iPhone 4 may be able to do this, as it has gyroscopes that are not affected by acceleration, but when you spin a device with an accelerometer the accelerometer will just report that it seems like there's a large acceleration pointing on a vector from the center of rotation straight out.
You throw your iPhone in the air?
Just a heads up if you're planning on putting this on the App Store - Apple rejected/removed an app that measured the speed an iPhone fell at while being dropped. The reason they gave was because it would encourage users to do things with their iPhone that would potentially damage it. Your app would likely befall the same fate.

GPS on iPhone and Android...is there any way to get the EXACT location of the phone (not approximate)?

I know that it's mostly "approximate".
But, I must know the EXACT location of the phone, regardless of battery life or whatever.
I need the exact location of the phone! Is it possible?
It depends on what you mean by exact!
Any location technology will have a level of accuracy and much of this depends on the hardware your using. Mil spec GPS will cost a lot more than the chipset in your iPhone and use a lot more power too.
The best I've managed to get using the browser with iPhone 3GS GPS in wide open space is +/-17m
Usually its best to design you application around this for example most turn by turn sat-nav assumes you must be on a road and correct the location for this.
Uncertainty principle says no.
Define 'exact' and then we'll tell you. If it doesn't move and you've got a month, then better than a millimeter is probably possible (they track earthquake faults this way). But if it's moving, or doesn't have a good view of the sky, then it's not going to work nearly so well. And the math to do long-term averaging is pretty heavy going.
From the point of view of fundamental physics this question is meaningless. No physical measurement can ever be EXACT. There is ALWAYS a tolerance. Even if you went back to your national datum point and surveyed your position back to the point in question there will be errors in the measurements taken that will result in a non exact position.
If you then put your device on the ground - where on the device are you measuring to - the top left corner, the intersection of the diagonals across the device, the antenna position...?
"Regardless of battery life" - are you implying that the position measurement must occur in the absence of power?
Look into fine GPS location in the location API's(on Android)...that's the most "exact" you're gonna get. If you get a good GPS lock it'll probably be <10 meters. I just tested while in my house and got <5 meters.