Mathematic question

thank you all for your opinions.
I am solving a problem with the gyroscope (reaction to body tilt) in the Hexapod Spider Robot.
Link: Hexapod Spider Robot