LowThrustGVE_EventFcn:

Path: Missions/AsteroidProspector

% Stopping event function for low thrust GVE sim using ode solver.
 Terminate when the abs value of difference between current element and
 desired element is less than tolerance.
--------------------------------------------------------------------------
   Form:
   [value,isterminal,direction] = LowThrustGVE_EventFcn(t,y,k,ykdes,tol)
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   t             (1,1)       Time (not used)
   y             (6,1)       State vector (arbitrary units)
   k             (1,1)       Index of element to check (1 <= k <= 6)
   ykdes         (1,1)       Desired value of kth element (same units)
   tol           (1,1)       Threshold passing tolerance (same units)

   -------
   Outputs
   -------
   value         (1,1)       Value of function evaluation. Positive: y(k)
                             is different from ykdes by more than tol.
   isterminal    (1,1)       1 - terminal condition
   direction     (1,1)       0 - direction does not matter

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

Back to the Missions Module page