PDA

View Full Version : iPad accelerometer-and-compass-based GPS.




moonman239
Jun 30, 2012, 12:57 PM
I'm just wondering. The iPad has an accelerometer and compass. So is there an app that can calculate your location based on where your starting point is, what direction youre facing and the accelerometer readings?

Something like this: I tell the app I'm at home. I then proceed to take my car out of the driveway. I then turn west. In the meantime, my car accelerates to 25 mph. Because the app knows which way I'm headed, how fast I'm going and where I started it should be able to calculate where I am without a GPS receiver or Internet connection.



Gav2k
Jun 30, 2012, 01:06 PM
Which iPad are we talking about? Wifi or 3g

Saladinos
Jun 30, 2012, 01:49 PM
I'm just wondering. The iPad has an accelerometer and compass. So is there an app that can calculate your location based on where your starting point is, what direction youre facing and the accelerometer readings?

Something like this: I tell the app I'm at home. I then proceed to take my car out of the driveway. I then turn west. In the meantime, my car accelerates to 25 mph. Because the app knows which way I'm headed, how fast I'm going and where I started it should be able to calculate where I am without a GPS receiver or Internet connection.

There's a slight misunderstanding here about what an accelerometer measures - its the acceleration due to gravity (I.e. the device orientation), not general linear acceleration.

if your iPad has GPS, it doesn't need an Internet connection to determine your position or velocity. It does need an Internet connection to get the map, though (unless you have an app that saves offline map data, and I think the new iOS6 maps will have some sort of caching to save the map tiles offline)

takeshi74
Jun 30, 2012, 09:44 PM
iPad accelerometer-and-compass-based GPS.
If it's accelerometer and compass based then it isn't GPS. Navigation seems to be the word you're looking for.

if your iPad has GPS, it doesn't need an Internet connection to determine your position or velocity. It does need an Internet connection to get the map, though
^ This. You might save some power by not relying on the GPS receiver but you'd definitely lose accuracy. Try using the compass sometime to navigate around and see for yourself.

Menneisyys2
Jul 1, 2012, 08:50 AM
I'm just wondering. The iPad has an accelerometer and compass. So is there an app that can calculate your location based on where your starting point is, what direction youre facing and the accelerometer readings?

Something like this: I tell the app I'm at home. I then proceed to take my car out of the driveway. I then turn west. In the meantime, my car accelerates to 25 mph. Because the app knows which way I'm headed, how fast I'm going and where I started it should be able to calculate where I am without a GPS receiver or Internet connection.

As I've also stated in the other thread, you can only measure

- acceleration with accelerometer
- rotation (from your original position) with gyroscope (assuming you can't do the same with the accelerometer as it's not around its axes that you rotate but around YOUR e.g. vertical axis)
(- rotation with compass)

But you cannot measure non-accelerating speed, that is, linear movement. That is, it's NOT possible to measure the distance you go without GPS.

(I've, as a lecturer on iOS programming, played a lot with these sensors.)

sammich
Jul 1, 2012, 09:04 AM
The compass is highly unreliable due to interference that constantly disorientates it. So that's completely out.

But in theory, you can absolutely determine your position using a 3 axis accelerometer and a 6 axis gyroscope.

The accelerometer gives you your acceleration vector, and by integrating/adding these values over time you will get your velocity.

The gyroscope measures the angular displacement and velocity. So you know exactly which way you're pointing at any time and how fast you've changed your direction.

Taking all these together would give you an absolute position in space. But in reality the sensors only measure in discrete timesteps and some positional data can be missed due to this.

Menneisyys2
Jul 1, 2012, 10:07 AM
The compass is highly unreliable due to interference that constantly disorientates it. So that's completely out.

But in theory, you can absolutely determine your position using a 3 axis accelerometer and a 6 axis gyroscope.

The accelerometer gives you your acceleration vector, and by integrating/adding these values over time you will get your velocity.

The gyroscope measures the angular displacement and velocity. So you know exactly which way you're pointing at any time and how fast you've changed your direction.

Taking all these together would give you an absolute position in space. But in reality the sensors only measure in discrete timesteps and some positional data can be missed due to this.

Unfortunately, as the gyro can't measure speed either, there isn't a way of reliably measuring movement. Integrating based on the already very noisy and unreliable accelerometer data may result in errors of several orers of magnitude. See for example the discussion and especially the very insighftful links (I particularly recommend the post edited by "Ali" at Jul 11 '11 at 10:18) of all this at http://stackoverflow.com/questions/6647314/need-to-find-distance-using-gyroaccelerometer?rq=1

All in all, currently, if you don't have access to the GPS data and you can't use low-distance stuff like NFC to get your exact position inside a building / room, it's best to forget in-building roaming at all.

moonman239
Jul 3, 2012, 04:05 PM
There's a slight misunderstanding here about what an accelerometer measures - its the acceleration due to gravity (I.e. the device orientation), not general linear acceleration.


I'm talking about the gyroscope, not the accelerometer.