Hallo zusammen,
wie kann ich Quaternion nach Euler umrechnen?
Irgendwo hab ich einen Fehler drin. Der Code funktioniert bis auf einige Ausnahmen. Wo habe ich den Denkfehler?
Vielen Dank
Goof
wie kann ich Quaternion nach Euler umrechnen?
Quellcode
- Dim qw As Double = txtbox_Quat_W.Text
- Dim qx As Double = txtbox_Quat_X.Text
- Dim qy As Double = txtbox_Quat_Y.Text
- Dim qz As Double = txtbox_Quat_Z.Text
- Dim qy2 As Double = qy * qy
- Dim qz2 As Double = qz * qz
- Dim qw2 As Double = qw * qw
- txtbox_gamma.Text = (Math.Atan2(2 * (qx * qy + qz * qw), 1 - 2 * (qy2 + qz2))) * 180 / Math.PI
- txtbox_beta.Text = -(Math.Asin(2 * (qx * qz - qw * qy))) * 180 / Math.PI
- txtbox_alpha.Text = 180 - (Math.Atan2(2 * (qx * qw + qy * qz), 1 - 2 * (qz2 + qw2))) * 180 / Math.PI
Irgendwo hab ich einen Fehler drin. Der Code funktioniert bis auf einige Ausnahmen. Wo habe ich den Denkfehler?
Vielen Dank
Goof