keplerian2ijk
Position and velocity vectors in geocentric equatorial coordinate system using Keplerian orbit elements
Syntax
Description
[
calculates the position and velocity vectors in the geocentric equatorial coordinate system
(IJK) for given Keplerian orbit elements of noncircular, inclined orbits.rijk
,vijk
] = keplerian2ijk(a
,ecc
,incl
,RAAN
,argp
,nu
)
[
specifies orbit element properties using one or more name-value pair arguments. For example,
rijk
,vijk
] = keplerian2ijk(___,Name,Value
)'truelon','17'
specifies the angle between the
x-axis and spacecraft position vector. Specify name-value pair arguments
after all other input arguments.
Examples
This example shows how to convert Keplerian orbital elements to geocentric equatorial coordinate system (IJK) position and velocity.
a = 6786230; ecc = .01; incl = 52; RAAN = 95; argp = 93; nu = 300; [r_ijk, v_ijk] = keplerian2ijk(a, ecc, incl, RAAN, argp, nu)
r_ijk = 3×1
106 ×
-2.7489
5.4437
2.8977
v_ijk = 3×1
103 ×
-3.5694
-4.5794
5.0621
This example shows how to convert Keplerian orbital elements to geocentric equatorial coordinate system (IJK) position and velocity for equatorial orbit.
a = 6786230; ecc = .1; incl = 0; RAAN = 95; argp = 93; nu = 300; lonper = 45; [r_ijk, v_ijk] = keplerian2ijk(a,ecc,incl,RAAN,argp,nu,lonper=lonper)
r_ijk = 3×1
106 ×
6.1804
-1.6560
0
v_ijk = 3×1
103 ×
1.4489
7.9848
0
Input Arguments
Semimajor axis (half of the longest diameter) of the orbit, specified as a scalar, 1-by-n array, or n-by-1 array, in meters. This argument supports scalar expansion.
Data Types: double
Orbit eccentricity (deviation of orbital curve from circular), specified as a scalar, 1-by-n array, or n-by-1 array. This argument supports scalar expansion.
Data Types: double
Inclination (tilt angle) of the orbit, specified as a scalar, 1-by-n array, or n-by-1 array, in degrees. This argument supports scalar expansion.
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, specified as a scalar, 1-by-n array, or n-by-1 array, in degrees. This argument supports scalar expansion. The function does not use this value for equatorial orbits.
Data Types: double
Angle between the spacecraft ascending node and the periapsis (closest point of orbit to Earth), specified as a scalar, 1-by-n array, or n-by-1 array, in degrees. This argument supports scalar expansion. The function does not use this value for circular and equatorial orbits.
Data Types: double
Angle between the periapsis and the current position of spacecraft, specified as a scalar, 1-by-n array, or n-by-1 array, in degrees. This argument supports scalar expansion. The function does not use this value for circular orbits.
Data Types: double
Name-Value Arguments
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: 45
Angle between the x-axis and the spacecraft position vector, specified as a scalar, 1-by-n array, or n-by-1 array, in degrees. This argument supports scalar expansion. The function uses this value only for circular equatorial orbits (where eccentricity and inclination are zero).
Data Types: double
Angle between the ascending node and the spacecraft position vector, specified as a scalar, 1-by-n array, or n-by-1 array, in degrees. This argument supports scalar expansion. The function uses this value only for circular inclined orbits (where eccentricity is zero and inclination is nonzero).
Data Types: double
Angle between the x-axis and the eccentricity vector, specified as a scalar, 1-by-n array, or n-by-1 array, in degrees. This argument supports scalar expansion. The function uses this value only for noncircular equatorial orbits (where eccentricity is nonzero and inclination is zero).
Data Types: double
Function behavior when rijk
and
vijk
are parallel or if orbit is
parabolic or hyperbolic.
Value | Description |
---|---|
'None' | Does not display warning or error. If orbit is parabolic, semimajor
axis output a is set to periapsis radius. |
'Warning' | Warning in the MATLAB® Command Window indicating that the orbit is either 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 that the orbit is either parabolic or hyperbolic. If error only applies to a subset of inputs, the first input index where the error applies is displayed. |
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
Output Arguments
Geocentric equatorial position components, returned as a 3-by-1 array or 3-by-n array, in meters.
Geocentric equatorial velocity components, returned as a 3-by-1 array or 3-by-n array, in m/s.
More About
Gravitational parameter, equatorial radius, and rotation rate of celestial bodies are essential parameters for characterizing the physical and dynamical properties of planets and other astronomical objects and play a crucial role in celestial mechanics and astrodynamics.
Gravitational Parameter (μ) — The gravitational parameter μ is the product of the gravitational constant (G) and the mass (M) of the central body.
Equatorial Radius — The equatorial radius of a planet is the distance from the center of the planet to its equator, in m. It is a measure of the size of the planet and is larger than the polar radius due to the rotation of the planet, which causes a bulging effect at the equator. This phenomenon is known as equatorial bulge or oblateness.
Rotation Rate — The rotation rate of a planet refers to how quickly the planet spins around its own axis. It is measured using the angular velocity, which is the rate at which the planet rotates, measured in radians per second or degrees per hour. The rotation rate affects various planetary phenomena, including day and night cycles, weather patterns, and the shape of the planet (due to centrifugal forces).
The values of these three parameters for the celestial bodies included in the Aerospace Toolbox are listed in this table.
Planetary Data
Central Body | Gravitational Parameter (m³/s²) | Equatorial Radius (m) | Rotation Rate (rad/s) |
---|---|---|---|
Earth | 3.986004418e14 | 6.378137e6 | 7.292115146706979e-5 |
Moon | 4.902801076e12 | 1.7382e6 | 2.66166e-6 |
Sun | 1.327124400179870e20 | 6.96000e8 | 2.8653291e-6 |
Mercury | 2.20320804864179e13 | 2.4397e6 | 1.24001e-6 |
Venus | 3.248585988264598e14 | 6.0518e6 | -2.99244942e-7 |
Mars | 4.2828314258067e13 | 3.3962e6 | 7.088218e-5 |
Jupiter | 1.267127678577960e17 | 7.1492e7 | 1.7585336e-4 |
Saturn | 3.794062606113729e16 | 6.0268e7 | 1.6378499e-4 |
Uranus | 5.794549007071873e15 | 2.5559e7 | -1.0123719e-4 |
Neptune | 6.836534063879261e15 | 2.4764e7 | 1.08338e-4 |
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 R2019aThe keplerian2ijk
function has these updates:
keplerian2ijk
now includes options for modifying the gravitational parameter (μ).To support this capability, the function has three new name-value arguments:
CentralBody
,GravitationalParameter
, andAction
.keplerian2ijk
now accepts vector inputs and returns vector outputs. This function continues to support scalar inputs and outputs.
See Also
ecef2eci
| eci2ecef
| dcmeci2ecef
| aeroReadIERSData
| deltaCIP
| polarMotion
| deltaUT1
| ijk2keplerian
| siderealTime
| CubeSat Vehicle (Aerospace Blockset)
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)