lonlat_distance

ssapy.utils.lonlat_distance(lat1, lat2, lon1, lon2)[source][source]

Calculate the great-circle distance between two points on Earth’s surface using the Haversine formula.

Parameters:
  • lat1 (float) – Latitude of the first point in radians.

  • lat2 (float) – Latitude of the second point in radians.

  • lon1 (float) – Longitude of the first point in radians.

  • lon2 (float) – Longitude of the second point in radians.

Returns:

distance – Distance between the two points in kilometers.

Return type:

float