Demonstrates drag compensation maneuvers.
Loads the file DragCompensationDemo.mat to PropagateOrbitPlugIn. ------------------------------------------------------------------------ See also Constant, Plot2D, TimeLabl, Mag, RV2AE, OrbMnvrSemimajor, PropagateOrbitPlugIn, RV2El, AtmDens2 ------------------------------------------------------------------------
Contents
%------------------------------------------------------------------------------- % Copyright (c) 2000 Princeton Satellite Systems, Inc. All rights reserved. %------------------------------------------------------------------------------- clear el; 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('DragCompensationDemo.mat'); tag = PropagateOrbitPlugIn( 'initialize' ); PropagateOrbitPlugIn( 'set data', tag, d ); PropagateOrbitPlugIn( 'propagate', tag ); r = PropagateOrbitPlugIn( 'get r', tag ); v = PropagateOrbitPlugIn( 'get v', tag ); nP = size(r,2); if( ~isempty(r) & ~isempty(v) & nP > 0 ) t = t(1:nP); xPlot = xPlot(:,1:nP); xPlot(2,:) = RV2AE( r, v, mu ) - rE; [t, xLabl] = TimeLabl( t ); [h, hA] = Plot2D( t, xPlot, xLabl, 'H' ); legend( hA.h, 'Analytical', 'Propagator' ); n = nP; for k = 1:n el(:,k) = RV2El( r(:,k), v(:,k) )'; end yL = ['a';'i';'W';'w';'e']; Plot2D( t, el(1:5,:), 'Time', yL, 'Elements' ); % Compute the change in semimajor axis %-------------------------------------- deltaA = el(1,1) - el(1,end); deltaV = OrbMnvrSemimajor( Mag(v(:,1)),el(1,1),deltaA); fprintf('Drag compensation delta-V is %12.4f km/sec\n',deltaV.total); end %--------------------------------------
Drag compensation delta-V is 0.0093 km/sec