Generates a Mars orbit plot.

This demos shows you how to superimpose orbit traces and planetary maps. Your monitor must be set to thousands of colors!

Since version 2.
-------------------------------------------------------------------------
See also Map, Constant, NewFig, RVOrbGen
-------------------------------------------------------------------------

Contents

%-------------------------------------------------------------------------------
% Copyright  1997-2003 Princeton Satellite Systems, Inc. All rights reserved.
%-------------------------------------------------------------------------------

rMars  = Constant('equatorial radius mars');
muSun  = Constant('sun gravitational constant');
muMars = muSun/Constant('mass sun/mass mars') ;

Hyperbolic part

%----------------
rP     = rMars + 1000;
e      = 1.05;
a      = rP/(1-e);
mMax   = -pi/96;
tMax   = abs(mMax)/sqrt(-muMars/a^3);
rH     = RVOrbGen( [a 0 0 0 e mMax], linspace(0,tMax), [], muMars, rMars );

Elliptical part

%----------------
rP      = rMars + 1000;
a       = rP;
mMax    = 2*pi;
tMax    = abs(mMax)/sqrt(muMars/a^3);

rE      = RVOrbGen( [a 0 0 0 0 0], linspace(0,tMax), [], muMars, rMars );
rH(2,:) = -rH(2,:);
r       = [rH rE];

NewFig('Orbit')
Map( 'Mars', '3d', 1 )
hold on;
plot3(r(1,:),r(2,:),r(3,:),'b','LineWidth',2);
axis image


%--------------------------------------
% PSS internal file version information
%--------------------------------------