adafruit / Adafruit_CircuitPython_LSM6DS

CircuitPython helper library for the LSM6DS family of motion sensors from ST
MIT License
25 stars 21 forks source link

gyro values return in degrees per second but CP standard is radians per second #9

Closed kevinjwalters closed 4 years ago

kevinjwalters commented 4 years ago

Based on a quick test with an Adafruit CLUE using the https://github.com/adafruit/Adafruit_CircuitPython_CLUE library which is passthru for gyro value, the gyro return appears to be in degrees per second. The code in the example (and README) also suggest this is the case in the textual description of units: https://github.com/adafruit/Adafruit_CircuitPython_LSM6DS/blob/master/examples/lsm6ds33_simpletest.py#L12

https://circuitpython.readthedocs.io/en/latest/docs/design_guide.html#sensor-properties-and-units specifies gyro as x, y, z radians per second (NB: inconsistent with orientation specification; CP is consistent with C/Arduino spec here for these two values, see https://learn.adafruit.com/using-the-adafruit-unified-sensor-driver/how-does-it-work#standardised-si-units-for-sensor-data-2-2)

Worth independent verification via datasheet or empircally before changing anything here...

ladyada commented 4 years ago

could be! @siddacious ya can take a look next week

kevinjwalters commented 4 years ago

BTW, you can dangle a board by its USB lead and twist that to get approximately 60 rpm as a crude measurement test if you don't have a spinnable platform to hand.

kevinjwalters commented 4 years ago

Similar issue over on https://github.com/adafruit/Adafruit_BNO055/issues/50 but perhaps that can't be changed because too much code + users would be affected.

siddacious commented 4 years ago

sorry for the ate reply but yes, I can confirm that we're reporting dps not rads. I'll put in a fix and do a major release since the API is changing despite it also being a fix