Skip to content

Commit 23f2ad2

Browse files
committed
Fix bug in ITRS -> lat/lon/alt conversion
1 parent c3d35c1 commit 23f2ad2

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/astroforge/coordinates/_transformations.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,10 @@ def ITRSToLatLonAlt(
694694
lat = np.pi / 2.0
695695
height = absz - b
696696

697+
# restore sign of latitude
698+
if z < 0:
699+
lat = -lat
700+
697701
return lat * 180 / np.pi, lon * 180 / np.pi, height
698702

699703

0 commit comments

Comments
 (0)