Utility Functions

tatc.utils.mean_anomaly_to_true_anomaly(mean_anomaly: float, eccentricity: float = 0) float[source]

Converts mean anomaly to true anomaly.

Parameters
  • mean_anomaly (float) – The mean anomaly (degrees).

  • true_anomaly (float) – The orbit eccentricity.

Returns

The true anomaly (degrees).

Return type

float

tatc.utils.true_anomaly_to_mean_anomaly(true_anomaly: float, eccentricity: float = 0) float[source]

Converts true anomaly to mean anomaly.

Parameters
  • true_anomaly (float) – The true anomaly (degrees).

  • eccentricity (float) – The orbit eccentricity.

Returns

The mean anomaly (degrees).

Return type

float

tatc.utils.compute_number_samples(distance: float) float[source]

Compute the number of global samples required to achieve a typical sample distance (meters) assuming equal spacing.

Parameters

distance (float) – The typical distance between samples (meters).

Returns

The number of global samples.

Return type

int

tatc.utils.swath_width_to_field_of_regard(altitude: float, swath_width: float, elevation: float = 0) float[source]

Fast conversion from swath width to field of regard.

Parameters
  • altitude (float) – Altitude (meters) above WGS 84 datum for the observing instrument.

  • swath_width (float) – Observation diameter (meters) at specified elevation.

  • elevation (float) – Elevation (meters) above WGS 84 datum to observe.

Returns

The field of regard (degrees).

Return type

float

tatc.utils.field_of_regard_to_swath_width(altitude: float, field_of_regard: float, elevation: float = 0) float[source]

Fast conversion from field of regard to swath width.

Parameters
  • altitude (float) – Altitude (meters) above WGS 84 datum for the observing instrument.

  • field_of_regard (float) – Angular width (degrees) of observation.

  • elevation (float) – Elevation (meters) above WGS 84 datum to observe.

Returns

The observation diameter (meters) at the specified elevation.

Return type

float

tatc.utils.compute_field_of_regard(altitude: float, min_elevation_angle: float, elevation: float = 0) float[source]

Fast computation of field of regard for observation with a minimum altitude angle.

Parameters
  • altitude (float) – Altitude (meters) above WGS 84 datum for the observing instrument.

  • min_elevation_angle (float) – The minimum elevation angle (degrees) for observation.

  • elevation (float) – Elevation (meters) above WGS 84 datum to observe.

Returns

Angular width (degrees) of observation.

Return type

float

tatc.utils.compute_min_elevation_angle(altitude: float, field_of_regard: float, elevation: float = 0) float[source]

Fast computation of minimum elevation angle required to observe a point.

Parameters
  • altitude (float) – Altitude (meters) above WGS 84 datum for the observing instrument.

  • field_of_regard (float) – Angular width (degrees) of observation.

  • elevation (float) – Elevation (meters) above WGS 84 datum to observe.

Returns

The minimum elevation angle (degrees) for observation.

Return type

float

tatc.utils.compute_orbit_period(altitude: float) float[source]

Fast computation of approximate orbital period.

Parameters

altitude (float) – Altitude (meters) above WGS 84 datum for the observing instrument.

Returns

The orbital period (seconds).

Return type

float

tatc.utils.compute_max_access_time(altitude: float, min_elevation_angle: float) float[source]

Fast computation of maximum access time to observe a point.

Parameters
  • altitude (float) – Altitude (meters) above WGS 84 datum for the observing instrument.

  • min_elevation_angle (float) – Minimum elevation angle (degrees) for observation.

Returns

The maximum access time (seconds) for observation.

Return type

float

tatc.utils.split_polygon(polygon: Union[Polygon, MultiPolygon]) Union[Polygon, MultiPolygon][source]

Splits a Polygon into a MultiPolygon if it crosses the anti-meridian (180 degrees longitude), exceeds the north pole (90 degrees latitude), or exceeds the south pole (-90 degrees latitude).

Parameters

polygon (Polygon or MultiPolygon) – The polygon to split.

Returns

The split polygon.

Return type

Polygon, or MultiPolygon

tatc.utils.normalize_geometry(geometry: Union[Polygon, MultiPolygon, GeoDataFrame]) GeoDataFrame[source]

Normalize geometry to a GeoDataFrame with antimeridian wrapping.

Parameters

geometry (geopandas.GeoDataFrame, geopandas.GeoSeries, Polygon, or MultiPolygon) – The geometry to normalize.

Returns

The normalized geometry.

Return type

geopandas.GeoDataFrame