|
54 | 54 | * for firmware payload design v13 and above (see |
55 | 55 | * {@code VerisenseDevice.sensorAndConfigMapsCreate()}), i.e. second-generation |
56 | 56 | * firmware, and every second-generation mounting (SR61 rev >= 5, SR68 rev |
57 | | - * >= 9) shares this frame. Offsets are zero. |
| 57 | + * >= 9) shares this frame. Note the FW/HW pairing itself is not enforced |
| 58 | + * anywhere: a first-generation board flashed with gen-2 firmware would get this |
| 59 | + * frame too. Offsets are zero. |
58 | 60 | * |
59 | 61 | * @author Mark Nolan |
60 | 62 | */ |
@@ -259,6 +261,9 @@ public static final class DatabaseConfigHandle { |
259 | 261 | // UtilCalibration applies AM^-1. Neither path is used for this sensor today; |
260 | 262 | // if gen-2 per-unit calibration is ever enabled, the loaded alignment must be |
261 | 263 | // inverted to driver form at load or calibration will be applied backwards. |
| 264 | + // The trap is bidirectional: generateCalParamByteArray() likewise writes the |
| 265 | + // driver-form AM out uninverted, so writing calibration TO a gen-2 device |
| 266 | + // would send the inverse of the applied form the firmware and console expect. |
262 | 267 | /** Applied sensor->ASM alignment for the LSM6DSV accel + gyro; det +1 (a proper rotation). */ |
263 | 268 | public static final double[][] APPLIED_ALIGNMENT_LSM6DSV_ACCEL_GYRO = {{0,1,0},{0,0,1},{1,0,0}}; |
264 | 269 | /** Applied sensor->ASM alignment for the LIS2MDL mag; its frame is left-handed, so det -1 (a reflection). */ |
@@ -297,8 +302,8 @@ public static final class DatabaseConfigHandle { |
297 | 302 | public static final double[][] SENS_GYRO_2000DPS = {{14.285714286,0,0},{0,14.285714286,0},{0,0,14.285714286}}; |
298 | 303 |
|
299 | 304 | // Mag sensitivity: taken from the LIS2MDL's own sensor class rather than |
300 | | - // re-declared here, because it is a property of the chip (1.5 mGauss/LSB, i.e. |
301 | | - // 666.67 LSB/Gauss exactly; 667 is the established Shimmer rounding) and not |
| 305 | + // re-declared here, because it is a property of the chip (1.5 mGauss/LSB = |
| 306 | + // 2000/3 = 666.67 LSB/Gauss; 667 is the established Shimmer rounding) and not |
302 | 307 | // of the LSM6DSV sensor hub the samples arrive through. 667 LSB/Gauss, matching |
303 | 308 | // the firmware calibration seed (SC_LIS2MDL_MAG_SENS), the web SDK catalog, and |
304 | 309 | // every other Shimmer magnetometer (LSM303DLHC etc. are all LSB/Gauss). |
|
0 commit comments