Stuck with coding for gimbal/stabilizer using AltIMU-10

I'm currently using Arduino Mega + AltIMU-10 v5.

This is what I am using so far to get the Pitch, Row and Yaw values.

How can I translate these values to the 3 servos(Pitch,Row,Yaw)?

This is what I want to achieve:

Thanks!

Compass.ino (1.97 KB)

DCM.ino (6.01 KB)

I2C.ino (2.2 KB)

matrix.ino (1.5 KB)

MinIMU9AHRS.ino (6.3 KB)

Output.ino (2.56 KB)

Vector.ino (1.84 KB)

You need to research PID control.

You also need to do more research on gimbals. There's a lot of other Arduino gimbal projects out there and many publish their code for you to learn [copy] from.