Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

moonman239

Cancelled
Original poster
Mar 27, 2009
1,541
32
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.
 

Saladinos

macrumors 68000
Feb 26, 2008
1,845
4
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

macrumors 601
Feb 9, 2011
4,974
68
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

macrumors 603
Jun 7, 2011
5,997
1,101
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

macrumors 601
Sep 26, 2006
4,305
268
Sarcasmville.
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

macrumors 603
Jun 7, 2011
5,997
1,101
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

Cancelled
Original poster
Mar 27, 2009
1,541
32
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.