Contents

Landing demo using bilinear tangent thrust programming.

Demonstrates the use of the bilinear tangent law on several moons and Pluto. This demo does not account for the body's curvature. It also assumes that the gravity is constant. ------------------------------------------------------------------------- See also: BilinearTangentLaw, RHSPlanetTakeoff, RK4, RocketMass, Plot2D -------------------------------------------------------------------------

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

Select the planet or moon

%---------------------------
body = 'Pluto'; % 'Enceladus'; % 'Europa';

% Planet/moon parameters
%-----------------------
switch body
    case 'Enceladus'

        rEnceladus	= 252.1; % km
        muEnceladus	= 1.08022e20*Constant('newtonian constant of gravitation')/1e9;
        h           = 2;
        r           = rEnceladus + h;
        u           = sqrt(muEnceladus/r);
        g           = muEnceladus/rEnceladus^2; % km/s^2
        n           = 1000;

   case 'Europa'

        rEuropa     = 1560.8; % km
        muEuropa    = Constant('mu europa');
        h           = 200;  % Altitude of initial orbit
        u           = sqrt(muEuropa/rEuropa);
        g           = muEuropa/rEuropa^2; % km/s^2
        n           = 1000;

   case 'Pluto'

        muPluto     = Constant('mu pluto');
        rPluto      = Constant('equatorial radius pluto');
        u           = sqrt(muPluto/rPluto);
        g           = muPluto/rPluto^2;
        h           = 20;
        n           = 2000;
end

Control thrust

%---------------
a           = 2*g;

% Find the thrust direction angles
%---------------------------------
[beta, t]	= BilinearTangentLaw( u, g, a, h, n );
BilinearTangentLaw( u, g, a, h, n );

% Do this to get a landing
%-------------------------
beta        = fliplr(beta);

dT          = t(2) - t(1);

% Size the plotting array
%------------------------
xP          = zeros(4,n);

% Initial state
%--------------
x           = [0;h;-u;0];

% Simulate
%---------
for k = 1:n
    xP(:,k)	= x;
    x       = RK4(@RHSPlanetTakeoff,x,dT,0,a,g,beta(k));
end

Compute the mission

mP  = 200;
fS	= 0.02;
dV	= a*t(end);
iSp	= 285;
[mF, mT, mS, e] = RocketMass( iSp, mP, fS, dV );

thrust = a*mT*1000;

fprintf(1,'Mass Payload        %12.2f kg\n',mP);
fprintf(1,'Mass Fuel           %12.2f kg\n',mF);
fprintf(1,'Mass Fuel Tank      %12.2f kg\n',mS);
fprintf(1,'Isp                 %12.2f sec\n',iSp);
fprintf(1,'Delta V             %12.2f km/s\n',dV);
fprintf(1,'Structural fraction %12.2f\n',fS);
fprintf(1,'Landing duration    %12.2f sec\n',t(end));
fprintf(1,'Thrust              %12.2f N\n',thrust);
Mass Payload              200.00 kg
Mass Fuel                  88.00 kg
Mass Fuel Tank              1.76 kg
Isp                       285.00 sec
Delta V                     1.01 km/s
Structural fraction         0.02
Landing duration          769.37 sec
Thrust                    381.01 N

Plot

%------
[t, tL] = TimeLabl(t);

% Titles for plots
%-----------------
s1 = sprintf('%s Landing',body);
s2 = sprintf('%s Landing States',body);
s3 = sprintf('%s Surface',body);

Plot2D(xP(1,:),xP(2,:),'x (km)','y (km)',s1);

% Annotate the plot
%------------------
hold on
plot(xP(1,1),xP(2,1),'ko','MarkerFaceColor','k')
plot(xP(1,end),xP(2,end),'ro','MarkerFaceColor','r')
xLim = get(gca,'xlim');
set(gca,'yLim',[-ceil(0.01*h) ceil(1.2*h)])
line(xLim,[h;h],'color','black')
text(xLim(2)-200000,1.04*h,'Initial Altitude')
line(xLim,[0,0],'color','red')
text(xLim(1)+10000,-0.04*h,s3)
legend('Trajectory','Initial Location','Final Location','Location','Best')

Plot2D(t,xP,tL,{'x (km)','y (km)','v_x (km/s)', 'v_y (kms)'},s2);



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

% $Id: 8094dbda9f5ae34c9d2e3241f1a971aea09a63f6 $