Orbital

bsk_rl.utils.orbital:Utilities for computing orbital events.

random_orbit(i: float | None = 45.0, alt: float = 500, r_body: float = 6371, e: float = 0, Omega: float | None = None, omega: float | None = 0, f: float | None = None) <MagicMock name='mock.ClassicElements' id='140428082872384'>[source]

Create a set of orbit elements.

Parameters are fixed if specified and randomized if None. Defaults to a random circular orbit at 500 km altitude and 45 deg inclination.

Parameters:
  • i (float | None) – [deg] Inclination, randomized in [-pi, pi].

  • alt (float) – [km] Altitude above r_body.

  • r_body (float) – [km] Body radius.

  • e (float) – Eccentricity.

  • Omega (float | None) – [deg] LAN, randomized in [0, 2pi].

  • omega (float | None) – [deg] Argument of periapsis, randomized in [0, 2pi].

  • f (float | None) – [deg] True anomaly, randomized in [0, 2pi].

Returns:

orbital elements

Return type:

ClassicElements

random_epoch(start: int = 2000, end: int = 2022)[source]

Generate a random epoch in a year range.

Date will always be in the first 28 days of the month.

Parameters:
  • start (int) – Initial year.

  • end (int) – Final year.

Returns:

Epoch in YYYY MMM DD HH:MM:SS.SSS (UTC) format

lla2ecef(lat: float, long: float, radius: float)[source]

Project LLA to Earth Centered, Earth Fixed location.

Parameters:
  • lat (float) – [deg]

  • long (float) – [deg]

  • radius (float) – [any]

elevation(r_sat: ndarray, r_target: ndarray) ndarray[source]

Find the elevation angle from a target to a satellite.

Parameters:
  • r_sat (ndarray) – Satellite position(s).

  • r_target (ndarray) – Target position.

Returns:

Elevation angle(s)

Return type:

ndarray

walker_delta(n_spacecraft: int, n_planes: int, rel_phasing: float, altitude: float, inc: float, clustersize: int = 1, clusterspacing: float = 0) list[<MagicMock name='mock.orbitalMotion.ClassicElements' id='140428082887072'>][source]

Compute the initial orbit conditions of a Walker-delta constellation.

Parameters:
  • n_spacecraft (int) – Number of spacecraft.

  • n_planes (int) – Number of orbital planes.

  • rel_phasing (float) – [deg] Relative phasing between planes.

  • altitude (float) – [m] Altitude above Earth’s surface.

  • inc (float) – [deg] Inclination.

  • clustersize (int) – Number of spacecraft in each cluster.

  • clusterspacing (float) – [deg] Spacing between spacecraft in a cluster.

Returns:

List of orbital elements

Return type:

list