Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions geodesy/lamberts_ellipsoidal_distance.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@
# Intermediate X value
# X = (sigma - sin(sigma)) * sin^2Pcos^2Q / cos^2(sigma/2)
x_numerator = (sin(p_value) ** 2) * (cos(q_value) ** 2)
x_demonimator = cos(sigma / 2) ** 2
x_value = (sigma - sin(sigma)) * (x_numerator / x_demonimator)
x_denominator = cos(sigma / 2) ** 2
x_value = (sigma - sin(sigma)) * (x_numerator / x_denominator)

# Intermediate Y value
# Y = (sigma + sin(sigma)) * cos^2Psin^2Q / sin^2(sigma/2)
Expand All @@ -107,6 +107,11 @@
return EQUATORIAL_RADIUS * (sigma - ((flattening / 2) * (x_value + y_value)))


print(
f"SF-Yosemite: {lamberts_ellipsoidal_distance(37.774856, -122.424227, 37.864742, -119.537521):0,.0f}"

Check failure on line 111 in geodesy/lamberts_ellipsoidal_distance.py

View workflow job for this annotation

GitHub Actions / ruff

ruff (E501)

geodesy/lamberts_ellipsoidal_distance.py:111:89: E501 Line too long (105 > 88)
)
print(f"Expected ~254km but got ???")

Check failure on line 113 in geodesy/lamberts_ellipsoidal_distance.py

View workflow job for this annotation

GitHub Actions / ruff

ruff (F541)

geodesy/lamberts_ellipsoidal_distance.py:113:7: F541 f-string without any placeholders help: Remove extraneous `f` prefix

if __name__ == "__main__":
import doctest

Expand Down
Loading