Contenido principal

Keplerian Orbital Elements to Cartesian State Vectors

Calculate orbital state vectors in equatorial coordinate system of celestial bodies from Keplerian orbital elements

Since R2026a

  • Keplerian Orbital Elements to Cartesian State Vectors block

Libraries:
Aerospace Blockset / Spacecraft / Spacecraft Dynamics

Description

The Keplerian Orbital Elements to Cartesian State Vectors block calculates orbital state vectors in a celestial body-centered equatorial coordinate system from Keplerian orbital elements. Keplerian orbital elements are defined with respect to the Earth Centered Inertial (ECI) coordinate system.

Ports

Input

expand all

Semimajor axis (half of the longest diameter) of the orbit, specified as a positive scalar, in meters.

Data Types: double

Orbit eccentricity (deviation of orbital curve from circular), specified as a value greater than or equal to 0 for orbit type Keplerian, or a value between 0 and 1 for orbit type Elliptical.

Data Types: double

Inclination, specified as a positive scalar:

  • Value between 0 and 180, in degrees

  • Value between 0 and pi, in radians

Dependencies

To enable this port, set Orbit type to Keplerian or Circular inclined.

Data Types: double

Right ascension of ascending node, specified as a positive scalar:

  • Value between 0 and 360, in degrees

  • Value between 0 and 2*pi, in radians

Dependencies

To enable this port, set Orbit type to Keplerian or Circular inclined.

Data Types: double

Angle between the spacecraft ascending node and the periapsis (argument of periapsis), specified as a positive scalar:

  • Value between 0 and 360, in degrees

  • Value between 0 and 2*pi, in radians

Dependencies

To enable this port, set Orbit type to Keplerian.

Data Types: double

Angle between periapsis and current position of spacecraft (true anomaly), specified as a positive scalar:

  • Value between 0 and 360, in degrees

  • Value between 0 and 2*pi, in radians

Dependencies

To enable this port, set Orbit type to Keplerian or Elliptical equatorial.

Data Types: double

Angle between x-axis and the spacecraft position vector (true longitude), specified as a positive scalar:

  • Value between 0 and 360, in degrees

  • Value between 0 and 2*pi, in radians

Dependencies

To enable this port, set Orbit type to Circular equatorial.

Data Types: double

Angle between ascending node and the spacecraft position vector (argument of latitude), specified as a positive scalar:

  • Value between 0 and 360, in degrees

  • Value between 0 and 2*pi, in radians

Dependencies

To enable this port, set Orbit type to Circular inclined.

Data Types: double

Angle between x-axis and eccentricity vector (longitude of periapsis), specified as a positive scalar:

  • Value between 0 and 360, in degrees

  • Value between 0 and 2*pi, in radians

Dependencies

To enable this port, set Orbit type to Elliptical equatorial.

Data Types: double

Output

expand all

Position vector, returned as a 3-by-1 array.

Velocity vector, returned as a 3-by-1 array.

Data Types: double

Parameters

expand all

To edit block parameters interactively, use the Property Inspector. From the Simulink® Toolstrip, on the Simulation tab, in the Prepare gallery, select Property Inspector.

Parameter and port units, specified as Metric (m/s), Metric (km/s), Metric (km/h), English (ft/s), or English (kts).

Programmatic Use

To set the block parameter value programmatically, use the set_param function.

To get the block parameter value programmatically, use the get_param function.

Parameter: units
Values: Metric (m/s) (default) | Metric (km/s) | Metric (km/h) | English (ft/s) | English (kts)

Angle units, specified as Degrees or Radians.

Programmatic Use

To set the block parameter value programmatically, use the set_param function.

To get the block parameter value programmatically, use the get_param function.

Parameter: angleUnits
Values: Degrees (default) | Radians

Orbit type, specified as Keplerian, Elliptical equatorial, Circular inclined, or Circular equatorial.

Programmatic Use

To set the block parameter value programmatically, use the set_param function.

To get the block parameter value programmatically, use the get_param function.

Parameter: orbitType
Values: Keplerian (default) | Elliptical equatorial | Circular inclined | Circular equatorial

Custom gravitational acceleration for transformation, specified as a finite positive scalar.

Dependencies

To enable this parameter, set Central body to Custom.

Programmatic Use

To set the block parameter value programmatically, use the set_param function.

To get the block parameter value programmatically, use the get_param function.

Parameter: customMu
Values: 42.828314258067e12 (default) | finite positive scalar
Data Types: double

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

Programmatic Use

Block Parameter: centralBody
Type: character vector
Values: 'Earth' | 'Moon' |'Mercury' | 'Venus' | 'Mars' | 'Jupiter' | 'Saturn' | 'Uranus' | 'Neptune' | 'Sun' | 'Custom'
Default: 'Earth'

Action when orbit is opened or undefined, specified as Warning, None, or Error.

Programmatic Use

To set the block parameter value programmatically, use the set_param function.

To get the block parameter value programmatically, use the get_param function.

Parameter: action
Values: Warning (default) | None | Error

Algorithms

In orbital mechanics, six classical orbital elements define elliptical orbits around a central body:

  • Eccentricity (e)

  • Semimajor axis (a)

  • Inclination (i)

  • Right ascension of ascending node (Ω)

  • Argument of periapsis (ω)

  • True Anomaly (v)

These elements help engineers and scientists understand the trajectory and position of a satellite or celestial body.

This block also takes into account these additional orbital elements:

  • True longitude (l) — Angle from the reference direction to the orbiting body. This element is used for circular-equatorial orbits because both the right ascension of the ascending node and the argument of periapsis are undefined.

    l = v

    In this equation, true longitude l is used in place of the right ascension of the ascending node, the argument of periapsis, and the true anomaly.

  • Argument of latitude (u) — Angle from the ascending node to the orbiting body. This element is used for circular-inclined orbits because the argument of periapsis is undefined.

    u = v

    In this equation, argument of latitude (u) is used in place of the argument of periapsis and the true anomaly.

  • Longitude of periapsis (ϖ) — Angle from the reference direction to the periapsis. This element is used for elliptical-equatorial orbits because the right ascension of the ascending node is undefined.

    ϖ = Ω+ω

    In this equation, longitude of periapsis (ϖ) is used in place of the right ascension of the ascending node and the argument of periapsis.

For more information on the Keplerian orbital elements, see Orbit Propagation Methods.

Extended Capabilities

expand all

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2026a