Here's the baseline results through the test harness.
we can see 102% (+2%) accuracy on the 10K step log.
But 277.97 % (+177% over) on the housework log.
Now it is possible to improve the housework log to +32% over by increasing the thresholds.
BUT this is at huge cost to the overall accuracy when actually walking.
I would not be happy with only 85% accuracy over a 10,000 step walk. Needs to be 98-102%.
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.
Here's the baseline results through the test harness.
we can see 102% (+2%) accuracy on the 10K step log.
But 277.97 % (+177% over) on the housework log.
X_STEPS = 6, RAW_THRESHOLD = 14
File, Expected, Simulated, Diff, %, (Orignal)
HughB-walk-6605.csv, 6605, 6397, -208, 96.85 %, (3223)
HughB-walk-2350.csv, 2350, 2243, -107, 95.45 %, (1042)
HughB-walk-a3070-b3046.csv, 3070, 3013, -57, 98.14 %, (1909)
HughB-walk-a10021-b10248.csv, 10021, 10253, 232, 102.32 %, (12222)
HughB-drive-36min-0.csv, 0, 160, 160, 0.00 %, (1199)
HughB-drive-29min-0.csv, 0, 192, 192, 0.00 %, (1153)
HughB-drive-a3-b136.csv, 3, 124, 121, 4133.33 %, (535)
HughB-work-66.csv, 66, 97, 31, 146.97 %, (980)
HughB-work-66.csv, 66, 97, 31, 146.97 %, (980)
HughB-mixed-390.csv, 390, 541, 151, 138.72 %, (1871)
HughB-general-a260-b573.csv, 260, 578, 318, 222.31 %, (3854)
HughB-housework-a958-b2658.csv, 958, 2663, 1705, 277.97 %, (5762)
TOTAL DIFFERENCE 4013
Now it is possible to improve the housework log to +32% over by increasing the thresholds.
BUT this is at huge cost to the overall accuracy when actually walking.
I would not be happy with only 85% accuracy over a 10,000 step walk. Needs to be 98-102%.
X_STEPS = 8, RAW_THRESHOLD = 17
File, Expected, Simulated, Diff, %, (Orignal)
HughB-walk-6605.csv, 6605, 6012, -593, 91.02 %, (3223)
HughB-walk-2350.csv, 2350, 2198, -152, 93.53 %, (1042)
HughB-walk-a3070-b3046.csv, 3070, 2891, -179, 94.17 %, (1909)
HughB-walk-a10021-b10248.csv, 10021, 8542, -1479, 85.24 %, (12222)
HughB-drive-36min-0.csv, 0, 13, 13, 0.00 %, (1199)
HughB-drive-29min-0.csv, 0, 46, 46, 0.00 %, (1153)
HughB-drive-a3-b136.csv, 3, 52, 49, 1733.33 %, (535)
HughB-work-66.csv, 66, 56, -10, 84.85 %, (980)
HughB-work-66.csv, 66, 56, -10, 84.85 %, (980)
HughB-mixed-390.csv, 390, 356, -34, 91.28 %, (1871)
HughB-general-a260-b573.csv, 260, 226, -34, 86.92 %, (3854)
HughB-housework-a958-b2658.csv, 958, 1266, 308, 132.15 %, (5762)
TOTAL DIFFERENCE 3671
So I think without a radical rethink this is the limit of what can be acheived with this algorithm.