I need help programming this in MATLAB. Transformation from cartesian coordinates to Keplerian orbital elements. This has to be done as a function script in the form (a,ecc,inc,raan,argp,f) = cart2orb(x,y,z,vx,vy,vz) whose inputs are the cartesian coordinates x, y, and z with their respective velocities vx, vy, (expressed in km and km/s respectively), and whose outputs are the semi-major axis (a) (in km), the eccentricity (ecc), the inclination (inc), the right ascension of the ascending node (raan), the argument of perigee (argp), and the true anomaly (f) (with all the angles expressed in degrees). Use μ⊕ = 398600.4418 km3/s2 as the gravitational constant of the Earth
I need help
Transformation from cartesian coordinates to Keplerian orbital elements.
This has to be done as a function script in the form (a,ecc,inc,raan,argp,f)
= cart2orb(x,y,z,vx,vy,vz) whose inputs are the cartesian coordinates x,
y, and z with their respective velocities vx, vy, (expressed in km and km/s
respectively), and whose outputs are the semi-major axis (a) (in km), the
eccentricity (ecc), the inclination (inc), the right ascension of the ascending
node (raan), the argument of perigee (argp), and the true anomaly (f)
(with all the angles expressed in degrees). Use μ⊕ = 398600.4418 km3/s2
as the gravitational constant of the Earth

Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 3 images









