Ejemplo n.º 1
0
        public void GunCalibrationFinalize()
        {
            // Old way
            Vector3.Normalize(vectorPointedForward);
            Vector3.Normalize(vectorPointedDown);
            pitch_axis = Vector3.Cross(vectorPointedDown, vectorPointedForward);
            Vector3.Normalize(pitch_axis);
            var roll_axis_approx = Vector3.Add(vectorPointedForward, Vector3.Cross(pitch_axis, vectorPointedDown));

            Vector3.Normalize(roll_axis_approx);
            yaw_axis = Vector3.Cross(pitch_axis, roll_axis_approx);
            Vector3.Normalize(yaw_axis);
            roll_axis = Vector3.Cross(yaw_axis, pitch_axis); // No need to normalize this one.

            // New way
            //propRotation = ReferenceFrame.CalibratePropOrientation(orientationPointedForward, orientationPointedDown);
            SaveSpecifics();
        }