summaryrefslogtreecommitdiff
path: root/2219/CH11/EX11.15/Ex11_15.sce
diff options
context:
space:
mode:
Diffstat (limited to '2219/CH11/EX11.15/Ex11_15.sce')
-rwxr-xr-x2219/CH11/EX11.15/Ex11_15.sce23
1 files changed, 23 insertions, 0 deletions
diff --git a/2219/CH11/EX11.15/Ex11_15.sce b/2219/CH11/EX11.15/Ex11_15.sce
new file mode 100755
index 000000000..90ee015f8
--- /dev/null
+++ b/2219/CH11/EX11.15/Ex11_15.sce
@@ -0,0 +1,23 @@
+// Chapter 11 example 15
+//------------------------------------------------------------------------------
+clc;
+clear;
+// Given data
+a = 20000; // semi major axis of elliptical sate. orbit in kms
+b = 16000; // semi minor axis of elliptical sate. orbit in kms
+
+// calculations
+// a = (ra + rp)/2
+// b = sqrt(ra*rp)
+// let k = (ra + rp)
+// let l = ra*rp
+k = 2*a; // ra+ rp ----------------1
+l = b^2; // ra*rp -----------------2
+// ra^2 -40000ra + 256000000
+p = [ 1 -k l]
+x = roots(p)
+r1 = x(1)
+r2 = x(2)
+rp = k - r1;
+mprintf('Apogee distance = %d km\n Perigee distance = %d km',r1,rp);
+//------------------------------------------------------------------------------