inav icon indicating copy to clipboard operation
inav copied to clipboard

fix ist8308 compass local frame

Open RomanLut opened this issue 1 year ago • 0 comments

Inav is using right-handed cooridnate system, example is qmc5883l compass: image

IST8308 is using left-handed coordinate system:

image

Y axis should be inverted to convert from left-handed to right-handed coordinate system in driver, similar to IST8310 which uses the same left-handed coordinate system and have correct code in driver:

https://github.com/iNavFlight/inav/blob/1dc91058761816cc2427495e48f373393e62cf32/src/main/drivers/compass/compass_ist8310.c#L144

image

References: qmc5883 datasheet: http://wiki.sunfounder.cc/images/7/72/QMC5883L-Datasheet-1.0.pdf

ist8308 datasheeet: https://isentek.com/userfiles/files/IST8308Datasheet_3DMagneticSensors.pdf

ist8310 datasheet: https://intofpv.com/attachment.php?aid=8104

ist8310 Betaflight driver: https://github.com/betaflight/betaflight/blob/d1ffa46aa65d21d8a14bf1a965d97c94755b0723/src/main/drivers/compass/compass_ist8310.c#L156

Betaflight docs: https://betaflight.com/docs/wiki/guides/current/magnetometer

RomanLut avatar May 06 '24 13:05 RomanLut