SearchVaneAngles:

% Solve a three-axis control vane problem using fminsearch.
 Actual torque is computed using SailDisturbance. Requires 3 or more
 vanes for a 3 axis solution. The angles are limited to +/- 90 degrees.

--------------------------------------------------------------------------
   Form:
   [theta,k] = SearchVaneAngles( Td, theta0, g, env, p, d )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   Td       (3,1)     Torque demand (N)
   theta0   (1,n)     Initial guess
   g         (:)      Sail CAD model struct
   env       (:)      Sail environment struct
   p         (:)      Sail profile struct
   d         (:)      Sail disturbance options struct
   
   -------
   Outputs
   -------
   theta    (1,n)     Angles found
   k        (1,1)     Number of iterations

--------------------------------------------------------------------------

Children:

Math: Linear/Mag
Sail: Disturbances/SailDisturbance