You are on page 1of 3

Question 1: To plot the evolution of radial distance and velocity over one revolution

for a spacecraft.
Given:
The spacecraft goes around Earth in an elliptical orbit with
spacecraft starts from periapsis.

as 300 km and

Code:
clear all;
close all;clc;
h_p=300;
h_a=10000;
R_E=6378;
%assuming the earth to be spherical with radius 6378 km
r_p=h_p+R_E;
%distance of perigee from centre of earth
r_a=h_a+R_E;
%distance of apogee from centre of earth
a=(r_a+r_p)/2;
%semi-major axis of elliptical orbit
e=(r_a-r_p)/(r_a+r_p);
%eccentricity of elliptical orbit
m=linspace(0,2*pi);
%true anomaly
r=a*(1-e^2)./(1+e*cos(m));
%instantaneous radial distance
figure(1);
plot(m,r);
xlabel('Theata in radians');
ylabel('Radial Distance in Km');
title('Radial Distance evolution over one revolution');
b=398600;
%earth's gravitational constant
v=b*((2./r)-1/a);
%velocity of spacecraft at given radial distance
figure(2);
plot(m,v);
xlabel('Theata in radians');
ylabel('Velocity in Km/s');
title('Velocity evolution over one revolution');

10000 km. The

Observations:
From Figure 1, it can be observed that the radial distance varies from the minimum radial
distance of perigee ( a (1 e) ) to maximum radial distance of apogee ( a (1 e) ) in the half

cycle i.e. from 0 to and then again to the radial distance of perigee (r p), completing the
cycle, where is the semi-major axis and is the eccentricity of the orbit. From Figure 2, it can
be observed that the velocity varies from the maximum velocity at perigee (V p) to the
minimum velocity at apogee (V a) in the half cycle i.e. from 0 to and then again to the
velocity at perigee (V p), completing the cycle. It can be observed from the plots that the
angular momentum is conserved over the revolution i.e. it satisfies, r a V a= r p V p.

You might also like