Accurate running speed - gps v footpod #6922
Replies: 1 comment
-
Posted at 2024-05-20 by @gfwilliams Hi! It's worth checking the Bangle had a minute or two to get enough GPS satellites for tracking - if you turn it on and start running immediately, the first few minutes it won't have many satellites, and as it gets more and gets more accurate the position it reports will fluctuate.
Yes, absolutely. You just need the
You could for instance store the last 10 GPS values (which occur every second) and then divide the distance between the current position and the one 10 seconds ago by the timestamp between them... Or either average the 10 instantaneous 'speed' values or do a median filter? There is something called 'kalman filter' that can be used to filter GPS coordinates/speed, and there was a running app that did use it for a while but unfortunately it got broken and wasn't maintained so it's not there any more - but if someone could figure out a way to re-add the code, it might be a really cool addition. If you seriously want to dig into this, it might be worth setting the recorder to record at 1s intervals (in which case it'll record everything), and then you could go back over it on your PC and see if different algorithms provide better values.
I think @FTeacher may have been asking about this before, but I'm not sure anything came of it. I think for some of these they basically just stream the accelerometer data to a phone and get the phone to do the analysis, so it may not work to connect them to a Bangle.
In terms of accuracy it'll be fine - it's probably got the same exact sensor as the Sryd. It's just what you do with that data that matters :) For instance if the Puck is worn on your ankle then it might twist slightly as you start and stop, the stride, which will mess with the readings - and to work around that you'd have to do proper sensor fusion to use the gyro to also work out its angle so it can apply the acceleration in the right direction - and things get a lot more tricky. If you can be reasonably sure the sensor is only accelerating and de-accelerating in the same direction each time (which is perpendicular to the earth so you don't have to worry about gravity) then it shouldn't be too hard though. Potentially even if it isn't 100% accurate, when calibrated against your actual speed from GPS when you're going at a steady speed, it could allow you to get far more responsive values. If all you care about is the accelerometer, you could actually just use your Bangle on your foot as well :) Although I admit that's not idea for also allowing you to look at speed. Posted at 2024-05-20 by Ivor I used running footpods from the days before 😱 wrist based gps and have spent way too long thinking about the subject and looking into it on various projects. The other problem with the GPS data was the "wobble" this has improved considerably in recent years with the different multi-band chipsets and the overall improvements in accuracy and consistency but can still be an issue where if you're measuring "second to second" whilst you'll get a smooth trace the actual points are actually slightly off by a small amount each second, so for the overall trace it's fine and smooth, but if you actually take the instant data and use that to calculate pace then it jumps back and forth due to the small distances on the calculations. The lag is something you definitely notice on a Garmin (without footpod) so I agree re footpods giving more accurate speed data, I've always used them for instant pace data or sprint data, so yes I reckon you definitely could get a puck to calculate this. Posted at 2024-05-21 by jeansnorth Thanks for the responses. I decied to go for a Polar H10, actually got in with a discount for some reason. It arrived just now, and I can confirm that When the puckjs arrive, I'll see if I can get it to trace out my steps to measure speed and distance, it would be super cool.
I always wait for the "GPS" in the lower left corner of the
Uh-oh, I do know some mathematics, but not so much statistics. I might dive into this to see if I can make it work, but I won't promise anything soon. But thanks for the tip, I'll see if I get anywhere.
Do you think the banglejs is powerful enough for this sort of analysis? As a pure mathematician, I don't have a good sense for how much computation power is enough. My sense is that, theoretically, I should be able to use acceleration and gyro data to draw the curve of my foot for each step, using calculus. But wheather the watch (or puckjs) can do the computation in real time, I have no idea.
I can absolutely believe that :D
I used to use a casio with a stopwatch back in the day. I would prepare and memorize an 8k/10k/14k route on google maps, and then write down my time in a little book :D But yes, basically any footpod would do, but it seems to me that some of them use ant+, and not bluetooth. Banglejs doesn't support ant+, does it? A quick look at the webpages of some of the companies that sell footpods indicate that they only work with their watches. Even if it is maybe possible to get it to work with other devices, I would hesitate to buy one, if I don't know whether it will give any useful data. But it seems to me that for such a device, there would be two distinct categories. One which calculates speed (as well as cadence, etc), and then sends that data over. It seems to me that this is what stryd does. The other category would be a device which send over accelerometer data, and then the receiving device is left in charge of computing the data to be displayed and logged. It seems to me that some of the garmin devices are in this category. The former category would certainly be a nice, quick and easy solution. Even if it wasn't open source, having a black box that gives you this data would be great tool. If the puckjs can be programmed to serve such a function, this would be the best. As for the second category, if it works, it would also be great. But if I have to program the banglejs, then I would see no reason not to use a puckjs, as long as it is accurate. One of the difficulties seems to be simply distinguishing these cases, since the promotional material from any company just says it works well with their watch, and you're left guessing.
This makes a lot of sense, but I am surprised to mostly see banglejs underreport speed compared to garmin. If the points are jumping to the left or right, it should think it was going faster. I think this actually happened at some point when I was going under a bridge, but only for a moment. Any code would be welcomed, to say the least. I hope I can put a bit of work into this project, and get at least an accurate cadence. It might take some time though. Speaking of cadence, I'll just mention one last thing. On the wrist, banglejs gives a much lower value than the garmin, and I'm pretty sure the garmin is correct, since I used to actually follow a metronome function on the garmin, to get 180 steps per minute. Also, that data is coming from the garmin run dynamics pod, which clips on the waist, and should be pretty accurate. Unfortunatly, though, it is only ant+ (I think). Posted at 2024-05-22 by @gfwilliams
We report the speed we get from the GPS chip. Inside the chip there's all kinds of insane maths going on so I'm not really sure what happens there, but it's likely a lot more convoluted than just taking the distance between the last and current points :)
This was the typescript code for the Kalman filter: https://github.com/espruino/BangleApps/blob/2e8b9ac2cbd0ea70248bbd2ece53ae37203eab7e/apps/banglerun/src/gps.ts#L94 However I'm not entirely sure how well it worked, or whether it worked at all in that snapshot. It could be a good starting point. My vague memory was it depended on the
Totally depends on the analysis - if you're looking at doing something simple at 20Hz then totally (and depending on the code you can JIT things or even use C code to get them running faster). If you're doing a bunch of matrix math then it could get tricky though |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2024-05-18 by jeansnorth
Hi,
I recently got a banglejs2 (love it, btw), and I am in the process of replacing my garmin fr245 with it, specifically for running. My main question is about feasability of getting accurate running speed, but I'll give some context.
I have now been using both watches for a couple of week on all my runs. I have found that the gps and heartrate monitor are not as accurate on the bangle as on the garmin, which I guess is no surprie, given garmin's reputation, and the price difference. When comparing gpx tracks on the laptop using a map, the bangle gives a route more or less conforming to the one I did, but the garmin route seems to conform much better.
On one hand, the heart rate monitor seems to give very inaccurate values. I should be able to connect a polar h10 chest strap to the bangle without problem, right? As far as I can tell, people have already done this, and this should give better accuracy than any wrist based optical heart rate monitor.
On the other hand, I would be super happy to have an accurate reading of speed when running. Although the bangle and garmin give me more or less the same reading on total distance, the number that bangle gives me during the run seems to be pretty inconsistent. Although I have no clear way of measuring this at the moment, it seems to me that the speed is often underreported, and occasionally overreported. This is in comparison with the garmin, but also supported by my "feeling" when looking at the two numbers (which is weak as evidence, but ok). I have tried configuring the recorder app to use 10, 3 and 1 second intervals, but the resuls are similar.
Idea 1: Is there any software solution to get a speed on the gps that fluctuates less? In principle, running in a mostly straight line should probably give an accurate reading on speed, even if the points are shifted. I'll admit that I have no idea about that, but it's worth asking.
Idea 2: There is a company out there, called stryd, which makes footpods specifically designed to measure a host of running data, and as far as I know, it is very accurate (but expensive). I might post something on their formus to see what they say, but does anyone know if it is possible to connect a stryd to a banglejs2, and in that case, what data could be logged down on the watch? For me, speed would be top concern, but I have been logging down cadence and ground contact time on my garmin (using a garmin running dynamics pod) and continuing that would be great. Their webpage has a list of "compatible" devices, and it does include many brands, but it doesn't mention being able to connect to some device and spit data at it. I'd love to try it and see what happens, but these devices are expensive.
Idea 3: The most fun project would be to replicate the functionality of commercially available footpods using a puckjs (or any other accelerometer). In principle, I understand that intergrating acceleration gives speed, and then distance. But I have no engineering experience, so I have no clue about noise and errors. So the question is, basically:
Is a puckjs accurate enough to measure the length of a step while running?
Does anyone have experience with a project like this?
Would it involve programming more complicated than summing up the stream of numbers to integrate?
Out there, footpods are reported to give a much more responsive reading of speed than gps. People swear by it, especially for sprints. Therefore, this could be a fantastic project. I currently don't have a puckjs, but I should probably get one, even if just to play with, since one stryd (mentioned in the previous question) is about ten puckjs, in terms of money.
Beta Was this translation helpful? Give feedback.
All reactions