You are reading a single comment by @HughB and its replies. Click here to read the full conversation.
  • Thanks, here are the results for those files. First the current algorithm with threshold 17:

    X_STEPS = 6, RAW_THRESHOLD = 17
    File, Expected, Simulated, Diff, %, (Original)
    mrploppy_train1.csv, 0, 20, 20, 0.00 %, (61)
    mrploppy_train2.csv, 0, 6, 6, 0.00 %, (96)
    mrploppy_walk600.csv, 600, 577, -23, 96.17 %, (577)
    mrploppy_walk500.csv, 500, 575, 75, 115.00 %, (541)
    

    and next the algorithm with the DCFilter and threshold 15:

    NSAMPLE = 12
    X_STEPS = 6, RAW_THRESHOLD = 15
    File, Expected, Simulated, Diff, %, (Original)
    mrploppy_train1.csv, 0, 29, 29, 0.00 %, (61)
    mrploppy_train2.csv, 0, 0, 0, 0.00 %, (96)
    mrploppy_walk600.csv, 600, 590, -10, 98.33 %, (577)
    mrploppy_walk500.csv, 500, 563, 63, 112.60 %, (541)
    

    It's marginal but in my view, the DCFilter helps here.

  • @jeffmer - could you attach the Espruino/libs/misc/stepcount.c file. I'd like to have a look at RAW vs DCfilter output on a graph. Also just easier to see the full context by looking at the whole code etc.

  • I have forked a copy of the test harness repository and added my copy of stepcount.c with the DCfilter. You can find the repository here.

About

Avatar for HughB @HughB started