标签:stream euler html ret ofo 参考 ++ http https
Python 版本def to_euler_angles(w, x, y, z):
"""w、x、y、z to euler angles"""
angles = {‘pitch‘: 0.0, ‘roll‘: 0.0, ‘yaw‘: 0.0}
r = math.atan2(2*(w*x+y*z),1-2*(x*x+y*y))
p = math.asin(2*(w*y-z*z))
y = math.atan2(2*(w*z+x*y),1-2*(z*z+y*y))
angles[‘roll‘] = r*180/math.pi
angles[‘pitch‘] = p*180/math.pi
angles[‘yaw‘] = y*180/math.pi
return angles
标签:stream euler html ret ofo 参考 ++ http https
原文地址:https://blog.51cto.com/laok8/2491298