summaryrefslogtreecommitdiff
path: root/998/CH29/EX29.79/Ex79.sce
blob: f05519ea265e7fee8d2ef67e9b8ceb01b7a5a45f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//Ex:79
clc;
clear;
close;
R=6378;// Radius of earth in km
H=10000;// in km
A=(R/(R+H));
A1=(acos(A))*(180/%pi);
y_m=180-2*A1;
y_m1=ceil(y_m);
u=39.8*10^13;// in N sq.m/kg
a=(R+H)*1000;// in m
p_o=2*%pi*sqrt((a)^3/(u));// orbital period in sec
p_o1=p_o/3600;//  orbital period in hours
t_e=(y_m1/360)*p_o1;// eclipse duration in hours
t_e1=t_e*60;// eclipse duration in min
printf("The eclipse duration=%f hours", t_e);
printf("\n The eclipse duration=%f minutes", t_e1);