you don't actually want the distance your foot travelled
Right, I would certainly integrate (twice) the acceleration vector, which, theoretically, should return a vector of displacement, i.e. how far (and in which direction) the foot travelled. There are at least two obstacles here.
The first one is that the vector needs to be in earth coordinats. This means updating the change of coordinates at each step, using the gyroscope. This is basically what Madgwick does, but using also acceleration and the magnetometer to correct errors which do accumulate (and pretty fast).
The second problem is that, even though the change of variables is kept fairly stable, errors do accumulate (fast again). That's what I mean by being a bit simplistic with this approach. Being theoretic discards errors, which is probably a mistake.
Since, as you mentioned, a foot movement should always have a similar shape, I would imagine that a good statistician would simply take data from a bunch of steps with known lengths, and use that to infer lengths of steps from new data. If necessary, I would create the data for myself on a track.
I would certainly get behind this statistical approach, if it works. In fact, I would be surprised if this wasn't precisely the approach taken by stryd or garmin, who do make it work, as far as I know. The only thing is that I doubt they ever published their algorithms, as this way, anyone with a cheap accelerometer could put them out of business.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Right, I would certainly integrate (twice) the acceleration vector, which, theoretically, should return a vector of displacement, i.e. how far (and in which direction) the foot travelled. There are at least two obstacles here.
The first one is that the vector needs to be in earth coordinats. This means updating the change of coordinates at each step, using the gyroscope. This is basically what Madgwick does, but using also acceleration and the magnetometer to correct errors which do accumulate (and pretty fast).
The second problem is that, even though the change of variables is kept fairly stable, errors do accumulate (fast again). That's what I mean by being a bit simplistic with this approach. Being theoretic discards errors, which is probably a mistake.
Since, as you mentioned, a foot movement should always have a similar shape, I would imagine that a good statistician would simply take data from a bunch of steps with known lengths, and use that to infer lengths of steps from new data. If necessary, I would create the data for myself on a track.
I would certainly get behind this statistical approach, if it works. In fact, I would be surprised if this wasn't precisely the approach taken by stryd or garmin, who do make it work, as far as I know. The only thing is that I doubt they ever published their algorithms, as this way, anyone with a cheap accelerometer could put them out of business.