Closed paulhibbing closed 4 years ago
Interpolation was to blame for this, and all is resolved in v1.0.0. Previously, IMU packets were interpolated using a malformed linear approach. The revised approach is distance-weighted (but not quite IDW interpolation), per correspondence with ActiGraph.
Branch
3x-error
was created to address issues withread_gt3x
related to USB connection and gaps in the data. That investigation has now revealed that something is not right with the way SENSOR_DATA packets are parsed.gives different values from the reference standard, i.e., the data exported from ActiLife, which are found in
inst/extdata/example-IMU.csv
.For example, see
inst/extdata/example-IMU.xlsx
, particularly the highlighted data (2019-02-14 09:00:34 -- the 155th SENSOR_DATA packet). Columns A-K are the IMU.csv data (i.e., values from ActiLife), columns N-W are the correspondingread_gt3x
data, and columns Y-AH are the absolute differences between the two.A particular concern is the last value for
Gyroscope_Y
(see cells G121, S121, and AD121). Inread_gt3x
that value is coming from bytes 413965 and 413966 oflog.bin
(hex: fd45). The signed big-endian value lands at -699, and the scale factor (from SENSOR_SCHEMA packet) is 16.384, giving a final value of -42.66357, compared to -293.003558 from ActiLife.Also of note, the first sample for the highlighted packet matches exactly (ActiLife vs read_gt3x) for all variables. I'm having trouble diagnosing all of this.