From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 2409/CH2/EX2.4/Ex2_4.sce | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 2409/CH2/EX2.4/Ex2_4.sce (limited to '2409/CH2/EX2.4/Ex2_4.sce') diff --git a/2409/CH2/EX2.4/Ex2_4.sce b/2409/CH2/EX2.4/Ex2_4.sce new file mode 100755 index 000000000..7e987acc0 --- /dev/null +++ b/2409/CH2/EX2.4/Ex2_4.sce @@ -0,0 +1,25 @@ + +//Variable Declaration +aE=6378.141 //Earth's equitorial radius(km) +e=0.002 //Eccentricity +p=12 //period from perigee to perigee (hours) +K1=66063.1704 //Constant (km^2) +u=3.986005*(10**14) //Earth's Gravitational constant(m^3/sec^2) + + +//Calculation +n=(2*%pi)/(12*60*60) //Mean Motion(rad/sec) +anp=((u/n**2)**(0.3333))/1000 //Radius of the orbit by kepler's 3rd law(km) +k2=(1-e**2)**1.5 + +function [y]=f(a) + y=(n-((u/a**3)**0.5)*(1+K1/a**2*k2)) +endfunction +a=fsolve(2,f) +a=a/1000 //Converting a into km + +//Result + +printf("The nonperturbed value of semimajor axis is %.2f km",anp) +printf("\nThe perturbed value of semimajor axis is %.2f km",a) + -- cgit