iPad accelerometer-and-compass-based GPS.

Discussion in 'iPad Apps' started by moonman239, Jun 30, 2012.

  1. moonman239 macrumors 68000

    Mar 27, 2009
    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.
  2. Gav2k macrumors G3


    Jul 24, 2009
  3. Saladinos macrumors 68000


    Feb 26, 2008
    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)
  4. takeshi74 macrumors 601

    Feb 9, 2011
    If it's accelerometer and compass based then it isn't GPS. Navigation seems to be the word you're looking for.

    ^ 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.
  5. Menneisyys2 macrumors 603

    Jun 7, 2011
    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.)
  6. sammich macrumors 601


    Sep 26, 2006
    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.
  7. Menneisyys2 macrumors 603

    Jun 7, 2011
    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.
  8. moonman239 thread starter macrumors 68000

    Mar 27, 2009
    I'm talking about the gyroscope, not the accelerometer.

Share This Page