---------------------------------------------------------------------------
Aircraft trimming algorithm. Uses the function FTrim. This algorithm
determines the Euler angles, body rates, engine state and control
settings. Initial settings are obtained from d and g. Uses fminsearch.
---------------------------------------------------------------------------
Form:
[x, d, cost] = ACTrim( x, d, w, g, options )
---------------------------------------------------------------------------
------
Inputs
------
x (:) Aircraft state
d (:) Aircraft data structure
w (:,1) Weights:
[vTDot, alphaDot, betaDot, wDot, vT, rDot, eDot, engDot]
g (:) Constraint structure
.vT (1,1) Velocity (required)
.rDot (1,1) Climb rate (optional)
.eDot (3,1) Euler angle rate (optional)
options Options for fmins
-------
Outputs
-------
x (:) Trimmed aircraft state
d (:) Trimmed aircraft data structure
cost .start
.end
---------------------------------------------------------------------------