https://alandroidnet.com/related/calculate quaternion from rotation matrix