Skyfield: Home • Table of Contents • Changelog • API Reference
See Earth Satellites for an introduction to downloading Earth satellite data and computing their positions with Skyfield.
skyfield.sgp4lib.
EarthSatellite
(line1, line2, name=None, ts=None)¶An Earth satellite loaded from a TLE file and propagated with SGP4.
An earth satellite object is a Skyfield vector function, so you can
either call its at()
method to generate its position in the sky
or else use addition and subtraction to combine it with other
vectors.
Satellite parameters are generally only accurate for a week or two around the epoch of the parameters, the date for which they were generated, which is available as an attribute:
epoch
Time
giving the exact
epoch moment for these satellite orbit parameters.name
When building a satellite, use the arguments line1
and line2
to provide the two data lines from a TLE file as separate strings.
Optional name
lets you give a name to the satellite, accessible
later through the name
attribute. ts
is a
Timescale
object, used to generate the
epoch
value; if it is not provided, the satellite will use a
built in Timescale
object.
If you are interested in the catalog entry details, the SGP4 model
parameters for a particular satellite can be accessed through its
model
attribute:
model.satnum
model.classification
'U'
for “Unknown”model.intldesg
model.epochyr
model.epochdays
model.jdsatepoch
epochyr
and epochdays
).model.ndot
model.nddot
model.bstar
model.ephtype
model.elnum
model.inclo
model.nodeo
model.ecco
model.argpo
model.mo
model.no_kozai
model.revnum
from_satrec
(satrec, ts)¶Build an EarthSatellite from a raw sgp4 Satrec object.
This lets you provide raw numeric orbital elements instead of the text of a TLE set. See Build a satellite with a specific gravity model for detais.
from_omm
(ts, element_dict)¶Build an EarthSatellite from OMM text fields.
Provide a ts
timescale object, and a Python dict of OMM
field names and values. The timescale is used to build the
satellite’s .epoch
time.
ITRF_position_velocity_error
(t)¶Deprecated: use the TEME and ITRS frame objects instead.
find_events
(topos, t0, t1, altitude_degrees=0.0)¶Return the times at which the satellite rises, culminates, and sets.
Searches between t0
and t1
, which should each be a
Skyfield Time
object, for passes of
this satellite above the location topos
that reach at least
altitude_degrees
above the horizon.
Returns a tuple (t, events)
whose first element is a
Time
array and whose second element
is an array of events:
altitude_degrees
.altitude_degrees
.Note that multiple culminations in a row are possible when, without setting, the satellite reaches a second peak altitude after descending partway down the sky from the first one.
skyfield.sgp4lib.
TEME
¶The satellite-specific True Equator Mean Equinox frame of reference.
This TEME frame is used to measure right ascension and declination, and is the reference frame of the SGP4 Earth satellite orbit model. It is a bit quirky. Instead measuring right ascension from the true vernal equinox point, it uses the ‘mean’ equniox that considers only precession but not nutation (the same equinox used for Greenwich Mean Sidereal Time). This made the reference frame more tractable for the 1970s computers that first implemented SGP4.
Defined in AIAA 2006-6753 Appendix C. See Coordinates in other reference frames for a guide to using Skyfield reference frames like this one.