Copter SITL: SIM AHRS rejects arming with compass disabled
Bug Report
Issue details
Copter SITL using simulator-provided attitude (AHRS_EKF_TYPE=10) rejects arming with Arm: Compass 1 not healthy when the compass is disabled, although yaw comes directly from the simulator.
To reproduce: set AHRS_EKF_TYPE=10, COMPASS_ENABLE=0, and COMPASS_USE=0; restart SITL and attempt normal arming with compass arming checks enabled.
Expected: a disabled compass should not prevent arming when SIM AHRS supplies yaw.
AP_AHRS_SIM::get_results() leaves using_noncompass_for_yaw false, causing Copter to check compass health unnecessarily. Reporting non-compass yaw resolved the rejection in local SITL testing.
Proposed fix: #34554. SIM reports non-compass yaw only when no compass is configured for yaw (AP::compass().get_num_enabled() == 0).
Related: #33394.
Version
Observed on Copter 4.7.1 (dbe792162d) and master 368dc0c428.
Platform [ ] All [ ] AntennaTracker [x] Copter [ ] Plane [ ] Rover [ ] Submarine
Airframe type
Simulated quadcopter.
Hardware type SITL with Gazebo JSON backend; no physical flight controller.
Logs n/a
Source: ArduPilot/ardupilot