Converting angular rates from the body frame to the global frame.

The Rocketry Forum

Help Support The Rocketry Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

diyaerospace

Well-Known Member
Joined
Sep 21, 2021
Messages
217
Reaction score
108
Hello everyone,

I am working on a rocket flight controller that requires angular rates in the global frame. Unfortunately the sensor I am using (LSM6DS03) outputs angular rates in the body frame. ie if the rocket rolls 90 degrees the x and y axis are swapped.

What I need is a system that defines the x and y axis on the pad. After lifting off the x and y axis need to stay the same regardless of roll.

My main goal with this type of system is to use it to point actively controlled rockets in a "true vertical" direction. By using accelerometers on the pad to figure out the rocket's tilt relative to the earth's gravity and switching to gyroscopes during flight allows the rocket to control itself to a vertical orientation.

If anyone has any suggestions as to how I can do this please reply. I understand that quaternions are an option but I lack the mathematical knowledge to effectively write my own library. (if someone is willing to share their code I would really appreciate it.)

Thanks,
Walter
 
Angular rotation rates is a vector. Your rockets attitude can be expressed as a rotation matrix or quaternion. The translation of your angular rates in body frame to earth frame can be done by a simple matrix or quaternion multiplication. You do not have to write your own quaternion library, the are plenty of good free ones in the public domain.

A good one is here: https://github.com/MartinWeigel/Quaternion
 
Last edited:
Back
Top