Ejemplo n.º 1
0
            private void ExecuteManeuver()
            {
                Matrix cockpitOrientation;

                cockpit.Orientation.GetMatrix(out cockpitOrientation);
                var quatPitch = Quaternion.CreateFromAxisAngle(cockpitOrientation.Left, (float)(desiredPitch * Helpers.degToRad));
                var quatRoll  = Quaternion.CreateFromAxisAngle(cockpitOrientation.Backward, (float)(desiredRoll * Helpers.degToRad));
                var reference = Vector3D.Transform(cockpitOrientation.Down, quatPitch * quatRoll);

                gyroController.SetTargetOrientation(reference, cockpit.GetNaturalGravity());
            }
Ejemplo n.º 2
0
 private void TargetOrientation(Vector3D target)
 {
     gyroController.SetTargetOrientation(thrustVector, target);
 }