Loading app/src/js/AstroDrawControl.js +0 −2 Original line number Diff line number Diff line Loading @@ -106,8 +106,6 @@ export default L.Control.AstroDrawControl = L.Control.Draw.extend({ let wktValue = this.wktTextBox.value; this.wktTextBox.value = ""; try { this.wkt.read(wktValue); } catch (err) { Loading app/src/js/AstroMath.js +2 −6 Original line number Diff line number Diff line Loading @@ -81,15 +81,11 @@ export default class AstroMath { * * @param {boolean} projection - The current projection of the map * * * @return {double} The converted longitude range. */ lonTo360(lon, projection) { let convertedLon = lon; if (projection === "EPSG:4326") { convertedLon -= 180; } if (convertedLon < 0) { convertedLon += 360; } Loading @@ -112,7 +108,7 @@ export default class AstroMath { if (normalRange) { convertedLng *= -1; } else { convertedLng = Math.abs(convertedLng - 360); convertedLng = 360 - convertedLng; } return convertedLng; Loading app/test/AstroMathTest.js +4 −4 Original line number Diff line number Diff line Loading @@ -70,10 +70,10 @@ describe('Testing AstroMath Functions', function() { }) // testing lonTo360 function it('Testing lonTo360 Non-Cylindrical: -180 should be 0 ', function() { it('Testing lonTo360 Non-Cylindrical: -180 should be 180 ', function() { // add an assertion let majorRadius = testMath.lonTo360(-180, ""); expect(majorRadius).to.equal(0); expect(majorRadius).to.equal(180); }) // testing domainToPositiveWest function Loading @@ -86,8 +86,8 @@ describe('Testing AstroMath Functions', function() { // testing domainToPositiveWest function it('Testing domainToPositiveWest Not Normal Range: 0 should be 360 ', function() { // add an assertion let majorRadius = testMath.domainToPositiveWest(0, false); expect(majorRadius).to.equal(360); let majorRadius = testMath.domainToPositiveWest(-180, false); expect(majorRadius).to.equal(180); }) // testing wrapLongitude function Loading jupyter/CartoCosmos/planetary_maps.py +4 −3 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ class planetary_maps: :type targetName: String :param targetName: The name of the target you wish to map. """ self.target_name = targetName self.target_name = targetName.lower() self.layers = [] self.overlays = [] self.planet_map = None Loading 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,7 @@ class planetary_maps: if(self.gui.get_longitude_range().value == "-180 to 180"): lng *= -1 else: lng = Math.fabs(lng - 360) lng = 360 - lng self.gui.get_lat_lon_label().value = "Lat, Lon: " + \ str(round(lat, 2)) + ", " + str(round(lng, 2)) Loading jupyter/docs/Source/CartoCosmos.rst→jupyter/docs/CartoCosmos.rst +0 −0 File moved. View file Loading
app/src/js/AstroDrawControl.js +0 −2 Original line number Diff line number Diff line Loading @@ -106,8 +106,6 @@ export default L.Control.AstroDrawControl = L.Control.Draw.extend({ let wktValue = this.wktTextBox.value; this.wktTextBox.value = ""; try { this.wkt.read(wktValue); } catch (err) { Loading
app/src/js/AstroMath.js +2 −6 Original line number Diff line number Diff line Loading @@ -81,15 +81,11 @@ export default class AstroMath { * * @param {boolean} projection - The current projection of the map * * * @return {double} The converted longitude range. */ lonTo360(lon, projection) { let convertedLon = lon; if (projection === "EPSG:4326") { convertedLon -= 180; } if (convertedLon < 0) { convertedLon += 360; } Loading @@ -112,7 +108,7 @@ export default class AstroMath { if (normalRange) { convertedLng *= -1; } else { convertedLng = Math.abs(convertedLng - 360); convertedLng = 360 - convertedLng; } return convertedLng; Loading
app/test/AstroMathTest.js +4 −4 Original line number Diff line number Diff line Loading @@ -70,10 +70,10 @@ describe('Testing AstroMath Functions', function() { }) // testing lonTo360 function it('Testing lonTo360 Non-Cylindrical: -180 should be 0 ', function() { it('Testing lonTo360 Non-Cylindrical: -180 should be 180 ', function() { // add an assertion let majorRadius = testMath.lonTo360(-180, ""); expect(majorRadius).to.equal(0); expect(majorRadius).to.equal(180); }) // testing domainToPositiveWest function Loading @@ -86,8 +86,8 @@ describe('Testing AstroMath Functions', function() { // testing domainToPositiveWest function it('Testing domainToPositiveWest Not Normal Range: 0 should be 360 ', function() { // add an assertion let majorRadius = testMath.domainToPositiveWest(0, false); expect(majorRadius).to.equal(360); let majorRadius = testMath.domainToPositiveWest(-180, false); expect(majorRadius).to.equal(180); }) // testing wrapLongitude function Loading
jupyter/CartoCosmos/planetary_maps.py +4 −3 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ class planetary_maps: :type targetName: String :param targetName: The name of the target you wish to map. """ self.target_name = targetName self.target_name = targetName.lower() self.layers = [] self.overlays = [] self.planet_map = None Loading 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,7 @@ class planetary_maps: if(self.gui.get_longitude_range().value == "-180 to 180"): lng *= -1 else: lng = Math.fabs(lng - 360) lng = 360 - lng self.gui.get_lat_lon_label().value = "Lat, Lon: " + \ str(round(lat, 2)) + ", " + str(round(lng, 2)) Loading