dsgp4.util#

Functions

clone_w_grad(y)

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

days2mdhms(year, fractional_day)

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

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.

from_cartesian_to_keplerian_torch(state, mu)

Same as from_cartesian_to_keplerian, but for torch tensors.

from_cartesian_to_tle_elements(state[, ...])

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

from_datetime_to_fractional_day(datetime_object)

Converts a datetime object to a fractional day.

from_datetime_to_jd(datetime_obj)

Converts a datetime object to a Julian Date.

from_datetime_to_mjd(datetime_obj)

Converts a datetime object to a Modified Julian Date.

from_jd_to_datetime(jd_date)

Converts a Julian Date to a datetime object.

from_mjd_to_datetime(mjd_date)

Converts a Modified Julian Date to a datetime object.

from_mjd_to_epoch_days_after_1_jan(mjd_date)

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

from_string_to_datetime(string)

Converts a string to a datetime object.

from_year_day_to_date(y, d)

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

get_gravity_constants(gravity_constant_name)

get_non_empty_lines(lines)

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

gstime(jdut1)

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

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.

invjday(jd)

Converts a Julian Date to a date and time.

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

Converts a date and time to a Julian Date.

propagate(tle, tsinces[, initialized])

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

propagate_batch(tles, tsinces[, initialized])

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