rotorflight / rotorflight-firmware

GNU General Public License v3.0
88 stars 42 forks source link

Add heading configuration option and magnetometer/compass telemetry #115

Open blopa1961 opened 6 months ago

blopa1961 commented 6 months ago

The Matek M10Q-5883 connected to the G747-HELI provides both GPS and magnetometer/compass (via the QMC5883L). The problem is that once the magnetometer is enabled (yes, it works!) it interferes with the G474's onboard gyros because Rotorflight takes the readings from both sensors and mixes them, which results in a total loss of heading. For this reason, it is now necessary to add an option to select from where the heading reading comes from, either the G474's gyros or the QMC5883L compass, but not both. Also, there's no option for magnetometer/compass telemetry in Rotorflight Configurator's receiver menu, only "heading" from the gyro (or maybe the mixed values). A new receiver telemetry item with FrSky's telemetry ID 0x084F could be added. I know I repeated this issue in rotorflight-configurator, but obviously both configurator and firmware need to be updated for this to work.

rotorflight commented 5 months ago

The magnetometer should improve the heading precision, certainly not mess up with it. Probably your compass configuration / orientation is incorrect, or it is not calibrated correctly.

The telemetry is another thing totally. It depends on the Tx system if it support passing compass heading.

blopa1961 commented 5 months ago

Ok. I'l try to calibrate the magnetometer. About the telemetry, I have 2 FrSky radios; both support compass telemetry, for which the expected sensor ID is 0x084F.

There's no Compass option in Rotorflight Configurator (2.0.0). Compass

Is "heading" the correct option? iNav LUA's compass does not work in my current config, maybe I'm doing something wrong...