-
• #227
Yes, master branch and there is a local copy of
stepcount.c
in the repository. -
• #229
I have had both bangles on 2v11.53 for a few hours now (mostly sitting at desk) and the step counters are still different.
b77 has counted 167 steps, while b87 counted 667. So a bit closer together than before.jeffmers test harness and stepcount.c yielded:
X_STEPS = 6, RAW_THRESHOLD = 15 File, Expected, Simulated, Diff, %, (Original) halemmerich-walking-2-b77-2v11.csv, 150, 79, -71, 52.67 %, (156) halemmerich-walking-2-b87-2v11.csv, 150, 89, -61, 59.33 %, (151) halemmerich-stationary-1-b77-2v11.csv, 0, 0, 0, 0.00 %, (1) halemmerich-stationary-1-b87-2v11.csv, 0, 0, 0, 0.00 %, (10)
I have had play with the RAW_THRESHOLD and got down to 7 before the results were reasonable.
X_STEPS = 6, RAW_THRESHOLD = 7 File, Expected, Simulated, Diff, %, (Original) halemmerich-walking-2-b77-2v11.csv, 150, 150, 0, 100.00 %, (156) halemmerich-walking-2-b87-2v11.csv, 150, 143, -7, 95.33 %, (151) halemmerich-stationary-1-b77-2v11.csv, 0, 0, 0, 0.00 %, (1) halemmerich-stationary-1-b87-2v11.csv, 0, 12, 12, 0.00 %, (10)
I also tried walking 150 steps. b77 counted 80 steps and b87 counted 103.
-
• #230
I really dont recommend using very small step samples. This is the mistake the oxford step counter team made. I would recommend walking at least 1 mile. would it be possible to show the result of HughB-walk-a10021-b10248.csv so there is a known quantity to compare against.
-
• #231
X_STEPS = 6, RAW_THRESHOLD = 7 File, Expected, Simulated, Diff, %, (Original) HughB-walk-a10021-b10248.csv, 10021, 12672, 2651, 126.45 %, (12222)
So that creates too many step counts with this low threshold.
I will try to get a longer dataset. Is there a possibility that one threshold will not cut it for all the bangles because of sensor/electronics variation? -
• #233
Is there a possibility that one threshold will not cut it for all the bangles because of
sensor/electronics variation?This is what we are trying to understand. How much variation there is between accelerometers in one device compared to the next. However the point of @jeffmer's dc filter is to correct those differences to produce a balanced signal.
-
• #234
That’s a very nice demonstration of it in action. I have now dispensed with calibration as the results I get using the filter are exactly the same as I got with calibrating the accelerometer. I am using a threshold of 15 which gives accurate walking while reducing the count from other activities.
-
• #235
There's not much in it either way between 14 or 15.
$ ./main github.com/gfwilliams/step-count ---------------------------------- X_STEPS = 6, RAW_THRESHOLD = 14 File, Expected, Simulated, Diff, %, (Orignal) HughB-walk-6605.csv, 6605, 6135, -470, 92.88 %, (3223) HughB-walk-2350.csv, 2350, 2188, -162, 93.11 %, (1042) HughB-walk-a3070-b3046.csv, 3070, 2913, -157, 94.89 %, (1909) HughB-walk-a10021-b10248.csv, 10021, 10220, 199, 101.99 %, (12222) HughB-drive-36min-0.csv, 0, 53, 53, 0.00 %, (1199) HughB-drive-29min-0.csv, 0, 60, 60, 0.00 %, (1153) HughB-drive-a3-b136.csv, 3, 75, 72, 2500.00 %, (535) HughB-work-66.csv, 66, 81, 15, 122.73 %, (980) HughB-mixed-390.csv, 390, 465, 75, 119.23 %, (1871) HughB-general-a260-b573.csv, 260, 444, 184, 170.77 %, (3854) HughB-housework-a958-b2658.csv, 958, 2078, 1120, 216.91 %, (5762) log.csv, 60, 0, -60, 0.00 %, (1) TOTAL DIFFERENCE 2846
$ make gcc -std=c99 main.c -I . -o main $ ./main github.com/gfwilliams/step-count ---------------------------------- X_STEPS = 6, RAW_THRESHOLD = 15 File, Expected, Simulated, Diff, %, (Orignal) HughB-walk-6605.csv, 6605, 6054, -551, 91.66 %, (3223) HughB-walk-2350.csv, 2350, 2164, -186, 92.09 %, (1042) HughB-walk-a3070-b3046.csv, 3070, 2858, -212, 93.09 %, (1909) HughB-walk-a10021-b10248.csv, 10021, 9903, -118, 98.82 %, (12222) HughB-drive-36min-0.csv, 0, 45, 45, 0.00 %, (1199) HughB-drive-29min-0.csv, 0, 58, 58, 0.00 %, (1153) HughB-drive-a3-b136.csv, 3, 67, 64, 2233.33 %, (535) HughB-work-66.csv, 66, 65, -1, 98.48 %, (980) HughB-mixed-390.csv, 390, 407, 17, 104.36 %, (1871) HughB-general-a260-b573.csv, 260, 400, 140, 153.85 %, (3854) HughB-housework-a958-b2658.csv, 958, 1825, 867, 190.50 %, (5762) log.csv, 60, 0, -60, 0.00 %, (1) TOTAL DIFFERENCE 2430
I reckon you should push the DC filter into the main branch with RAW_THRESHOLD=15.
Hats off to you @jeffmer with that little bit of code. Very elegant and simple.
-
• #236
Will try the same with 2v11.53 on both this evening and run jeffmers harness.
You need the latest Espruino, and replace Espruino/libs/misc/stepcount.c with
https://raw.githubusercontent.com/jeffmer/step-count/master/stepcount.c
Then run the test harness. -
• #237
I have submitted a PR to add the DC Filter and set threshold 15 as you suggest.
-
• #238
After a longer walk today, the counters on both my bangles are nearly perfectly in sync, 6165 (b77) vs. 6154 (b87).
Running jeffmers harness with threshold 15 results in 6145 (b77) and 6159 (b87).
-
• #239
Just merged - thanks! lets hope that helps out :)
-
• #240
Tried the new Firmware Updater App - seemed to work a treat. I'm now on 2.11.70 so will see if I notice any issues.
-
• #241
I'm trying to do some proper testing (with accel logs) today. So far it looks like 2v11.70 with the DC filter and threshold 15 is quite accurate for walking (counted 1000 steps during a short walk and the Bangle registered 971, while the Fitbit registered 980), but overcounts the steps when just being around the house (haven't saved any logs for that yet, too busy getting the little one ready for school, but during a little over an hour of just getting ready for the day the Fitbit registered 608 steps while the Bangle did 872).
Will update with results (and logs) later.
-
• #242
This morning, for the first time, I have done no steps overnight instead of the 3000 I'm normally told I've done.
I've done my morning walk and the Bangle says 8115 steps and my phone says 8306.
No phantom steps while typing or because I'm holding my wrist wrong.
This is a brilliant result and I'm hugely grateful to everybody that has contributed to this.
Thanks again.
I'm a happy Chas
-
• #243
Brilliant, could you confirm that this is on 2.11.70.
-
• #244
Hi @johan_m_o, some measured accelerometer logs against a fit bit would be great. If you could do ones a 1,2,3 miles that would be great. Also good to record what the Bangle counted by noting start and end counts. If you attach the logs here I will check them in.
Ref over counting, that is the key challenge. Its a very fine balance between stopping counts during driving, typing and washing up and accurately starting to count when walking. All step counters over count on non step activities to some extent, even Fitbit and Amizfit count steps while sleeping, some more than others, it's a question of how much.
The latest change, hats off to @jeffmer has resolved the bias issue between different accelerometers. There will continue be more work to do on the step counter until someone comes up with a new approach that smashes our current results.
-
• #245
I was on 2.11.67 which was the bleeding edge when I went to bed last night.
I've upgraded to 2.11.70 this morning.
Charlie
-
• #246
Hi @johan_m_o, some measured accelerometer logs against a fit bit would be great. If you could do ones a 1,2,3 miles that would be great. Also good to record what the Bangle counted by noting start and end counts. If you attach the logs here I will check them in.
Yeah, I'm gonna walk down to the store in moment (about 1.4 km one way). Meanwhile I've been sitting at the computer (not much typing, mostly research) for just over 2 hours (about 125 minutes) and the Fitbit registered 5 steps while the Bangle registered 46. I did actually have the accelerometer logger running (wasn't expecting to sit that long and then I forgot about the logging being active), but the file is too big for me to pull of the watch... The Web IDE just times out while trying to save it.
Edit: change of plans... No more time for a walk. Something happened to my watch when trying to pull that large file from it through the Web IDE. All of a sudden I was experiencing severe lag and the watch would lock up. After a full reset it seems better (no lockups), but the "A Configurable Analog Clock" still only updates the seconds hand every 2-3 seconds. I'm pretty sure it properly updated every second before... Although, it's not affecting Anton Clock, so it might be an ACAC thing.
-
• #247
Since my plans for more testing got somewhat stumped and cut short for the day (see above), I'll just attach the accelerator log from my 1000 counted steps walk (so about 1 km), in case anyone's interested. The Bangle registered 971 of those 1000 steps.
1 Attachment
-
• #248
Nice. 97% not bad.
-
• #249
Hello,
thank you guys for your work!This is my experience with latest firmware:
- I noticed almost zero fake-steps while working (I'm a developer so I sit in front of the pc all day) - GOOD!
- An hour ago I took a short walk (~ 2Km) on my treadmill. In the first two minutes I counted ~90 steps/min but my Bangle2 only showed ~30 steps/min (speed set to 4Km/h) The next two minutes I set speed to 6Km/h and I counted ~115 steps/min but the Bangle2 showed ~95 steps/min. I didn't count the rest of the walk because I lost count but I noticed that the accuracy increases as speed increases. Has anyone else noticed the same thing?
I just installed the logger, next time I'll try to record the walk
ps: English is not my mother tongue, sorry for mistakes
- I noticed almost zero fake-steps while working (I'm a developer so I sit in front of the pc all day) - GOOD!
-
• #250
Thanks for that. We really need measurements against another device like a 'fibit' or 'amazfit bip'. Watching a step counter while walking and manually counting steps is very hard. It also skews the accelerometer readings because the watch is not always in the usual walking orientation with respect to your body etc, arms slightly swinging by your side etc.
Two bangles, both on 2v11, so I assume old threshold.
Will try the same with 2v11.53 on both this evening and run jeffmers harness. Branch to use is master?
b77 was a lot better than b87, especially while both were stationary. b87 was extremely noisy between 80-180ms, 200-280ms, 450-510ms. I do not know why.