Commit 56a82e20 authored by Jacob Kaufman's avatar Jacob Kaufman
Browse files

Fixed Coordinate System

For Both Jupyter Notebook and the App
parent d6a6c55b
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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) {
@@ -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;
+4 −2
Original line number Diff line number Diff line
@@ -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)
@@ -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))