Hacker News new | ask | show | jobs
by myself248 1239 days ago
It gets into a lot more code, but integrating the accelerometer readings to figure out where in the step you are, and correct the magnetometer readings, could work. It would have to relearn any time the phone shifted in your pocket, but that could become a continuous process while walking.

Probably easier to just put the phone in a hat, though.