kessler.util

Functions

add_days_to_date_str(date0, days)

compute_checksum(line)

create_path(path[, directory])

days_hours_mins_secs_str(total_seconds)

dist_to_event_dataset(dist)

doy_2_date(value, doy, year, idx)

Written by Andrew Ng, 18/03/2022, Based on source code @ https://github.com/nasa/CARA_Analysis_Tools/blob/master/two-dimension_Pc/Main/TransformationCode/TimeTransformations/DOY2Date.m Use the datetime python package.

find_closest(values, t)

from_TEME_to_ITRF(state, time)

from_cartesian_to_keplerian(state)

from_cartesian_to_rtn(state[, …])

from_cartesian_to_tle_elements(state)

from_date_str_to_days(date[, date0, date_format])

from_datetime_to_cdm_datetime_str(datetime)

from_jd_to_cdm_datetime_str(jd_date)

from_jd_to_datetime(jd_date)

from_mjd_to_datetime(mjd_date)

from_mjd_to_epoch_days_after_1_jan(mjd_date)

from_rtn_to_cartesian(state_rtn, …)

get_ccsds_time_format(time_string)

Adapted by Andrew Ng, 18/3/2022. Original MATLAB source code found at: https://github.com/nasa/CARA_Analysis_Tools/blob/master/two-dimension_Pc/Main/TransformationCode/TimeTransformations/getCcsdsTimeFormat.m get_ccsds_time_format - process and outputs the format of the time string extracted from the CDM. The CCSDS time format is required to be of the general form yyyy-[mm-dd|ddd]THH:MM:SS[.F*][Z] (1) The date and time fields are separated by a “T”. (2) The date field has a four digit year followed by either a two digit month and two digit day, or a three digit day-of-year. (3) The year, month, day, and day-of-year fields are separated by a dash. (4) The hours, minutes and seconds fields are each two digits separated by colons. (5) The fraction of seconds is optional and can have any number of digits. (6) If a fraction of seconds is provided, it is separated from the two digit seconds by a period. (7) The time string can end with an optional “Z” time zone indicator.

has_nan_or_inf(value)

is_date(date_string, date_format)

is_number(s)

lpop_init(tle)

lpop_sequence(target_mjds)

lpop_sequence_upsample(target_mjds[, …])

lpop_single(target_mjd)

progress_bar(i, len)

progress_bar_end([message])

progress_bar_init(message, num_iters[, …])

progress_bar_update(iter)

rotation_matrix(state)

seed([seed])

tile_rows_cols(num_items)

tle(satnum, classification, …)

trace_to_event(trace)

transform_date_str(date_string, …)

upsample(s, target_resolution)