The acceleration from the watches are calibrated by the manufacturer but there can be drift in the calibration. Recalibration is done to ensure that under periods of perceived no motion the sensors are experiencing exactly 1g of acceleration.
The calibration error is defined by the distance a specific acceleration measurement is from the unit sphere (that corresponds to a total of 1g acceleration across the 3 sensor). A scaling and offset is applied to each axis sensor to minimize this error. The scaling and offset parameters are found by using a closest point fitting method. The scaling and offset parameters are then applied to the original acceleration measurement to obtain the calibrated acceleration Measurement. A complete description of the method is described here.
The function returns the calibration error at the start and end of the calibration procedure, the calibration scaling and offset factors, and the calibrated acceleration.
Tasks
[ ] A file wristpy/processing/calibration.py is created.
[ ] A class is built called AccelerationCalibration with four methods:
[ ] An init method, taking the settings i.e. chunked or full method.
[ ] A calibrate method that takes the input array and runs the calibration computation.
[ ] Bonus points: implement as class method.
[ ] A chunked method that takes the input array and performs the GGIR chunking around _calibrate.
[ ] Bonus points: implement as class method.
[ ] A run method that, based on the initialization, takes the input array and runs the correct calibration.
Description
The acceleration from the watches are calibrated by the manufacturer but there can be drift in the calibration. Recalibration is done to ensure that under periods of perceived no motion the sensors are experiencing exactly 1g of acceleration.
The calibration error is defined by the distance a specific acceleration measurement is from the unit sphere (that corresponds to a total of 1g acceleration across the 3 sensor). A scaling and offset is applied to each axis sensor to minimize this error. The scaling and offset parameters are found by using a closest point fitting method. The scaling and offset parameters are then applied to the original acceleration measurement to obtain the calibrated acceleration Measurement. A complete description of the method is described here.
The function returns the calibration error at the start and end of the calibration procedure, the calibration scaling and offset factors, and the calibrated acceleration.
Tasks
wristpy/processing/calibration.py
is created.Freeform Notes
No response