API#

$partial$SGP4 API

plot.plot_orbit(states[, r_earth, ...])

This function takes a tensor of states, and plots the orbit, together with the Earth.

plot.plot_tles(tles[, file_name, figsize, ...])

This function takes a list of tles as input and plots the histograms of some of their elements.

tle.compute_checksum(line)

This function takes a TLE line in the form of a string and computes the checksum.

tle.read_satellite_catalog_number(string)

This function takes a string corresponding to part of a TLE line, and returns the corresponding satellite catalog number.

tle.load_from_lines(lines[, opsmode])

This function takes a TLE as a list of strings and returns both itself and its dictionary representation.

tle.load_from_data(data[, opsmode])

This function takes a TLE as a dictionary and returns both itself and its representation as a list of strings.

tle.load(file_name)

This function takes a file name that contains TLE (either with names or without), and returns a list of TLE objects.

tle.TLE(data)

This class constructs a TLE object from either a list of strings (that make up the TLE) or from a dictionary.

tle.TLE.copy()

This function returns a copy of the TLE object.

tle.TLE.perigee_alt([R_eq])

This function returns the perigee altitude of a given TLE.

tle.TLE.apogee_alt([R_eq])

This function returns the apogee altitude of a given TLE.

tle.TLE.set_time(date_mjd)

This function sets the epoch of the TLE to the given date.

tle.TLE.update(tle_data)

This function updates the TLE object with the given data.

util.get_gravity_constants(gravity_constant_name)

util.propagate_batch(tles, tsinces[, ...])

This function takes a list of TLEs and a tensor of times (which must be of same length), and returns the corresponding states.

util.propagate(tle, tsinces[, initialized])

This function takes a tensor of inputs and a TLE, and returns the corresponding state.

util.initialize_tle(tles[, ...])

This function takes a single dsgp4.tle.TLE object or a list of dsgp4.tle.TLE objects and initializes the SGP4 propagator.

util.from_year_day_to_date(y, d)

Converts a year and day of the year to a date.

util.gstime(jdut1)

This function computes the Greenwich Sidereal Time (GST) at the given Julian Date (UT1).

util.clone_w_grad(y)

This function takes a tensor and returns a copy of it with gradients.

util.jday(year, mon, day, hr, minute, sec)

Converts a date and time to a Julian Date.

util.invjday(jd)

Converts a Julian Date to a date and time.

util.days2mdhms(year, fractional_day)

Converts a number of days to months, days, hours, minutes, and seconds.

util.from_string_to_datetime(string)

Converts a string to a datetime object.

util.from_mjd_to_epoch_days_after_1_jan(mjd_date)

Converts a Modified Julian Date to the number of days after 1 Jan 2000.

util.from_mjd_to_datetime(mjd_date)

Converts a Modified Julian Date to a datetime object.

util.from_jd_to_datetime(jd_date)

Converts a Julian Date to a datetime object.

util.get_non_empty_lines(lines)

This function returns the non-empty lines of a list of lines.

util.from_datetime_to_fractional_day(...)

Converts a datetime object to a fractional day.

util.from_datetime_to_mjd(datetime_obj)

Converts a datetime object to a Modified Julian Date.

util.from_datetime_to_jd(datetime_obj)

Converts a datetime object to a Julian Date.

util.from_cartesian_to_tle_elements(state[, ...])

This function converts the provided state from Cartesian to TLE elements.

util.from_cartesian_to_keplerian(state, mu)

This function takes the state in cartesian coordinates and the gravitational parameter of the central body, and returns the state in Keplerian elements.

util.from_cartesian_to_keplerian_torch(state, mu)

Same as from_cartesian_to_keplerian, but for torch tensors.

sgp4(satellite, tsince)

This function represents the SGP4 propagator.

sgp4_batched(satellite_batch, tsince)

This function represents the batch SGP4 propagator.

sgp4init.sgp4init(whichconst, opsmode, satn, ...)

This function initializes the sgp4 propagator.

sgp4init_batch.sgp4init_batch(whichconst, ...)

This function initializes the sgp4 propagator.

sgp4init_batch.initl_batch(xke, j2, ecco, ...)

initl(xke, j2, ecco, epoch, inclo, no, opsmode)

newton_method(tle_0, time_mjd[, ...])

This method performs Newton method starting from an initial TLE and a given propagation time.

sgp4init(whichconst, opsmode, satn, epoch, ...)

This function initializes the sgp4 propagator.

sgp4init_batch(whichconst, opsmode, satn, ...)

This function initializes the sgp4 propagator.

dsgp4 ML-dSGP4 Module