oceanspy.utils.great_circle_path

oceanspy.utils.great_circle_path(lat1, lon1, lat2, lon2, delta_km=None, R=None)[source]

Generate a great circle trajectory specifying the distance resolution.

Parameters
lat1: scalar

Latitude of vertex 1 [degrees N]

lon1: scalar

Longitude of vertex 1 [degrees E]

lat2: scalar

Latitude of vertex 2 [degrees N]

lon2: scalar

Longitude of vertex 2 [degrees E]

delta_km: scalar, None

Distance resolution [km] If None, only use vertices and return distance

R: scalar, None

Earth radius in km If None, use geopy default

Returns
lats: 1D numpy.ndarray

Great circle latitudes [degrees N]

lons: 1D numpy.ndarray

Great circle longitudes [degrees E]

dist: 1D numpy.ndarray

Distances from vertex 1 [km]

References

Converted to python and adapted from: https://ww2.mathworks.cn/matlabcentral/mlc-downloads/downloads/submissions/8493/versions/2/previews/generate_great_circle_path.m/index.html?access_key=