Small Satellites

Home » Space Flight/Orbital Mechanics » Kepler’s equation Solver

Kepler’s equation Solver

In this example we will show how to solve Kepler’s equation M = E-e*sin(E)

clear all;
clc;
M = 0.3458;         % Mean anomaly [rad]
eps = 1E-9;         % Tolerance
e = 0.1;            % Eccentricity
	En  = M;
	Ens = En - (En-e*sin(En)- M)/(1 - e*cos(En));
	while ( abs(Ens-En) > eps )
		En = Ens;
		Ens = En - (En - e*sin(En) - M)/(1 - e*cos(En));
	end;
	E = Ens;         % Eccentric anomaly E [rad].
fprintf('Eccentric anomaly E = %4.4f [rad]\n',E);
Eccentric anomaly E = 0.3832 [rad]
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Recent Post

%d bloggers like this: