Loading app/src/js/AstroMath.js +4 −1 Original line number Diff line number Diff line Loading @@ -81,6 +81,7 @@ export default class AstroMath { * * @param {boolean} projection - The current projection of the map * * * @return {double} The converted longitude range. */ lonTo360(lon, projection) { Loading Loading @@ -112,7 +113,9 @@ export default class AstroMath { if (normalRange) { convertedLng *= -1; } else { convertedLng = Math.abs(convertedLng - 360); if (convertedLng < 0){ convertedLng += 360; } } return convertedLng; Loading jupyter/CartoCosmos/planetary_maps.py +4 −2 Original line number Diff line number Diff line Loading @@ -142,7 +142,8 @@ class planetary_maps: lng = -180 + (abs(lng) % 180) if self.gui.get_longitude_range().value == "0 to 360": lng += 180 if(lng < 0): lng += 360 if self.gui.get_lat_domain().value == "Planetographic": converted_latitude = Math.radians(lat) Loading @@ -155,7 +156,8 @@ class planetary_maps: if(self.gui.get_longitude_range().value == "-180 to 180"): lng *= -1 else: lng = Math.fabs(lng - 360) if (lng < 0): lng += 360 self.gui.get_lat_lon_label().value = "Lat, Lon: " + \ str(round(lat, 2)) + ", " + str(round(lng, 2)) Loading Loading
app/src/js/AstroMath.js +4 −1 Original line number Diff line number Diff line Loading @@ -81,6 +81,7 @@ export default class AstroMath { * * @param {boolean} projection - The current projection of the map * * * @return {double} The converted longitude range. */ lonTo360(lon, projection) { Loading Loading @@ -112,7 +113,9 @@ export default class AstroMath { if (normalRange) { convertedLng *= -1; } else { convertedLng = Math.abs(convertedLng - 360); if (convertedLng < 0){ convertedLng += 360; } } return convertedLng; Loading
jupyter/CartoCosmos/planetary_maps.py +4 −2 Original line number Diff line number Diff line Loading @@ -142,7 +142,8 @@ class planetary_maps: lng = -180 + (abs(lng) % 180) if self.gui.get_longitude_range().value == "0 to 360": lng += 180 if(lng < 0): lng += 360 if self.gui.get_lat_domain().value == "Planetographic": converted_latitude = Math.radians(lat) Loading @@ -155,7 +156,8 @@ class planetary_maps: if(self.gui.get_longitude_range().value == "-180 to 180"): lng *= -1 else: lng = Math.fabs(lng - 360) if (lng < 0): lng += 360 self.gui.get_lat_lon_label().value = "Lat, Lon: " + \ str(round(lat, 2)) + ", " + str(round(lng, 2)) Loading