LSM9DS1 Gyro deg/s to Eular Orientation

Hey everyone!

I purchased the LSM9DS1 IMU a while ago now and have spent ALOT of time trying to get orientation out of it. I need orientation from just the gyro, a usable angle for XYZ axis. I have tried rotation matrices, Mahony sensor fusion (though that requires accelerometer use) and also just basic deg/s*time change. I have had no luck with these methods apart from sensor fusion, which has one axis that does its own thing while all axis should be at 0 deg.

My super important question is, how can I use the built in gyro to find usable orientation in deg? It is ok if I need to use both gyro and accelerometer data (though not ideal as the IMU will be accelerating). The reason is to know a model rockets orientation through flight.

I was previously using the MPU-6050, which through the mpu_tockn.h library gives me the orientation in deg. It was strongly recomended that I switch to the LSM9DS1 as the mpu has lots of gyro drift, I just assumed the library for it would give me orientation in deg. My main concern is that I have made an expensive flight computer PCB with the LSM9DS1 and as I was pressed for time I did not learn how to use the LSM9DS1 first. I would rather not need to make another flight computer with a different IMU as it will take lots of time and ALOT of money, this has been a very expensive project and I am trying to cut back spending now.

Thanks in advance,

Eddy

Robinson Aerospace

To get the 3D orientation with the LSM9DS1, you need an AHRS program. The Madgwick or Mahony filters work fine, as long as the data are correctly read out of the sensor. Here is one lead: https://www.lythaniel.fr/index.php/2016 … ientation/

However, it is absolutely required to calibrate all three of the sensors, and the magnetometer must be calibrated in its final resting place. The best approach to calibrate the magnetometer and accelerometer is described in this tutorial: https://thecavepearlproject.org/2015/05 … r-arduino/

Hello @FastEddy59,

I am in a similar situation, I have a custom made PCB for a flight computer for my model rocket. The board is based on the MPU-6050. On previous experiments using cheap proto-boards, the MPU-6050 was mounted horizontally in the rocket tube and I had decent results. However with this new PCB, the IMU is mounted vertically. The DMP library by jrowberg is giving me a hard time in this particular situation as it has no way of changing the initial orientation. Also, I am not sure it is possible to use DMP processing sans Accelerometer.

I would be curious to know about your experiences with the MPU6050_tockn library. Where you able to have it integrate the gyro axies without accelerometer for rocketry needs?

Regards,