Search code examples
iosweb-applicationsnavigationaccelerometer

iOS Accelerometer and Spacial Navigation?


I'm trying to build a web app specifically for iOS that relies on accelerometer data for navigation. (A site that you could theoretically move through (from page to page) spatially.)

For example, taking a step (or moving the device) forward would take you to one web page or URL, and left, right, or backwards would take to their own unique URLs. Any ideas on how to make this happen?


Solution

  • I spent quite a lot of time looking in to this for an experiment I was writing.

    The trouble is that it is very hard/impossible to get an accurate (or even approximate) location in space from your device.

    The trouble is that the device measures acceleration which needs a couple of calculations to get down to position.

    You can use this value to measure location relative to a start point but the next problem is the noise that the accelerometer receives.

    The closest I could get to getting it working was to smooth out the noise of the accelerometer and then calculate back to try and determine location. But due to the noise I found that the device would constantly think it was moving in one direction.

    After a number of days of trying different methods I determined that it really isn't possible without external tracking of the device.

    What you can do is use the orientation of the device to navigate. i.e. tilt forwards, tilt backwards, tilt left, tilt right do do different things.