Hacker News new | ask | show | jobs
by voodoomagicman 4180 days ago
I have tried this as well - it was definitely not as simple as taking the double integral.

In my experience moving and the stopping the phone would always end up with the two accelerations not exactly canceling out so that the calculated position would drift away from the true position at a constant rate.

Even applying a floor to velocity to eliminate the drift, the distances calculated for simple linear motions were consistently off by ~50% in either direction.

This was a few years ago so sensors may have improved - have you actually done this in practice and found it to work?

5 comments

I have tried this as well - it was definitely not as simple as taking the double integral.

Right. RoomScan requires you to stop and touch the device to the wall frequently. This allows them to re-zero the velocity. Small IC accelerometers and gyros aren't good enough for dead-reckoning over any substantial distance.

What you really want is 3D SLAM, using the cameras. That's been done on Apple devices, for a rather lame "Ball Invasion" game. That team was acquired by Facebook for their VR effort.

There's source code for SLAM. See "slam6d.sourceforge.net". This is the right way to do indoor localization. The better robot vacuums (Neato and Dyson) use it.

You could play substantial DSP style filtering games such that your average human walks at a very constant speed and is mostly either standing perfectly still or walking at a constant speed. So your non-moving data points are rounded to zero and generate an error signal, and your moving datapoints can be average together to a constant generating an error signal, and the error signals can be shared between the two data sets and analyzed and averaged. Also all data has a resultant spectrum when you ram it thru a FFT, and I'm guessing the data spectrum looks a lot different than a noise spectrum enabling all kinds of fun filtering. Further I'm guessing a FFT analysis will show peaks at stride rate, and variations in stride rate will predictably vary velocity.

My first guess was pure optical, an inside out 3-d scanner basically. OK, image analysis shows there's corners and walls, and the building code requires all doorknobs to be at exactly X inches off the floor, countertops Y off the floor, stairs of certain rise/run combos, and the room dimensions WILL round to closest integer inch so you do some curve fitting and the highest correlation dimensions win. Especially when in the article he described it as placing the phone against all the walls. A simple inertial nav system wouldn't care if you held the phone at an angle or upside down, but optical needs flatness. You'd be making one of those 360 degree panorama pix, kind of, then analyzing it.

Maybe I should be creating a 2 zillion pound startup instead of posting to HN?

Half a zillion idea: use sound echolocation principles.

Edit: http://www.gsmnation.com/blog/2013/06/19/echolocation-app-le...

"This was a few years ago so sensors may have improved"

Apparently they're much better than previously. When I first tried this around 3 years ago, I had the same problems you did. The errors get cubed by the double integration. Software Kalman filters and other tricks didn't really help.

A lot of the newer sensor chips now do "sensor fusion"[1] on the chip itself, which means that the raw data is much more useful, and requires almost no post-processing.

I assume that this, in combination with higher sampling rates, means that the errors are small enough for the output to be useful over "human interaction" scale.

[1]: http://en.wikipedia.org/wiki/Sensor_fusion

Examples:

http://www.kionix.com/sensor-fusion

http://www.invensense.com/mems/technology.html

http://www.st.com/web/en/catalog/sense_power/FM89?sc=mems

Maybe add beeps and use them like a sonar to refine distance measurement?
5m room size / speed of sound in air = around 15ms. Unless the amount of variation in latency in the phone's speaker + microphones is much less than that -- which I suspect it isn't -- that wouldn't be particularly accurate either. (Even that aside, it's going to be rather non-trivial to get anything useful at all with a non-directional speaker in an enclosed room with several other walls, ceiling, floor, and other objects).
If you can record and identify the sound as you emit it and can identify the echo you shouldn't need to worry about jitter in output just the sampling frequency and any jitter there.

I think you are right about the likely cluttered response in a realistic room being hard to analyse into something useful.

> off by ~50%

You should get different results on different phones, but I don't think it would ever be reasonably precise on any one device.