Skip to content

Commit

Permalink
make format
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminPelletier committed Nov 14, 2023
1 parent 9d3e43f commit 959ffc7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions monitoring/monitorlib/geo.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,11 +483,16 @@ def egm96_geoid_offset(p: s2sphere.LatLng) -> float:
if _egm96 is None:
grid_size = 0.25 # degrees
grid_path = os.path.join(os.path.dirname(__file__), "assets/WW15MGH.DAC")
grid = np.fromfile(grid_path, '>i2').reshape(int(180 / grid_size + 1), int(360 / grid_size)) / 100
grid = (
np.fromfile(grid_path, ">i2").reshape(
int(180 / grid_size + 1), int(360 / grid_size)
)
/ 100
)
_egm96 = Spline(
np.arange(-90, 90 + grid_size / 2, grid_size),
np.arange(0, 360, grid_size),
grid
grid,
)
lng = math.fmod(p.lng().degrees, 360)
while lng < 0:
Expand Down

0 comments on commit 959ffc7

Please sign in to comment.