Code covered by the BSD License
-
CalcEA(M,ecc,tol)
Orbit eccentric anomaly, Kepler's equation keplers equation
-
Groundtrack(Kepler,GMSTo,Tf,f...
Orbit groundtrack plot Latitude longitude lat long
-
Hohmann(R_init,R_fin,U)
Orbit Hohmann transfer
-
JD(yr,day)
Julian Date
-
KeplerCOE(Ro,Vo,dT,U,tol)
Orbit Kepler position velocity
-
NodeChange(dO,inc,Vinit)
Node change right ascension of the ascending node RAAN raan orbit
-
R1(x)
Rotation matrix direction cosine matrix
-
R2(x)
Rotation matrix direction cosine matrix
-
R3(x)
Rotation matrix direction cosine matrix
-
RVtoLatLong(ECEF)
orbit radius velocity latitude longitude ECEF
-
TwoBody(t,X,U)
Two body Orbit gravity
-
dInc(V,dI,fpa)
Inclination change orbit gravity
-
dVdI(R_init,R_fin,Inc,U,Tol)
Inclination change velocity change orbit hohmann transfer
-
ecef2eci(ECEF, GST, V_ECEF)
Orbit ECEF ECI Coordinate conversion
-
eci2ecef(ECI, GST, V_ECI)
Orbit ECEF ECI Coordinate conversion
-
elorb(R,V,U,tol)
Kepler orbital elements ECI Position orbit conversion
-
nuFromM(M,ecc,tol)
Kepler Orbit Anomaly true mean
-
nuFromTp(Tp,ecc,n,tol)
Kepler Orbit Anomaly true time periapse perigee
-
plotorb(ECEF, V_ECEF, mu, Rbo...
Orbit gravity plot orbit spherical
-
randv(a,ecc,inc,Omega,w,nu,U)
Kepler orbital elements ECI Position orbit conversion
-
topo(ECEF, lat, long, h, Rp)
Orbit range elevation azimuth position ground station site latitude longitude
-
zeroTo360(x,unit)
Angle reduce reduction degrees radians
-
Constants.m
-
View all files
from
Orbital Mechanics Library
by Richard Rieber
A compilation of all of the functions I wrote for my orbital mechanics class
|
| nuFromM(M,ecc,tol)
|
%Kepler Orbit Anomaly true mean
% Richard Rieber
% September 27, 2006
% rrieber@gmail.com
%
% Revision 9/25/07 - Fixed a grusome error in the default tolerance.
% Changed from 10^8 radians to 10^-8 radians. Whoops.
%
% function nu = nuFromM(M,ecc,tol)
%
% Purpose: This function calculates the true anomaly (nu) of a position in an orbit given
% the mean anomaly of the position (M) and the eccentricity (ecc) of the orbit.
% This uses another function, calcEA.
%
% Inputs: M - mean anomaly of position in radians
% ecc - eccentricity of orbit
% tol - A tolerance for calculating the eccentric anomaly (see help calcEA.m)
% Default is 10^-8 radians [OPTIONAL]
%
% Output: nu - true anomaly of position in radians
function nu = nuFromM(M,ecc,tol)
if nargin < 2 || nargin > 3
error('Incorrect number of inputs, see help nuFromM.m')
elseif nargin == 2
tol = 10^-8;
end
E = CalcEA(M,ecc,tol); %Determining eccentric anomaly from mean anomaly
% Since tan(x) = sin(x)/cos(x), we can use atan2 to ensure that the angle for nu
% is in the correct quadrant since we know both sin(nu) and cos(nu). [see help atan2]
nu = atan2((sin(E)*(1-ecc^2)^.5),(cos(E)-ecc));
|
|
Contact us at files@mathworks.com