Loading src/cso/cso_mapping.py +7 −4 Original line number Diff line number Diff line Loading @@ -14,6 +14,9 @@ # 2023-08, Arjo Segers # Remove rounding errors when locations are very close. # # 2026-01, Arjo Segers # Changed imports for python packaging. # ######################################################################## ### Loading Loading @@ -89,7 +92,7 @@ def LonLatDistance(lon1, lat1, lon2, lat2): import numpy # tools: from cso_constants import EarthRadius from . import cso_constants # convert: delta = lon2 - lon1 Loading @@ -102,7 +105,7 @@ def LonLatDistance(lon1, lat1, lon2, lat2): phi = numpy.arccos(x.clip(-1.0, 1.0)) # radians # in m over the globe: return phi * EarthRadius # m return phi * cso_constants.EarthRadius # m # enddef # LonLatDistance Loading Loading @@ -176,7 +179,7 @@ def LonLatTrianglesArea(xx, yy): import numpy # tools: from cso_constants import EarthRadius from . import cso_constants # areas: aa = TrianglesArea(numpy.radians(xx), numpy.radians(yy)) # rad2 Loading @@ -186,7 +189,7 @@ def LonLatTrianglesArea(xx, yy): # areas: # rad2 m2 return aa * numpy.cos(yy_aver) * EarthRadius**2 # m2 return aa * numpy.cos(yy_aver) * cso_constants.EarthRadius**2 # m2 # enddef LonLatTrianglesArea Loading Loading
src/cso/cso_mapping.py +7 −4 Original line number Diff line number Diff line Loading @@ -14,6 +14,9 @@ # 2023-08, Arjo Segers # Remove rounding errors when locations are very close. # # 2026-01, Arjo Segers # Changed imports for python packaging. # ######################################################################## ### Loading Loading @@ -89,7 +92,7 @@ def LonLatDistance(lon1, lat1, lon2, lat2): import numpy # tools: from cso_constants import EarthRadius from . import cso_constants # convert: delta = lon2 - lon1 Loading @@ -102,7 +105,7 @@ def LonLatDistance(lon1, lat1, lon2, lat2): phi = numpy.arccos(x.clip(-1.0, 1.0)) # radians # in m over the globe: return phi * EarthRadius # m return phi * cso_constants.EarthRadius # m # enddef # LonLatDistance Loading Loading @@ -176,7 +179,7 @@ def LonLatTrianglesArea(xx, yy): import numpy # tools: from cso_constants import EarthRadius from . import cso_constants # areas: aa = TrianglesArea(numpy.radians(xx), numpy.radians(yy)) # rad2 Loading @@ -186,7 +189,7 @@ def LonLatTrianglesArea(xx, yy): # areas: # rad2 m2 return aa * numpy.cos(yy_aver) * EarthRadius**2 # m2 return aa * numpy.cos(yy_aver) * cso_constants.EarthRadius**2 # m2 # enddef LonLatTrianglesArea Loading