@@ -12,18 +12,18 @@ def lamberts_ellipsoidal_distance(
1212) -> float :
1313 """
1414 Calculate the shortest distance along the surface of an ellipsoid between
15- two points on the surface of earth given longitudes and latitudes
15+ two points on the surface of Earth given longitudes and latitudes
1616 https://en.wikipedia.org/wiki/Geographical_distance#Lambert's_formula_for_long_lines
1717
18- NOTE: This algorithm uses geodesy/haversine_distance.py to compute central angle,
18+ NOTE: This algorithm uses geodesy/haversine_distance.py to compute the central angle,
1919 sigma
2020
21- Representing the earth as an ellipsoid allows us to approximate distances between
21+ Representing the Earth as an ellipsoid allows us to approximate distances between
2222 points on the surface much better than a sphere. Ellipsoidal formulas treat the
23- Earth as an oblate ellipsoid which means accounting for the flattening that happens
23+ Earth as an oblate ellipsoid, which means accounting for the flattening that happens
2424 at the North and South poles. Lambert's formulae provide accuracy on the order of
25- 10 meteres over thousands of kilometeres . Other methods can provide
26- millimeter-level accuracy but this is a simpler method to calculate long range
25+ 10 meters over thousands of kilometers . Other methods can provide
26+ millimeter-level accuracy, but this is a simpler method to calculate long- range
2727 distances without increasing computational intensity.
2828
2929 Args:
@@ -95,8 +95,8 @@ def lamberts_ellipsoidal_distance(
9595 # Intermediate X value
9696 # X = (sigma - sin(sigma)) * sin^2Pcos^2Q / cos^2(sigma/2)
9797 x_numerator = (sin (p_value ) ** 2 ) * (cos (q_value ) ** 2 )
98- x_demonimator = cos (sigma / 2 ) ** 2
99- x_value = (sigma - sin (sigma )) * (x_numerator / x_demonimator )
98+ x_denominator = cos (sigma / 2 ) ** 2
99+ x_value = (sigma - sin (sigma )) * (x_numerator / x_denominator )
100100
101101 # Intermediate Y value
102102 # Y = (sigma + sin(sigma)) * cos^2Psin^2Q / sin^2(sigma/2)
0 commit comments