mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-25 00:30:50 +08:00
fix(qmc5883p): scale for the +-2 G range is 15000 LSB/G (#29301)
The driver selects RNG = 11 (+-2 G) and checks it, but scaled the data by 1/12000, so every field reading was 1.25x too large (measured 1.252x the world magnetic model), which also triggers the strong magnetic interference preflight check. The QST datasheet (13-52-19 Rev A) gives 15000 LSB/G for the +-2 G range. Existing compass calibrations must be redone after this change: the stored offsets are in the old units. Assisted-by: Claude:claude-opus-5-5
This commit is contained in:
1 parent
809e00b439
commit
ebf8b69c66
1 file changed
+1
-1
@@ -261,7 +261,7 @@ bool QMC5883P::Configure()
|
||||
}
|
||||
}
|
||||
|
||||
_px4_mag.set_scale(1.f / 12000.f); // 12000 LSB/Gauss (Field Range = ±2G)
|
||||
_px4_mag.set_scale(1.f / 15000.f); // 15000 LSB/Gauss (Field Range = ±2G)
|
||||
_px4_mag.set_range(2.f);
|
||||
|
||||
return success;
|
||||
|
||||
Reference in new issue
Block a user