Commit fe367a5
DEV-958: use the ST datasheet accel sensitivity for the gen-2 LSM6DSV
SensorLSM6DSV derived accel sensitivity as 32768/(FS_g*9.80665), while the
firmware seed, the web SDK catalog and the driver's own gen-1 classes all use
the ST datasheet mg/LSB figure - a 0.0576% split, and the only such divergence
left in the gen-2 chain.
+-2 g 1670.703 -> 1671.665922915
+-4 g 835.3517 -> 835.832961457
+-8 g 417.6759 -> 417.916480729
+-16 g 208.8379 -> 208.958240364
Worth being explicit that the old values were not a mistake, and this is not a
correctness fix. Checked against ST's own vendored driver (lsm6dsv_reg.c):
every printed accel figure - 0.061 / 0.122 / 0.244 / 0.488 mg/LSB - is exactly
32768/FS rounded to three significant figures, because the accel really does
span the full 16-bit range at nominal full scale. So the derived form was the
more precise of the two, and moving to the datasheet figure trades a little
accuracy for agreement.
Agreement is worth more here. The firmware seeds these values into the on-device
calibration blob, so they are what the device reports and what becomes the
source of truth once per-unit calibration is honoured; keeping the exact form
would leave a 0.0576% step change in calibrated output waiting to surface on
that day. 0.0576% is far inside per-unit sensitivity variation.
The gyro is a genuinely different case and is deliberately left alone: 4.375
mdps/LSB implies a real full scale of 143.4 dps on the +-125 dps setting, which
is where the part is observed to saturate, so there a 32768/FS derivation is
wrong by ~14.7% rather than by a rounding. The comment now spells out the
distinction so the two are not "fixed" to match each other later.
API_00008 CAL locks updated (accel +-4 g literal); 51 driver tests pass.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent edc3f7d commit fe367a5
2 files changed
Lines changed: 37 additions & 13 deletions
File tree
- ShimmerDriver/src
- main/java/com/shimmerresearch/verisense/sensors
- test/java/com/shimmerresearch/verisense
Lines changed: 30 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
293 | 312 | | |
294 | 313 | | |
295 | 314 | | |
296 | | - | |
297 | | - | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
298 | 320 | | |
299 | 321 | | |
300 | 322 | | |
| |||
Lines changed: 7 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
146 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
147 | 149 | | |
148 | 150 | | |
149 | 151 | | |
150 | | - | |
151 | | - | |
152 | | - | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
153 | 155 | | |
154 | 156 | | |
155 | 157 | | |
| |||
0 commit comments