# Reverse transformation

## Recommended Posts

Ok well I think I somewhat understand now. However I might be tempted to dump the matrices altogether and set up three pairs of vectors for the gyroscopes and then calculate everything with cross-products and dot-products.  I'm not really familial with the hardware though.  For instance as far as I know the only way a gyro won't move is if you are rotating around it's axis. So it seems to me that at least two of the gyros will always be moving if you are changing orientation, but I guess maybe the computer combines the 3 gyros input and gives you the solution.

In any case I'm still betting you could do it a much easier way.

##### Share on other sites

Bottom line, I have narrowed down the fault to this piece of code:

double yr = (rate[0] * sb + rate[1] * cb) * (1.0 / cp);

This is supposed to be the horizon relative yaw rate, made by combining body pitch rate (rate[0]) and body yaw rate (rate[1]). In order to get the proper value, I need to establish what is the relationship rate[1] has with pitch and heading, since those 2 combined are what cause it to go off the expected value.

## Create an account or sign in to comment

You need to be a member in order to leave a comment

## Create an account

Sign up for a new account in our community. It's easy!

Register a new account

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

(You must login to your GameDev.net account.)

• 15
• 9
• 11
• 9
• 9
• ### Forum Statistics

• Total Topics
634133
• Total Posts
3015747
×