CostLowThrust3D:

--------------------------------------------------------------------------
   Cost function for 3D low thrust trajectory optimization.
   The function uses equinoctial elements.

   Since version 7.
--------------------------------------------------------------------------
   Form:
   [errMag, err, x, t] = CostLowThrust3D( lambda, d )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   lambda         (6,1)  Costates [p;f;g;h;k;L;m]
   d              (1,1)  Structure
                         .rhsFun      (1,:) Associated RHS function for optimizer
                         .plotFun     (1,:) Associated plot function for optimizer
                         .thrust      (1,1) Thrust magnitude       
                         .m0          (1,1) Initial mass
                         .mF          (1,1) Fuel mass
                         .mDot        (1,1) Fuel mass derivative
                         .x0          (6,1) Initial state from optimizer
                         .xF          (6,1) Final state from optimizer
                         .tEnd        (1,1) Final time from opimizer
                         .oDEOptions  (1,:) ode113 options
                         .errorScale  (6,1) Weights for the error

   -------
   Outputs
   -------
   errMag         (1,:)  Magnitude of the error
   err            (7,1)  [costates;transversality condition]
   x              (12,n) state
   t              (1,n)  Time vector

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

Children:

Common: Database/Constant
Math: Linear/Dot
Math: Linear/DupVect
Math: Linear/Mag
Sail: Coordinates/MEqToEl