- C compiler
- Cmake
cd build
cmake ../
cmake --build .
./banglejs-algos-tester
The executable assumes that data files are in ../data/
. It outputs a comma-separated table like the following:
steps-controlled, dummy, 100_5.csv, 100, 100
steps-controlled, oxford, 100_5.csv, 1790, 100
steps-uncontrolled, dummy, 3058.csv, 100, 3058
steps-uncontrolled, oxford, 3058.csv, 3301, 3058
the first column is the type of data, the second is the name of the algorithm, the third is the name of the file, the fourth is the step count detected by the algorithm and the last column is the reference.
You can easily import this table into Excel to do run your statistics for example by calling ./banglejs-algos-tester > algos.csv
.
There are 2 datasets for step counting:
- controlled: usually short and taken with a reliable reference like manual counting
- uncontrolled: usually longer and with a less reliable reference, like another step counter
each file name must start with the reference step counter value. For example 125_test.csv means that the reference step value count is 125.
To test new datasets just drop a file with the correct name and format in one of the two folders.
There are currently 3 algorithms: dummy
, which always returns 100, espruino
, the official algorithm inclued in the Espruino firmware and oxford-step-count
, which is based on this.
To add a new algorithm:
- place the source code inside the stepcounters folder, possibly in a subfolder
- modify stepcounters.c to add calls to the new algorithm
- recompile and run