A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
leo-orbital-manipulations Namespace Reference

Functions

 apply_raan_and_inclination (np.ndarray x, np.ndarray y, np.ndarray z, float raan_deg, float inclination_deg)
np.ndarray generate_progress_vector (float orbit_alt_km, float time_step_sec, float inc_deg=28.0)
 rodrigues_rotate_points (np.ndarray x, np.ndarray y, np.ndarray z, float inclination_deg, float raan_deg, float plane_rotation_deg)

Variables

 args = parser.parse_args()
 default
float EARTH_RADIUS_KM = 6378.137
 float
 help
float KM_TO_M = 1000.0
float LEO_EARTH_GGC = 398600.7
 parser
 type

Function Documentation

◆ apply_raan_and_inclination()

leo-orbital-manipulations.apply_raan_and_inclination ( np.ndarray x,
np.ndarray y,
np.ndarray z,
float raan_deg,
float inclination_deg )
Rotate orbit points from the initial XY plane (z=0) into a tilted/oriented orbital plane.

The transform applied is:
    r_new = Rz(Ω) * Rx(i) * r
where:
    Ω (RAAN) rotates the line of nodes around the +Z axis,
    i (inclination) tilts the plane by rotating around the +X axis.

Parameters
----------
x, y, z
    Arrays (N,) representing point coordinates (km).
raan_deg
    Right ascension of the ascending node Ω, in degrees (rotation about +Z).
inclination_deg
    Inclination i, in degrees (rotation about +X).

Returns
-------
(x2, y2, z2)
    Rotated coordinate arrays (km).

Definition at line 141 of file leo-orbital-manipulations.py.

Referenced by rodrigues_rotate_points().

Here is the caller graph for this function:

◆ generate_progress_vector()

np.ndarray leo-orbital-manipulations.generate_progress_vector ( float orbit_alt_km,
float time_step_sec,
float inc_deg = 28.0 )
Generate an array of angular offsets ("progress vector") that advance around a circular orbit
by a fixed time step.

This logic:
  - Assumes a circular orbit with radius r = (Earth radius + altitude).
  - Uses circular-orbit speed v = sqrt(μ / r).
  - Converts time step into arc-length step: step_size = v * dt.
  - Converts arc-length to fraction of orbital circumference, then to an angle increment.

Parameters
----------
orbit_alt_km
    Orbit altitude above the reference Earth radius, in kilometers.
time_step_sec
    Simulation sampling interval (dt), in seconds. One progress-vector entry is produced per dt.
inc_deg
    Inclination in degrees, used only to replicate the sign convention (flip for retrograde
    if inclination > 90 deg).

Returns
-------
np.ndarray
    Array of angles (radians) from 0 up to ~2π (one orbital revolution), sampled at dt.
    The length is computed so that the last step is approximately one full orbit.

Definition at line 83 of file leo-orbital-manipulations.py.

Referenced by rodrigues_rotate_points().

Here is the caller graph for this function:

◆ rodrigues_rotate_points()

leo-orbital-manipulations.rodrigues_rotate_points ( np.ndarray x,
np.ndarray y,
np.ndarray z,
float inclination_deg,
float raan_deg,
float plane_rotation_deg )
Apply an additional rigid rotation to all points using Rodrigues' rotation formula.

This rotates each 3D point about a user-defined axis vector `n` by `plane_rotation_deg`.
Rodrigues’ formula (for unit axis n) is: v' = v*cos(a) + (n×v)*sin(a) + n*(n·v)*(1-cos(a)).

Notes
-----
- The axis `n` you compute below is treated as the rotation axis in the same coordinate frame
  as (x,y,z). Ensure the axis definition matches the physical meaning you want.
- `n` is normalized internally; it must not be the zero vector.

Parameters
----------
x, y, z
    Arrays (N,) of point coordinates (km).
inclination_deg
    Inclination used in the axis construction below (degrees).
raan_deg
    RAAN used in the axis construction below (degrees).
plane_rotation_deg
    Rotation angle about axis n, in degrees.

Returns
-------
(x2, y2, z2)
    Rotated coordinate arrays (km).

Definition at line 193 of file leo-orbital-manipulations.py.

References apply_raan_and_inclination(), generate_progress_vector(), and rodrigues_rotate_points().

Referenced by rodrigues_rotate_points().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ args

leo-orbital-manipulations.args = parser.parse_args()

Definition at line 375 of file leo-orbital-manipulations.py.

◆ default

leo-orbital-manipulations.default

Definition at line 357 of file leo-orbital-manipulations.py.

◆ EARTH_RADIUS_KM

float leo-orbital-manipulations.EARTH_RADIUS_KM = 6378.137

Definition at line 80 of file leo-orbital-manipulations.py.

◆ float

leo-orbital-manipulations.float

Definition at line 357 of file leo-orbital-manipulations.py.

◆ help

leo-orbital-manipulations.help

Definition at line 357 of file leo-orbital-manipulations.py.

◆ KM_TO_M

float leo-orbital-manipulations.KM_TO_M = 1000.0

Definition at line 76 of file leo-orbital-manipulations.py.

◆ LEO_EARTH_GGC

float leo-orbital-manipulations.LEO_EARTH_GGC = 398600.7

Definition at line 77 of file leo-orbital-manipulations.py.

◆ parser

leo-orbital-manipulations.parser
Initial value:
1= argparse.ArgumentParser(
2 description="LEO Orbital Manipulations Visualization Script\n\n"
3 "This script demonstrates how different orbital parameters affect the shape and orientation "
4 "of Low Earth Orbit (LEO) satellite trajectories. It generates 3D visualizations showing "
5 "the effects of various parameters on orbital planes and satellite positions over time.\n\n"
6 "The script mirrors the orbital mechanics implemented in the ns-3 LeoCircularOrbitMobilityModel, "
7 "providing a visual understanding of how each parameter influences satellite motion.\n\n"
8 "Output: 3D matplotlib plot showing satellite positions over one orbital period, "
9 "with Earth reference circle and start/end position markers.",
10 formatter_class=argparse.RawDescriptionHelpFormatter,
11 )

Definition at line 345 of file leo-orbital-manipulations.py.

◆ type

leo-orbital-manipulations.type

Definition at line 357 of file leo-orbital-manipulations.py.