Main Content

ijk2keplerian

Keplerian orbit elements using position and velocity vectors

Description

[a,ecc,incl,RAAN,argp,nu,truelon,arglat,lonper] = ijk2keplerian(rijk, vijk) calculates Keplerian orbit elements for given position and velocity vectors in the geocentric equatorial coordinate system.

example

[a,ecc,incl,RAAN,argp,nu,truelon,arglat,lonper] = ijk2keplerian(rijk, vijk,Name=Value) specifies additional options using one or more name-value arguments.

example

Examples

collapse all

This example shows how to convert the geocentric equatorial coordinate system (IJK) position and velocity to Keplerian orbital elements.

r_ijk = [-2981784 5207055 3161595];
v_ijk = [-3384 -4887 4843];
[a, ecc, incl, RAAN, argp, nu, truelon, arglat, lonper] =...
ijk2keplerian(r_ijk, v_ijk)
a = 
6.7845e+06
ecc = 
9.1950e-04
incl = 
51.7528
RAAN = 
95.2570
argp = 
106.4005
nu = 
290.0096
truelon = 
NaN
arglat = 
NaN
lonper = 
NaN

Input Arguments

collapse all

Geocentric equatorial position components, specified as a 3-by-1 array or 3-by-n array, in meters. This argument does not support scalar expansion.

Data Types: double

Geocentric equatorial velocity components, specified as a 3-by-1 array or 3-by-n array, in m/s. This argument does not support scalar expansion.

Data Types: double

Name-Value Arguments

collapse all

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example: Action='Warning' displays a warning in the command window indicating that rijk and vijk are parallel or orbit is parabolic or hyperbolic.

Celestial body around which the spacecraft orbits, specified as one of Earth, Moon, Mercury, Venus, Mars, Jupiter, Saturn, Uranus, Neptune, or Sun.

Dependencies

You can specify this name-value pair if you leave 'GravitationalParameter' unspecified.

Data Types: string

Gravitational parameter for a custom central body, specified as a positive scalar.

Dependencies

You can specify this name-value pair if you leave CentralBody unspecified.

Data Types: double

Function behavior when rijk and vijk are parallel or if orbit is parabolic or hyperbolic.

ValueDescription
'None'Does not display warning or error. If rijk and vijk are parallel, all outputs are set to NaN. If orbit is parabolic, semimajor axis output a is set to periapsis radius.
'Warning'Warning in the MATLAB® Command Window indicating rijk and vijk are parallel or orbit is parabolic or hyperbolic. If warning only applies to a subset of inputs, the first input index where the warning applies is displayed.
'Error'Error in the MATLAB Command Window indicating rijk and vijk are parallel or orbit is parabolic or hyperbolic. If error only applies to a subset of inputs, the first input index where the error applies is displayed.

Tolerance for orbit circular or parabolic orbit eccentricity, or equatorial orbit inclination, in radians, specified as a scalar. Use this Tolerance name-value argument to specify a tolerance for orbit circular or parabolic eccentricity, or equatorial inclination.

The ijk2keplerian supports these specific orbit trajectories with eccentricity and inclination values:

  • circular — ecc is 0.

  • parabolic — ecc is 1.

  • equatorial — incl is 0 or 180 degrees.

Example: 1e-12

Data Types: double

Output Arguments

collapse all

Semimajor axis (half of the longest diameter) of the orbit, returned as a scalar or 1-by-n array in meters.

When the orbit is parabolic, ecc is 1, this argument returns the orbit periapsis radius.

Data Types: double

Orbit eccentricity (deviation of orbital curve from circular), returned as a scalar or 1-by-n array.

Data Types: double

Inclination (tilt angle) of the orbit, returned as a scalar or 1-by-n array, in degrees.

Data Types: double

Angle in the equatorial plane from the x-axis to the location of the ascending node (point at which the satellite crosses the equator from south to north), returned as a scalar or 1-by-n array, in degrees.

Data Types: double

Angle between the spacecraft ascending node and periapsis (closest point of orbit to Earth), returned as a scalar or 1-by-n array, in degrees.

Data Types: double

Angle between periapsis and current position of spacecraft, returned as a scalar or 1-by-n array, in degrees.

Data Types: double

Angle between the x-axis and spacecraft position vector, returned as a scalar or 1-by-n array, in degrees.

Data Types: double

Angle between the ascending node and the spacecraft position vector, returned as a scalar or 1-by-n array, in degrees.

Data Types: double

Angle between the x-axis and the eccentricity vector, returned as a scalar or 1-by-n array, in degrees.

Data Types: double

More About

collapse all

References

[1] Vallado, D. A. Fundamentals of Astrodynamics and Applications. alg. 5. McGraw-Hill, 1997.

[2] NASA. "Planetary Fact Sheet." NASA National Space Science Data Center. https://nssdc.gsfc.nasa.gov/planetary/factsheet/.

Version History

Introduced in R2019a

expand all