Demonstrate drag reentry.

Loads the presaved file DragDemo.mat. ------------------------------------------------------------------------ See also Constant, Plot2D, TimeLabl, RV2AE, PropagateOrbitPlugIn, AtmDens2 ------------------------------------------------------------------------

Contents

%--------------------------------------------------------------------------
%   Copyright (c) 2000 Princeton Satellite Systems, Inc.
%   All rights reserved.
%--------------------------------------------------------------------------

Generate the analytical result

mu         = Constant('mu earth');
rE         = Constant('equatorial radius earth');
area       = 1; % m^2
mass       = 100;
cD         = 2.7;
bStar      = cD*area/mass;
H0         = 200;
H1         = 200;
H2         = 180;
rho1       = AtmDens2( 200 );
rho2       = AtmDens2( 180 );
h          = (H2-H1)/log(rho1/rho2);
rho0       = rho1/exp(-H1/h);
dT         = 3600;
nSim       = 10;

t          = (0:(nSim-1))*dT;
xPlot      = zeros(2,length(t));
xPlot(1,:) = h*log( exp(H0/h) - sqrt(mu*rE)*bStar*rho0*1e3*t/h);

Run the orbit propagator in batch

d          = load('DragDemo.mat');
tag        = PropagateOrbitPlugIn( 'initialize' );
PropagateOrbitPlugIn( 'set data', tag, d );
PropagateOrbitPlugIn( 'propagate', tag );

r          = PropagateOrbitPlugIn( 'get r', tag );
v          = PropagateOrbitPlugIn( 'get v', tag );

if( ~isempty(r) && ~isempty(v) )
  nP         = size(r,2);
  xPlot      = xPlot(:,1:nP);
  xPlot(2,:) = RV2AE( r, v, mu ) - rE;
  [t, xLabl] = TimeLabl( t(1:nP) );
  [h, hA]    = Plot2D( t, xPlot, xLabl, 'H' );
  legend( hA.h, 'Analytical', 'Propagator' );
end


%--------------------------------------