Path: Orbit/Optimization
% Cost function for 2D low thrust trajectory optimization. It computes an err magnitude that the optimizer uses to find the minimum. This function is for the planar orbit problem which includes radial position, radial velocity, tangential velocity and mass. This function is specifically for the minimum time problem. -------------------------------------------------------------------------- Form: [errMag, err, x, t] = CostLowThrust2D( lambda, d ) d = CostLowThrust2D( 'get' ) -------------------------------------------------------------------------- ------ Inputs ------ lambda (3,1) Costates [r;dr/dt;drtheta/dt] d (.) Structure .rhsFun (*) Associated RHS function for optimizer .plotFun (*) Associated plot function for optimizer .costFun (*) Associated cost function .thrust (1,1) Thrust magnitude (kN) .mDot (1,1) Mass derivative (kg/s) .mu (1,1) Gravitational parameter .x0 (4,1) Initial state, [r;v;mF] .xF (3,1) Final state from optimizer .tEnd (1,1) Final time from opimizer .data.absTol (1,1) ode113 parameter .data.relTol (1,1) ode113 parameter .errorScale (3,1) Weights on the errors ------- Outputs ------- errMag (1,:) Magnitude of the error err (4,1) [costates;transversality condition] x (:,n) States [r;u;v;m;lambda;theta] t (1,n) Time --------------------------------------------------------------------------
Orbit: Optimization/FLowThrust2D Orbit: Optimization/Plot2DTrajectory SC: Ephem/Planets Common: Database/Constant Math: Linear/Dot Math: Linear/DupVect Math: Linear/Mag
Back to the Orbit Module page