Supported Instruments

Missions ephem

Produce satellite orbit data.

Deprecated since version 0.3.0: pyephem is no longer updated, and the code maintainers suggest skyfield as a replacement. The functionality of the instrument will be replaced by the new missions_sgp4 instrument. missions_ephem will be removed in versions 0.4.0+

Orbit is simulated using Two Line Elements (TLEs) and ephem. Satellite position is coupled to several space science models to simulate the atmosphere the satellite is in.

Properties

platform

‘missions’

name

‘ephem’

tag

None supported

inst_id

None supported

pysatMissions.instruments.missions_ephem.init(self)

Add custom calculations to orbit simulation.

This routine is run once, and only once, upon instantiation. Adds custom routines for quasi-dipole coordinates, velocity calculation in ECEF coords, and attitude vectors of spacecraft (assuming x is ram pointing and z is generally nadir).

pysatMissions.instruments.missions_ephem.load(fnames, tag=None, inst_id=None, obs_long=0.0, obs_lat=0.0, obs_alt=0.0, tle1=None, tle2=None, num_samples=None, cadence='1S')

Generate position of satellite in both geographic and ECEF co-ordinates.

Note

Routine is directly called by pysat and not the user.

Parameters:
  • fnames (list) – List of filenames

  • tag (str or NoneType) – Identifies a particular subset of satellite data (accepts ‘’) (default=None)

  • inst_id (str or NoneType) – Instrument satellite ID (accepts ‘’) (default=None)

  • obs_long (float) – Longitude of the observer on the Earth’s surface (default=0.)

  • obs_lat (float) – Latitude of the observer on the Earth’s surface (default=0.)

  • obs_alt (float) – Altitude of the observer on the Earth’s surface (default=0.)

  • tle1 (string or NoneType) – First string for Two Line Element. Must be in TLE format (default=None)

  • tle2 (string or NoneType) – Second string for Two Line Element. Must be in TLE format (default=None)

  • num_samples (int or NoneType) – Number of samples per day (default=None)

  • cadence (str) – Uses pandas.frequency string formatting (‘1S’, etc) (default=’1S’)

Returns:

  • data (pandas.DataFrame) – Object containing satellite data

  • meta (pysat.Meta) – Object containing metadata such as column names and units

Example

tle1='1 25544U 98067A   18135.61844383  .00002728  00000-0  48567-4 0  9998'
tle2='2 25544  51.6402 181.0633 0004018  88.8954  22.2246 15.54059185113452'
inst = pysat.Instrument('pysat', 'ephem', tle1=tle1, tle2=tle2)
inst.load(2018, 1)
pysatMissions.instruments.missions_ephem.preprocess(self)

Add modeled magnetic field values and attitude vectors to spacecraft.

Runs after load is invoked.

Missions SGP4

Simulate satellite orbit data using Two Line Elements (TLEs) and SGP4.

Properties

platform

‘missions’

name

‘sgp4’

tag

None supported

inst_id

None supported

pysatMissions.instruments.missions_sgp4.init(self)

Initialize the Instrument object with required values.

Runs once upon instantiation.

pysatMissions.instruments.missions_sgp4.load(fnames, tag=None, inst_id=None, tle1=None, tle2=None, alt_periapsis=None, alt_apoapsis=None, inclination=None, raan=0.0, arg_periapsis=0.0, mean_anomaly=0.0, epoch=None, bstar=0.0, one_orbit=False, num_samples=None, cadence='1S')

Generate position of satellite in ECI co-ordinates.

Parameters:
  • fnames (list-like collection) – File name that contains date in its name.

  • tag (string) – Identifies a particular subset of satellite data

  • inst_id (string) – Instrument satellite ID (accepts ‘’ or a number (i.e., ‘10’), which specifies the number of seconds to simulate the satellite) (default=’’)

  • tle1 (str or NoneType) – First string for Two Line Element. Must be in TLE format. tle1 and tle2 both required if instantiating instrument by TLEs. (defalt=None)

  • tle2 (str or NoneType) – Second string for Two Line Element. Must be in TLE format. tle1 and tle2 both required if instantiating instrument by TLEs. (default=None)

  • alt_periapsis (float or NoneType) – The lowest altitude from the mean planet surface along the orbit (km). Required along with inclination if instantiating via orbital elements. (default=None)

  • alt_apoapsis (float or NoneType) – The highest altitude from the mean planet surface along the orbit (km) If None, assumed to be equal to periapsis (ie, circular orbit). Optional when instantiating via orbital elements. (default=None)

  • inclination (float or NoneType) – Orbital Inclination in degrees. Required along with alt_periapsis if instantiating via orbital elements. (default=None)

  • raan (float) – Right Ascension of the Ascending Node (RAAN) in degrees. This defines the orientation of the orbital plane to the generalized reference frame. The Ascending Node is the point in the orbit where the spacecraft passes through the plane of reference moving northward. For Earth orbits, the location of the RAAN is defined as the angle eastward of the First Point of Aries. Optional when instantiating via orbital elements. (default=0.)

  • arg_periapsis (float) – Argument of Periapsis in degrees. This defines the orientation of the ellipse in the orbital plane, as an angle measured from the ascending node to the periapsis. Optional when instantiating via orbital elements. (default=0.)

  • mean_anomaly (float) – The fraction of an elliptical orbit’s period that has elapsed since the orbiting body passed periapsis. Note that this is a “fictitious angle” (input in degrees) which defines the location of the spacecraft in the orbital plane based on the orbital period. Optional when instantiating via orbital elements. (default=0.)

  • epoch (dt.datetime or NoneType) – The epoch used for calculating orbital propagation from Keplerians. If None, then use the first date in the file list for consistency across multiple days. Note that this will be set in init. (default=None)

  • bstar (float) – Inverse of the ballistic coefficient. Used to model satellite drag. Measured in inverse distance (1 / earth radius). Optional when instantiating via orbital elements. (default=0.)

  • one_orbit (bool) – Flag to override num_samples and only provide a single orbit. (default=False)

  • num_samples (int) – Number of samples per day. (default=None)

  • cadence (str) – Uses pandas.frequency string formatting (‘1S’, etc) (default=’1S’)

Returns:

  • data (pandas.DataFrame) – Object containing satellite data

  • meta (pysat.Meta) – Object containing metadata such as column names and units

Note

  • Routine is directly called by pysat and not the user.

  • Altitude accuracy expected to be on the order of 10 km in Low Earth Orbit. Efforts to improve accuracy documented under issue #79.

Example

tle1='1 25544U 98067A   18135.61844383  .00002728  00000-0  48567-4 0  9998'
tle2='2 25544  51.6402 181.0633 0004018  88.8954  22.2246 15.54059185113452'
inst = pysat.Instrument('pysat', 'sgp4', tle1=tle1, tle2=tle2)
inst.load(2018, 1)

Missions Skyfield