Files
PX4-Autopilot/msg/SensorMag.msg
Mahima Yoga b0b46cc9ce fix(commander): scale mag cal offset limit with sensor full-scale range (#28549)
* fix(commander): scale mag cal offset limit with sensor full-scale range

The hard 1.3 Ga offset limit assumes ~1.9 Ga full scale, so modern mags (5-49 Ga full scale) fail calibration on large hard-iron offsets they can measure without saturating.

Drivers now report their range in sensor_mag and the limit becomes range minus
0.65 Ga worst-case earth field, keeping the 1.3 Ga fallback when the
range is unknown.

* fix(drivers): correct ADIS16448 and AK8963 mag ranges

* refactor(sensors): address review comments

- kConstant cal limits
- uT conversion helper
2026-09-09 09:59:30 +02:00

18 lines
714 B
Plaintext

uint64 timestamp # time since system start (microseconds)
uint64 timestamp_sample
uint32 device_id # unique device ID for the sensor that does not change between power cycles
bool is_external # true if the sensor is not mounted on the flight controller board itself
float32 x # [Gauss] magnetic field in the FRD board frame X-axis
float32 y # [Gauss] magnetic field in the FRD board frame Y-axis
float32 z # [Gauss] magnetic field in the FRD board frame Z-axis
float32 temperature # [°C] Temperature.
float32 range # [Gauss] full-scale measurement range, 0 if unknown
uint32 error_count
uint8 ORB_QUEUE_LENGTH = 4