0% found this document useful (0 votes)
97 views3 pages

Space FM Assignment

This document contains a program to calculate eccentric anomaly (E) given mean anomaly (M) and eccentricity (e) using Kepler's equation. The program uses an iterative method that calculates E until the difference between successive approximations is less than a specified error value. Plots are generated showing the relationship between M and E for different error values of 0.001, 10^-4, and 10^-5.

Uploaded by

Rajib Pal
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
97 views3 pages

Space FM Assignment

This document contains a program to calculate eccentric anomaly (E) given mean anomaly (M) and eccentricity (e) using Kepler's equation. The program uses an iterative method that calculates E until the difference between successive approximations is less than a specified error value. Plots are generated showing the relationship between M and E for different error values of 0.001, 10^-4, and 10^-5.

Uploaded by

Rajib Pal
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Space Flight Mechanics

Assignment

RAJIB SHEKHAR PAL ID No SC09B111 Class Roll No - 44

Program for M vs E
function out=kepler(e) M=[0:30:360]*(pi/180); eps=.000001; for n=1:size(M,2) E1=M(n); % E1 = initial approximation of E i=1; while (i>eps) E2=E1-(((E1-e*sin(E1))-M(n))/(1-e*cos(E1))); i=abs(E2-E1); E1=E2; end E(n)=E2*(180/pi); end plot(M*(180/pi),E),xlabel('Mean Anomaly (M)'),ylabel('Eccentric Anomaly (E)'),xlim([0 360]),ylim([0 360]); % E = Eccentric Anomaly % e = eccentricity % M = Mean Anomaly % eps = max error value

Results
For error value of 0.001 -

For error value of 10^-4 -

For error value of 10^-5

You might also like