pycasx.scenario.calculate_cpa

Calculate the closest point of approach (CPA) given the time to CPA.

Module Contents

Functions

calculate_cpa(…)

Calculate the closest point of approach given the initial condition.

pycasx.scenario.calculate_cpa.calculate_cpa(cfg: pycasx.conf.ScenarioConfig) pycasx.scenario.GeographicCoordinates
pycasx.scenario.calculate_cpa.calculate_cpa(cfg: pycasx.conf.ScenarioConfig, return_tuple: Literal[False]) pycasx.scenario.GeographicCoordinates
pycasx.scenario.calculate_cpa.calculate_cpa(cfg: pycasx.conf.ScenarioConfig, return_tuple: Literal[True]) tuple[float, float]
pycasx.scenario.calculate_cpa.calculate_cpa(cfg: pycasx.conf.ScenarioConfig, return_tuple: Literal[False], order: Literal[lat, lon, lon, lat]) pycasx.scenario.GeographicCoordinates
pycasx.scenario.calculate_cpa.calculate_cpa(cfg: pycasx.conf.ScenarioConfig, return_tuple: Literal[True], order: Literal[lat, lon, lon, lat]) tuple[float, float]

Calculate the closest point of approach given the initial condition.

Parameters:
  • cfg (ScenarioConfig) – The scenario configuration

  • return_tuple (bool) – If true, return the result as a tuple. Otherwise, return a GeographicCoordinates object.

  • order (Literal["lat,lon", "lon,lat"]) – The order of the returned tuple if return_tuple is true.

Returns:

The closest point of

approach as a GeographicCoordinates object if return_tuple is false, otherwise as a tuple of latitude and longitude in the specified order.

Return type:

GeographicCoordinates | tuple[float, float]