@staticmethod
def toQuaternion(pitch, roll, yaw):
    t0 = math.cos((yaw * 0.5))
    t1 = math.sin((yaw * 0.5))
    t2 = math.cos((roll * 0.5))
    t3 = math.sin((roll * 0.5))
    t4 = math.cos((pitch * 0.5))
    t5 = math.sin((pitch * 0.5))
    q = Quaternionr()
    q.w_val = (((t0 * t2) * t4) + ((t1 * t3) * t5))
    q.x_val = (((t0 * t3) * t4) - ((t1 * t2) * t5))
    q.y_val = (((t0 * t2) * t5) + ((t1 * t3) * t4))
    q.z_val = (((t1 * t2) * t4) - ((t0 * t3) * t5))
    return q
@staticmethod
def toQuaternion(pitch, roll, yaw):
    t0 = math.cos((yaw * 0.5))
    t1 = math.sin((yaw * 0.5))
    t2 = math.cos((roll * 0.5))
    t3 = math.sin((roll * 0.5))
    t4 = math.cos((pitch * 0.5))
    t5 = math.sin((pitch * 0.5))
    q = Quaternionr()
    q.w_val = (((t0 * t2) * t4) + ((t1 * t3) * t5))
    q.x_val = (((t0 * t3) * t4) - ((t1 * t2) * t5))
    q.y_val = (((t0 * t2) * t5) + ((t1 * t3) * t4))
    q.z_val = (((t1 * t2) * t4) - ((t0 * t3) * t5))
    return q