Skip to content

Commit

Permalink
Explain better what the force_valid_coordinate function does
Browse files Browse the repository at this point in the history
  • Loading branch information
clementzach authored Feb 12, 2024
1 parent 798a8d7 commit d364b3e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions forest/jasmine/data2mobmat.py
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,13 @@ def gps_to_mobmat(

def force_valid_longitude(longitude: float) -> float:
"""Forces a longitude coordinate to be within -180 and 180
In some cases, the imputation code seems to yield out-of-range
GPS coordinates. This function wrps longitude coordinates to be back
in the correct range so an error isn't thrown.
For example, 190 would get transformed into -170.
Args:
longitude: float. The longitude to be coerced
"""
Expand Down

0 comments on commit d364b3e

Please sign in to comment.