Altitude and Period Functions¶
Functions for computing orbital altitudes and periods from orbital elements or state vectors.
Orbital Period from State¶
orbital_period_from_state builtin ¶
Computes orbital period from an ECI state vector using the vis-viva equation.
This function uses the vis-viva equation to compute the semi-major axis from the position and velocity, then calculates the orbital period.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
state_eci | ndarray | ECI state vector [x, y, z, vx, vy, vz] in meters and meters/second. | required |
gm | float | Gravitational parameter in m³/s². Use GM_EARTH for Earth orbits. | required |
Returns:
| Name | Type | Description |
|---|---|---|
float | float | Orbital period in seconds. |
Example
Altitude Functions¶
Periapsis and Apoapsis (General)¶
periapsis_altitude builtin ¶
Calculate the altitude above a body's surface at periapsis.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a_or_oe | float or array | Either the semi-major axis in meters, or a 6-element Keplerian elements array [a, e, i, Ω, ω, ν] from which | required |
e | float | The eccentricity. Required if | None |
r_body | float | (keyword-only) The radius of the central body in meters. | required |
Returns:
| Name | Type | Description |
|---|---|---|
float | float | The altitude above the body's surface at periapsis in meters. |
Example
apoapsis_altitude builtin ¶
Calculate the altitude above a body's surface at apoapsis.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a_or_oe | float or array | Either the semi-major axis in meters, or a 6-element Keplerian elements array [a, e, i, Ω, ω, ν] from which | required |
e | float | The eccentricity. Required if | None |
r_body | float | (keyword-only) The radius of the central body in meters. | required |
Returns:
| Name | Type | Description |
|---|---|---|
float | float | The altitude above the body's surface at apoapsis in meters. |
Example
Perigee and Apogee (Earth-Specific)¶
perigee_altitude builtin ¶
Calculate the altitude above Earth's surface at perigee.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a_or_oe | float or array | Either the semi-major axis in meters, or a 6-element Keplerian elements array [a, e, i, Ω, ω, ν] from which | required |
e | float | The eccentricity. Required if | None |
Returns:
| Name | Type | Description |
|---|---|---|
float | float | The altitude above Earth's surface at perigee in meters. |
Example
apogee_altitude builtin ¶
Calculate the altitude above Earth's surface at apogee.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a_or_oe | float or array | Either the semi-major axis in meters, or a 6-element Keplerian elements array [a, e, i, Ω, ω, ν] from which | required |
e | float | The eccentricity. Required if | None |
Returns:
| Name | Type | Description |
|---|---|---|
float | float | The altitude above Earth's surface at apogee in meters. |