Utility Functions
- tatc.utils.mean_anomaly_to_true_anomaly(mean_anomaly: float, eccentricity: float = 0) float[source]
Converts mean anomaly to true anomaly.
- tatc.utils.true_anomaly_to_mean_anomaly(true_anomaly: float, eccentricity: float = 0) float[source]
Converts true anomaly to mean anomaly.
- tatc.utils.compute_number_samples(distance: float) int[source]
Compute the number of global samples required to achieve a typical sample distance (meters) assuming equal spacing.
- 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:
- Returns:
The field of regard (degrees).
- Return type:
- tatc.utils.swath_width_to_field_of_view(altitude: float, swath_width: float, look_angle: float = 0, elevation: float = 0) float[source]
Fast conversion from swath width to field of view considering off-nadir pointing.
- Parameters:
altitude (float) – Altitude (meters) above WGS 84 datum for the observing instrument.
swath_width (float) – Observation diameter (meters) at specified elevation.
look_angle (float) – Off-nadir look angle (degrees) to observation center.
elevation (float) – Elevation (meters) above WGS 84 datum to observe.
- Returns:
The field of view (degrees).
- Return type:
- 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:
- Returns:
The observation diameter (meters) at the specified elevation.
- Return type:
- tatc.utils.buffer_footprint(geometry: Geometry, to_crs: Transformer, from_crs: Transformer, swath_width: float, elevation: float) Polygon[source]
Buffers a ground track point to create a footprint.
- Parameters:
geometry (shapely.Geometry) – The geometry to buffer.
origin_crs (str) – The origin coordinate reference system (CRS).
buffer_crs (str) – The buffering coordinate reference system (CRS).
swath_width (float) – The swath width (meters) to buffer.
elevation (float) – The elevation (meters) at which project the buffered polygon.
- Returns:
The buffered footprint.
- Return type:
Union[shapely.geometry.Polygon, shapely.geometry.MultiPolygon]
- tatc.utils.compute_footprint(orbit_track: Geocentric, cross_track_field_of_view: float, along_track_field_of_view: float, roll_angle: float = 0, pitch_angle: float = 0, is_rectangular: bool = False, number_points: int | None = None, elevation: float = 0) Geometry | List[Geometry][source]
Compute the instanteous instrument footprint.
- Parameters:
orbit_track (skyfield.positionlib.Geocentric) – The satellite position/velocity.
cross_track_field_of_view (float) – The angular (degrees) view orthogonal to velocity.
along_track_field_of_view (float) – The angular (degrees) view in direction of velocity.
pitch_angle (float) – The fore/aft look angle (degrees); right-hand rotation about orbit normal vector.
roll_angle (float) – The left/right look angle (degrees); right-hand rotation about orbit velocity vector.
is_rectangular (float) – True, if this is a rectangular sensor.
number_points (int) – The required number of polygon points to generate.
elevation (float) – The elevation (meters) at which project the footprint.
- Returns:
The instrument footprint(s).
- Return type:
Union[shapely.Geometry, List[shapely.Geometry]
- 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:
- Returns:
Angular width (degrees) of observation.
- Return type:
- 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:
- Returns:
The minimum elevation angle (degrees) for observation.
- Return type:
- tatc.utils.compute_orbit_period(altitude: float) float[source]
Fast computation of approximate orbital period.
- tatc.utils.compute_max_access_time(altitude: float, min_elevation_angle: float) float[source]
Fast computation of maximum access time to observe a point.
- tatc.utils.project_polygon_to_elevation(polygon: Polygon | MultiPolygon, elevation: float) Polygon | MultiPolygon[source]
Projects a polygon to a specified elevation (z-coordinate).
- Parameters:
polygon (Polygon or MultiPolygon) – The polygon to project.
elevation (float) – The elevation (meters) above the WGS 84 geoid.
- Returns:
The projected polygon.
- Return type:
- tatc.utils.split_polygon(polygon: Polygon | MultiPolygon) 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). Note: this function only supports polygons that span LESS than 360 degrees longitude.
- Parameters:
polygon (Polygon or MultiPolygon) – The polygon to split.
- Returns:
The split polygon.
- Return type:
Polygon, or MultiPolygon
- tatc.utils.normalize_geometry(geometry: 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: