Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

what's a good vector / matrix / quaternion library
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

what's a good vector / matrix / quaternion library

by skybrian on Sun Mar 08, 2020 10:36 pm

I'm using an LSM6DS33 Accel+Gyro breakout board and a Teensy, and I want to keep track of the up vector using sensor fusion, so I can then figure out acceleration other than that due to resisting gravity. I'm wondering what's a good vector math library to use for this? I see that the Adafruit_BNO055 sensor library has some basic but nice math stuff in its utility directory, but since I'm not using that sensor, it seems like a weird dependency?

Is there some other standard library for vector math in Arduino land, or maybe I should copy them from the Adafruit_BNO055 library?

skybrian
 
Posts: 6
Joined: Wed Sep 18, 2019 8:15 pm

Re: what's a good vector / matrix / quaternion library

by johnsonrl on Sun Aug 30, 2020 4:31 pm

I have the exact same question.

Looking for a python library that I can feed the data from the sensor and get orientation. Which way is up and which way is North. :p

I'm using the LSM6DS33 + LIS3MDL https://www.adafruit.com/product/4485.
Here is my sample script to read the data https://gist.github.com/rljohnsn/4cc860cfc3b93c90107a6f4ab1359040.

Now just need to know how to use the data. Probably had the same thought as you "there is no way someone has not written a library for this already"

For anyone looking for a good high level description of the math this video has a great explanation of the fusion of all three sensors. https://youtu.be/0rlvvYgmTvI

@5:07 you can even see the equations he is using. I believe he is sending this data into MATLAB.

johnsonrl
 
Posts: 11
Joined: Mon May 27, 2013 5:08 pm

Re: what's a good vector / matrix / quaternion library

by johnsonrl on Mon Aug 31, 2020 6:22 pm


johnsonrl
 
Posts: 11
Joined: Mon May 27, 2013 5:08 pm

Please be positive and constructive with your questions and comments.