Quaternions are one solution, a good one with lots of uses, but I think you can solve your problem more simply. Your matrix is almost certainly a tilt, then turn, then roll matrix. For controlling aeroplanes you want a roll, then tilt, then turn matrix.
So go back to first principles (or google

) and find out the three 3d matrices that perform rotations about one axis only. Then multiply those together in Y,X,Z order. If you multiply then in Z,Y,X order, you should get the matrix you are presently using, so you can check your maths.
Jim