Code covered by the BSD License
-
sat_orbit
-
[n,u]=my_const(c)
CONSTANT Get physical constant.
-
ecef2enu(V_ecef, O_ecef)
ECEF2ENU conversion
-
eci2ecef(TIME, R_ECI, V_ECI)%...
October 1, 2006
-
enu2ecef(V_enu, O_ecef)
ENU2ECEF conversion
-
invjday ( jd );
-
jday(yr, mon, day, hr, min, s...
-
llh2xyz(lat,long, h)
-
norad4(tlefile, satname, Nsv2...
ORBIT propagation by NORAD's SGP4
-
sat=mytle(tlefile, satname)
TLE2ORB Get Keplerian elements from Two-Line Element data.
-
xyz2enu(Xr, Yr, Zr, X, Y, Z)
-
xyz2llh(X,Y,Z)
-
View all files
from
SAT_ORBIT
by Andrea monti guarnieri
LEO satellite orbit propagation starting from TLE file
|
| llh2xyz(lat,long, h)
|
function [X,Y,Z] = llh2xyz(lat,long, h)
% Convert lat, long, height in WGS84 to ECEF X,Y,Z
% lat and long given in decimal degrees.
% altitude should be given in meters
lat = lat/180*pi; %converting to radians
long = long/180*pi; %converting to radians
a = 6378137.0; % earth semimajor axis in meters
f = 1/298.257223563; % reciprocal flattening
e2 = 2*f -f^2; % eccentricity squared
chi = sqrt(1-e2*(sin(lat)).^2);
X = (a./chi +h).*cos(lat).*cos(long);
Y = (a./chi +h).*cos(lat).*sin(long);
Z = (a*(1-e2)./chi + h).*sin(lat);
|
|
Contact us at files@mathworks.com