spherapy

module util.epoch_u

Utility functions for converting different epochs.

Attributes:


function epoch2datetime

epoch2datetime(epoch_str: str)  datetime

Converts a fractional epoch string to a datetime object.

Args: epoch_str: fractional year epoch

Returns: equivalent datetime


function epochEarlierThan

epochEarlierThan(epoch_a: str, epoch_b: str)  bool

Check if epoch A is earlier than epoch B.

Args:

Returns: True if epoch A is earlier than epoch B


function epochLaterThan

epochLaterThan(epoch_a: str, epoch_b: str)  bool

Check if epoch A is later than epoch B.

Args:

Returns: True if epoch A is later than epoch B


function datetime2TLEepoch

datetime2TLEepoch(date: datetime)  str

Converts a datetime to a TLE epoch string.

Args:

Returns: TLE epoch string, with fractional seconds


function datetime2sgp4epoch

datetime2sgp4epoch(date: datetime)  float

Converts a datetime to an sgp4 epoch.

Args:

Returns: SGP4 epoch, with fractional seconds


function findClosestDatetimeIndices

findClosestDatetimeIndices(
    test_arr: ndarray[tuple[int], dtype[datetime64]],
    source_arr: ndarray[tuple[int], dtype[datetime64]]
)  ndarray[tuple[int], dtype[int64]]

Find the index of the closest datetime in source arr for each datetime in test_arr.

Both search_arr and source_arr must be sorted.

Args:

Returns: Mx1 array of indices of source_arr


function getStoredEpochs

getStoredEpochs(tle_path: Path)  None | tuple[datetime, datetime | None]

Return the start and end epoch for tle_path.

Args:

Returns: (first epoch datetime, last epoch datetime) None if no spacetrack tle stored for sat_id


This file was automatically generated via lazydocs.