summaryrefslogtreecommitdiff
path: root/2409/CH2/EX2.4/Ex2_4.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /2409/CH2/EX2.4/Ex2_4.sce
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '2409/CH2/EX2.4/Ex2_4.sce')
-rwxr-xr-x2409/CH2/EX2.4/Ex2_4.sce25
1 files changed, 25 insertions, 0 deletions
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)
+