AHRS
Dependencies: Eigen
Revision 30:9b0cd3caf0ec, committed 2020-01-27
- Comitter:
- pmic
- Date:
- Mon Jan 27 10:54:13 2020 +0000
- Parent:
- 29:cd963a6d31c5
- Commit message:
- Correct magnetometer.
Changed in this revision
BMX055.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r cd963a6d31c5 -r 9b0cd3caf0ec BMX055.cpp --- a/BMX055.cpp Mon Jan 27 09:23:58 2020 +0000 +++ b/BMX055.cpp Mon Jan 27 10:54:13 2020 +0000 @@ -92,8 +92,8 @@ z = dt[5] << 8 | (dt[4] & 0xfe); // value has to be divided by 2 // scaling factor 1/301.5815f if experimentally validated in comparision to pes board -> approx. same scaling of mag values, pmic 21.01.2020 - magX = -(float)y / 8.0f / 301.5815f; // MAGNETOMETER x-y are switched, see BMX055 datasheet page 161, also measurements show change in sign x!!! - magY = (float)x / 8.0f / 301.5815f; // x-y is switched + magX = (float)y / 8.0f / 301.5815f; // MAGNETOMETER x-y are switched, see BMX055 datasheet page 161, also measurements show change in sign x!!! + magY = -(float)x / 8.0f / 301.5815f; // x-y is switched magZ = -(float)z / 2.0f / 301.5815f; // z is -z }