Skip to content

Incorrect denominator in conversion of 16-bit signed values in readParmayMatrix #82

@jhmigueles

Description

@jhmigueles

When converting raw 16-bit signed integer readings from the accelerometer and gyroscope to g and °/s, the current implementation in readParmayMatrix() uses a fixed denominator of 32767 for all values. This does not account for the asymmetry of two's complement representation, which ranges from -32768 to +32767. As a result, negative values are slightly overestimated, introducing a systematic (very small) error.

Maximum error expected is around 0.2 m_g_ for acceleration and around 0.05 º/s for gyroscope, so it is negligible but it should be easy to fix.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions