Avoiding (seemingly) random STMicro Motion EC Middle Ware bearing output values when the magnetometer's X axis is at a minimum.
Hi,
(Was: "I would like to use STMicro Motion MC and EC Middle Ware as a normal compass while the "pitch" is positive 90 degrees.")
I would like to use the STMicro Motion MC and EC Middle Ware with an LSM9DS1 sensor while the "pitch" of the LSM0DS1 is positive 90 degrees. That is, instead of the normal position (where Z points up away from the Earth) I would like the user to be holding it out in from of them (such as Z now points at the user).
Currently, I see the STMicro Motion MC and EC Middle Ware gives random bearings when the LSM9DS1 is in this position (Z pointing a the user & X pointing away from the Earth). I realize this could be interpreted as the expected behavior. But given that the STMicro MC and EC Middle Ware is provided with the accelerometer data, it may also be with in reason to expect the STMicro MC and EC Middle Ware to compensate for the (or any) position the LSM9DS1 may be in.
Specifically, is there a way to enable the STMicro MC and EC Middle Ware to use the LSM9DS1 as a Compass no matter what position it is in?
If it is still unclear what I want - I suspect I can get the feature I want if I swap the Z and X data for both the LSM9DS1 accelerometer and the LSM9DS1 magnetometer before passing it to the STMicro when ever the X acceleraometer is at maximum and the Y & Z accelerometer are near zero. However, I would much prefer it if the STMicro MC and EC Middle Ware had an API where I could turn such a feature on & off.
-thanks
