wpf - Bank angle from up vector and look at vector? -


I think that although I know the formula for calculating the angle of the bank (roll) above and see It can not be assumed that this angle should be measured in the plan normally for the vector it takes. Any indication is appreciated that FII is using WPF.

I have posted, which is the same problem, but only expressed using mathematics.

This is the last code to determine the bank Note that I want to determine the angle signal Required:

  // Vector 3D ViProject = New Vector 3D for Vertical Plan on Project Y (- (Direction Y * See Direction.x), 1 - (LookDirection.Y * LookDirection.Y), - (lookDirection.Y * lookDirection.Z)); Yproj.Normalize (); // Get the full angle between the projected Y and the double Apangal = Vector3D.AngleBetween (upDirection, Yproj); // magic formula Vector3D cross = Vector3D.CrossProduct (upDirection, Yproj); Double dot = vector 3D Dot product (see direction, cross); // Actual signed angle BDeg = set (dot> = 0)? AbsAngle: -absAngle;  

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -