ArduPilot/ardupilot

EAHRS is performing duplicate temperature compenstation

Ouverte

#25 792 ouverte le 18 déc. 2023

 (6 commentaires) (1 réaction) (0 personne assignée)C++ (15 603 forks)batch import
BUGExternalAHRSgood first issue

Métriques du dépôt

Stars
 (9 336 étoiles)
Métriques de merge PR
 (Merge moyen 26j 16h) (166 PRs mergées en 30 j)

Description

Bug report

Issue details

Certain devices exposed through EAHRS, like the MicroStrain7, supply data that is already temperature compenstated.

https://s3.amazonaws.com/files.microstrain.com/GQ7+User+Manual/external_content/dcp/Data/sensor_data/data/mip_field_sensor_scaled_mag.htm https://s3.amazonaws.com/files.microstrain.com/GQ7+User+Manual/external_content/dcp/Data/sensor_data/data/mip_field_sensor_scaled_accel.htm

When the External AHRS driver posts data to sensor libraries, they perform temperature compenstation on it again, as long as HAL_INS_TEMPERATURE_CAL_ENABLE is defined, which is based on board size.

Please describe the problem

This causes double temperature compensation, leading to incorrect values.

Proposed Solution Add bool is_temperature_compensated; to AP_ExternalARHS::ins_data_message_t, and then add the necessary hooks in AP_InertialSensor::handle_external(const AP_ExternalAHRS::ins_data_message_t &pkt) to stop doing temperature compensation if the supplied value is already temp-compensated.

See ryanf55:eahrs-precompensated-sensors for a prototype fix (WIP)

Version master 1e644d56a51806b63dcd68d5e6566ec0f10248fc

Platform [ x] All [ ] AntennaTracker [ ] Copter [ ] Plane [ ] Rover [ ] Submarine

Guide contributeur