Skip to content

Satellite

Satellites can be created from a two-line element (TLE) set or a CelesTrak JSON.

starplot.Satellite dataclass

Satellites can be created in two ways:

  1. from_tle (two-line element set)
  2. from_json (CelesTrak JSON)

ra instance-attribute

ra: float

Right Ascension, in degrees (0 to 360)

dec instance-attribute

dec: float

Declination, in degrees (-90 to 90)

constellation_id class-attribute instance-attribute

constellation_id: str | None = None

Three-letter IAU id of the constellation that contains this object

healpix_index class-attribute instance-attribute

healpix_index: int = None

HEALPix pixel index of this object's RA/DEC

name class-attribute instance-attribute

name: str = None

Name of the satellite

observer class-attribute instance-attribute

observer: Observer = None

Observer of this satellite instance

distance class-attribute instance-attribute

distance: float | None = None

Distance to satellite, in Astronomical units (the Earth-Sun distance of 149,597,870,700 m)

geometry class-attribute instance-attribute

geometry: Point = None

Shapely Point of the satellite's position. Right ascension coordinates are in degrees (0...360).

create_optic

create_optic(*args, **kwargs)

Creates an optic plot with this object at the center

Parameters:

Name Type Description Default
*args

args passed through to OpticPlot()

()
**kwargs

kwargs passed through to OpticPlot()

{}

Returns:

Name Type Description
OpticPlot

new instance of a OpticPlot

create_map

create_map(height_degrees: float, width_degrees: float, *args, **kwargs)

Creates a map plot with this object at the center

Parameters:

Name Type Description Default
height_degrees float

Height of the map (degrees)

required
width_degrees float

Width of the map (degrees)

required
*args

args passed through to MapPlot()

()
**kwargs

kwargs passed through to MapPlot()

{}

Returns:

Name Type Description
MapPlot

new instance of a MapPlot

constellation

constellation()

Returns an instance of the Constellation that contains this object, or None if no constellation is found.

populate_constellation_id

populate_constellation_id()

Populates the constellation_id field based on the location of this object

from_json classmethod

from_json(data: dict, observer: Observer = None) -> Satellite

Get a satellite for a specific date/time/location from a CelesTrak JSON.

Parameters:

Name Type Description Default
data dict

Dictionary of the CelesTrak JSON

required
observer Observer

Observer instance that specifies a time and location

None

from_tle classmethod

from_tle(
    name: str, line1: str, line2: str, observer: Observer = None
) -> Satellite

Get a satellite for a specific date/time/location from a two-line element set (TLE).

Parameters:

Name Type Description Default
name str

Name of the satellite

required
line1 str

Line 1 of the two-line element set (TLE)

required
line2 str

Line 2 of the two-line element set (TLE)

required
observer Observer

Observer instance that specifies a time and location

None

trajectory

trajectory(
    date_start: datetime, date_end: datetime, step: timedelta | None = None
) -> Iterator[Satellite]

Iterator for getting a trajectory of the satellite.

Parameters:

Name Type Description Default
date_start datetime

Starting date/time for the trajectory (inclusive)

required
date_end datetime

End date/time for the trajectory (exclusive)

required
step timedelta | None

Time-step for the trajectory. Defaults to 1-day

None

Returns:

Type Description
Iterator[Satellite]

Iterator that yields a Satellite instance at each step in the date range