LandingControl:

Path: SCPro/Landers

% Landing controller.

   Determines the thrust vector and throttle for landing on a planet.
   Uses a bang-bang for vertical control during terminal ascent. 
   Horizontal control is velocity damping.

   This function generates throttle and thrust vector
   orientation. Thrust vector orientation is achieved by reorienting
   the vehicle or the engine nozzle. The reorientation controller needs
   to be fast enough so that the engine is pointing along the desired
   vector. You can set the throttle to zero until you reach the desired
   orientation.

   The control has four modes: 

   Mode 1 - Drive the vertical velocity to zero and hover
   Mode 2 - Drive all velocities to zero
   Mode 3 - Bang-Bang vertical control
   Mode 4 - Engine balances gravity

   vMaxFrac is the fraction of the maximum velocity allowed during Mode 3.
   The maximum velocity is for free-fall.

   This is used as the terminal control for an optimal landing
   guidance algorithm.

   When you reach mode 4 it is up to you to set the throttle to zero.

   The terminal errors will depend on the time step of your controller.

   Type LandingControl for a 2D lunar landing demo.

--------------------------------------------------------------------------
   Form:
   d = LandingControl( v, h, uV, d )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   v   (3,1)	Velocity vector (km/s)
   h   (1,1)	Altitude (km)
   uV	(3,1)	Vertical unit vector (+up)
   d   (1,1)	Data structure
             .accel              (1,1) Maximum acceleration (km/s^2)
             .gainRate           (1,1) Velocity gain
             .g                  (1,1) Gravitational acceleration at the surface in (km/s^2)
             .mode               (1,1) Mode setting 1-4
             .velocityThreshold 	(1,1) Rate to switch modes
             .hLanding           (1,1) Landing gear height
             .vMaxFrac           (1,1) Maximum velocity during mode 3
                   
   -------
   Outputs
   -------
   d        (1,1)	Data structure
                   .u          (3,1)	Thrust unit vector
                   .throttle   (1,1)	Throttle setting from 0 to 1
                   .mode       (1,1) Mode setting 1-4

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

Children:

Common: Graphics/Plot2D
Common: Graphics/TimeLabl
Math: Integration/RK4
Math: Linear/Dot
Math: Linear/Mag
Math: Linear/Unit

Back to the SCPro Module page