API#

$partial$SGP4 API

dsgp4

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

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

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

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

dsgp4.tle.compute_checksum(line)

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

dsgp4.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.

dsgp4.tle.load_from_lines(lines[, opsmode])

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

dsgp4.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.

dsgp4.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.

dsgp4.tle.TLE(data)

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

dsgp4.tle.TLE.copy()

This function returns a copy of the TLE object.

dsgp4.tle.TLE.perigee_alt([R_eq])

This function returns the perigee altitude of a given TLE.

dsgp4.tle.TLE.apogee_alt([R_eq])

This function returns the apogee altitude of a given TLE.

dsgp4.tle.TLE.set_time(date_mjd)

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

dsgp4.tle.TLE.update(tle_data)

This function updates the TLE object with the given data.

dsgp4.util.get_gravity_constants(...)

dsgp4.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.

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

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

dsgp4.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.

dsgp4.util.from_year_day_to_date(y, d)

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

dsgp4.util.gstime(jdut1)

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

dsgp4.util.clone_w_grad(y)

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

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

Converts a date and time to a Julian Date.

dsgp4.util.invjday(jd)

Converts a Julian Date to a date and time.

dsgp4.util.days2mdhms(year, fractional_day)

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

dsgp4.util.from_string_to_datetime(string)

Converts a string to a datetime object.

dsgp4.util.from_mjd_to_epoch_days_after_1_jan(...)

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

dsgp4.util.from_mjd_to_datetime(mjd_date)

Converts a Modified Julian Date to a datetime object.

dsgp4.util.from_jd_to_datetime(jd_date)

Converts a Julian Date to a datetime object.

dsgp4.util.get_non_empty_lines(lines)

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

dsgp4.util.from_datetime_to_fractional_day(...)

Converts a datetime object to a fractional day.

dsgp4.util.from_datetime_to_mjd(datetime_obj)

Converts a datetime object to a Modified Julian Date.

dsgp4.util.from_datetime_to_jd(datetime_obj)

Converts a datetime object to a Julian Date.

dsgp4.util.from_cartesian_to_tle_elements(state)

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

dsgp4.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.

dsgp4.util.from_cartesian_to_keplerian_torch(...)

Same as from_cartesian_to_keplerian, but for torch tensors.

dsgp4.sgp4(satellite, tsince)

This function represents the SGP4 propagator.

dsgp4.sgp4_batched(satellite_batch, tsince)

This function represents the batch SGP4 propagator.

dsgp4.sgp4init.sgp4init(whichconst, opsmode, ...)

This function initializes the sgp4 propagator.

dsgp4.sgp4init_batch.sgp4init_batch(...)

This function initializes the sgp4 propagator.

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