The AccelerometerCalibrationSet command is used to set a new accelerometer calibration position. This follows the classic 6-position calibration method for accelerometers, where the device has to be placed in 6 stationary positions with ideal accelerometer readings at (1g, 0, 0), (-1g, 0, 0), (0, 1g, 0), (0, -1g, 0), (0, 0, 1g), and (0, 0, -1g). Every time the device is placed in one of these positions, this command can be issued to capture the raw accelerometer data in that particular position. When all 6 positions (commands) are set, the device will perform a least-squares-fit algorithm to compute a 3x3 calibration matrix for accelerometer readings. Note that if at least one position has not been captured, the calibration will not be effective. Furthermore, it is possible to overwrite to the existing calibration positions by simplying resending this command when the device is placed in a correct position. The device has to be stationary when this command is issued, otherwise, the command will be rejected by Neblina, and an error packet will be responded to the host.
This command uses the Command-Ack protocol.
|0||Control Byte ( Packet Type (7:5) / SubSystem (4:0) )||uint8_t||0x41 ( 0b010 / 0b00001 )|
This command contains no payload.