Skip to content

Commit 21fe3c8

Browse files
jvareyvarey
authored andcommitted
Fix bug in ITRS -> lat/lon/alt conversion
1 parent ddb21f4 commit 21fe3c8

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)