Skip to content

Commit

Permalink
Updated Uranus magnetic field definition and added workaround for DAT…
Browse files Browse the repository at this point in the history
….gui bug. Updated to v0.7.
  • Loading branch information
Chris Arridge committed Mar 5, 2020
1 parent 2afc64a commit 8b94393
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 24 deletions.
13 changes: 13 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Change history

## Version 0.7 - 2020-03-05 - Josh Wiggs <[email protected]> and Chris Arridge <[email protected]>/Lancaster University
* Configuration data for each of the planets has been changed from a Javascript
file dumping data into the global space into a JSON file from which each
planet is setup dynamically.
* Meta data added to each planet including notes about origins of definitions.
* Added 'Show Information' button in the GUI to show meta data for each planet.
* CSS Fixes.
* Updated Uranus magnetic field definition to reflect that Uranus is rendered using
the IAU pole definition. This was incorrectly applied in the previous version.
* Fixed bug where the NumberControllerBox in DAT.gui could not be adjusted using
the text boxes. Added work-around by removing .listen() and adding an explicit
update when each planet changes (e.g., https://github.com/dataarts/dat.gui/issues/179).

## Version 0.6b - 2019-09-19 - Chris Arridge <[email protected]>/Lancaster University
* Fixed moon orbit bug where moons would continue to orbit the planet when auto
rotate was turned off. Also fixed bug where moons would not respond to changes in speedup factor.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Ikuchi refers to a [supernatural sea creature](https://en.wikipedia.org/wiki/Iku
Just copy the `Ikuchi` `source` folder somewhere on your machine. The folder can be renamed. The `Ikuchi.html` file must be in the same location as the `js` and `css` folders.

## Licence
Copyright (C) 2019 Chris Arridge and Lancaster University
Copyright (C) 2019-2020 Chris Arridge, Josh Wiggs and Lancaster University

This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Expand Down Expand Up @@ -72,11 +72,11 @@ The GUI controls include a number of customisation controls that allow the user

## Future work
Features that are being developed are:
* Add magnetopause and bow shock models.
* Add custom magnetic field models (e.g., traces from 'geopack' and spherical harmonic internal field models).
* Modify planets so that they are biaxial ellipsoids to account for the polar flattening of the giant planets.
* Colour surface by field strength.
* Add magnetic equator to planet surface.
* Add magnetopause and bow shock models.
* Add custom magnetic field models (e.g., traces from 'geopack' and spherical harmonic internal field models).
* Add current sheet surfaces.
* Add aurora rendering.
* Add time series widget to show dipole-Sun vector attack angle.
Expand Down
Binary file modified default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified neptune.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions source/ikuchi.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Ikuchi 0.6b (2019-09-19) - Simple Magnetosphere Viewer</title>
<title>Ikuchi 0.7 (2020-03-05) - Simple Magnetosphere Viewer</title>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"/>

Expand All @@ -17,8 +17,8 @@
<script type='text/javascript' src='js/lib/Projector.js'></script>
<script type='text/javascript' src='js/lib/SVGRenderer.js'></script>
<script type='text/javascript' src='js/lib/dat.gui.min.js'></script>

<script type='text/javascript' src='js/ikuchi-pregenerated.js'></script>
<script type='text/javascript' src='js/ikuchi-planets.js'></script>
<script type='text/javascript' src='js/ikuchi-ringsandstuff.js'></script>
<script type='text/javascript' src='js/ikuchi.js'></script>

Expand All @@ -35,14 +35,14 @@
<span id="closeButton" class="close">&times;</span>
</div>
<div class="text">
<h1>Ikuchi v0.6b (2019-09-19)</h1>
<h1>Ikuchi v0.7 (2020-03-05)</h1>
<p>Ikuchi is designed for quickly viewing the realistic 3D and time-dependent geometry of giant planet magnetospheres, particularly Uranus and Neptune. For more details see the included documentation in <strong>README.md</strong>. The word Ikuchi refers to a <a href="https://en.wikipedia.org/wiki/Ikuchi" target="_blank">supernatural sea creature</a> from <a href="https://en.wikipedia.org/wiki/Y%C5%8Dkai" target="_blank">Japanese legend</a>. In some depictions they appear as a sort of Kraken with tentacles that they uses to envelop passing ships.</p>

<p>Contributors: <a href="https://www.lancaster.ac.uk/physics/about-us/people/chris-arridge" target="_blank">Chris Arridge</a> (<a href="https://www.lancaster.ac.uk/physics/research/astrophysics/space-and-planetary-physics/" target="_blank">Lancaster University</a>) and <a href="https://www.lancaster.ac.uk/physics/about-us/people/josh-wiggs" target="_blank">Josh Wiggs</a> (<a href="https://www.lancaster.ac.uk/physics/research/astrophysics/space-and-planetary-physics/" target="_blank">Lancaster University</a>).</p>

<p>The tool also uses texture maps from <a href="http://planetpixelemporium.com/planets.html" target="_blank">Planet Pixel Emporium</a> which are copyright James Hastings-Trew. This about box image uses a texture by <a href="https://www.freepik.com/efe-madrid" target="_blank">efe_madrid</a>. The artwork itself was inspired by the works of <a href="https://en.wikipedia.org/wiki/Toriyama_Sekien" target="_blank">Sano Toyofusa</a> and <a href="https://en.wikipedia.org/wiki/Hokusai" target="_blank">Katsushika Hokusai</a>.</p>

<p><strong>Copyright (c) 2019 Lancaster University.</strong></p>
<p><strong>Copyright (c) 2019-2020 Lancaster University.</strong></p>
<p>This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.</p>
<p>This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the <a href="https://www.gnu.org/licenses/" target="_blank">GNU General Public License</a> for more details.</p>
<p>You should have received a copy of the GNU General Public License along with this program. If not, see <a href="https://www.gnu.org/licenses/" target="_blank">GNU Licences</a>.</p>
Expand Down
27 changes: 16 additions & 11 deletions source/js/ikuchi.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
*** @file Provides all the GUI functions for Ikuchi.
*** @author Chris Arridge, Lancaster University <[email protected]>
*** @version 6
*** @version 7
*** @copyright Lancaster University (2019)
*** @licence GNU GPL v3.
**/
Expand Down Expand Up @@ -104,7 +104,7 @@ class Ikuchi {
this.planetObjects = new Map();
}

/** Add planet (defined in an object literal - see ikuchi-planets.js) to the app.
/** Add planet (defined in an object literal - see planets.js) to the app.
***
*** @param {object} pl The object literal defining the planet.
**/
Expand Down Expand Up @@ -287,15 +287,15 @@ class Ikuchi {
// init GUI.
this.gui = new dat.GUI({height : 5 * 32 - 1});
this.gui.add(this, 'autoRotate').name('Auto rotate')
this.gui.add(this, 'speedUp').name('Speed').min(100.0).max(10000.0).step(1.0).listen();
this.gui.add(this, 'rotationY').name('Obliquity').min(-90.0).max(90.0).step(5.0).listen();
this.gui.add(this, 'rotationZ').name('Orbital Phase').min(0.0).max(360.0).step(10.0).listen();
this.gui.add(this, 'dipolePoleColatitude').name('Dipole Colatitude').min(0.0).max(180.0).step(5.0).listen().onChange(this.onChangeDipoleProperties.bind(this));
this.gui.add(this, 'dipolePoleLongitude').name('Dipole Longitude').min(0.0).max(360.0).step(5.0).listen().onChange(this.onChangeDipoleProperties.bind(this));
this.gui.add(this, 'dipoleOriginX').name('Dipole x0').min(-1.0).max(1.0).step(0.02).listen().onChange(this.onChangeDipoleProperties.bind(this));
this.gui.add(this, 'dipoleOriginY').name('Dipole y0').min(-1.0).max(1.0).step(0.02).listen().onChange(this.onChangeDipoleProperties.bind(this));
this.gui.add(this, 'dipoleOriginZ').name('Dipole z0').min(-1.0).max(1.0).step(0.02).listen().onChange(this.onChangeDipoleProperties.bind(this));
this.gui.add(this, 'rotationPeriod').name('Rotation Period').min(9.0).max(29.0).step(0.05).listen();
this.gui.add(this, 'speedUp').name('Speed').min(100.0).max(10000.0).step(1.0);
this.gui.add(this, 'rotationY').name('Obliquity').min(-90.0).max(90.0).step(5.0);
this.gui.add(this, 'rotationZ').name('Orbital Phase').min(0.0).max(360.0).step(10.0);
this.gui.add(this, 'dipolePoleColatitude').name('Dipole Colatitude').min(0.0).max(180.0).step(5.0).onChange(this.onChangeDipoleProperties.bind(this));
this.gui.add(this, 'dipolePoleLongitude').name('Dipole Longitude').min(0.0).max(360.0).step(5.0).onChange(this.onChangeDipoleProperties.bind(this));
this.gui.add(this, 'dipoleOriginX').name('Dipole x0').min(-1.0).max(1.0).step(0.02).onChange(this.onChangeDipoleProperties.bind(this));
this.gui.add(this, 'dipoleOriginY').name('Dipole y0').min(-1.0).max(1.0).step(0.02).onChange(this.onChangeDipoleProperties.bind(this));
this.gui.add(this, 'dipoleOriginZ').name('Dipole z0').min(-1.0).max(1.0).step(0.02).onChange(this.onChangeDipoleProperties.bind(this));
this.gui.add(this, 'rotationPeriod').name('Rotation Period').min(9.0).max(29.0).step(0.05);
this.gui.add(this, 'rotationReversed').name('Reverse Rotation').listen().onChange(this.onChangeRotationReversed.bind(this));
this.gui.add(this, 'planetaryInfo').name('Show Information');
this.gui.add(this, 'captureSVG').name('Capture SVG Code');
Expand Down Expand Up @@ -772,6 +772,11 @@ class Ikuchi {

this.guiFolderPlanets.add(this.ringVisible, this.nameToLabel(cPlanet.discreteRingNames[i],'ring')).name(cPlanet.discreteRingNames[i]).onChange(this.onChangeRingVisibility.bind(this));
}

// update GUI display
for (i in this.gui.__controllers) {
this.gui.__controllers[i].updateDisplay();
}
}

/** Show/hide moons and their orbits. **/
Expand Down
12 changes: 6 additions & 6 deletions source/js/planets.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ planets = {
"planetTexture": textureUranus,
"eventLabels": ["Now","Voyager 2","Vernal Equinox","NH Summer Solstice","Autumnal Equinox","SH Summer Solstice"],
"eventTimes": ["1986-01-24","1966-02-03","1985-10-06","2007-12-16","2030-04-19"],
"dipolePoleColatitude": -60.0,
"dipolePoleLongitude": 48.0,
"dipoleOrigin": [-0.02,0.02,0.31],
"dipolePoleColatitude": 120.0,
"dipolePoleLongitude": 0.0,
"dipoleOrigin": [0.0,0.0,0.31],
"yFunction": rotyUranus,
"zFunction": rotzUranus,
"moonNames": ["Mab","Miranda","Ariel","Umbriel","Titania","Oberon"],
Expand All @@ -166,10 +166,10 @@ planets = {
"meta": {
"author": "C. Arridge, Lancaster University & J. A. Wiggs, Lancaster University",
"contact":"[email protected]",
"version": 5,
"copyright": "Lancaster University (2019)",
"version": 6,
"copyright": "Lancaster University (2019-2020)",
"licence": "GNU GPL v3",
"text": "Equinox and solstice times are from Meeus, J (1997) 'Equinoxes and solstices on Uranus and Neptune' J. Brit. Astronomical Assoc. 107(6), p332, http://adsabs.harvard.edu/full/1997JBAA..107..332M <br><br>Moon and ring data from PDS: https://pds-rings.seti.org/uranus/uranus_tables.html <br><br>Eccentric dipole properties from Connerney, J.E.P. (1993) 'Magnetic fields of the outer planets' J. Geophys. Res. 98(E10) 18659-18679. Note that since the dipole properties were derived in a frame where the north pole was coincident with the rotational pole (i.e., opposite to the IAU definition we use here) the dipole z offset and latitude are swapped from those quoted in Connerney (1993)."
"text": "Equinox and solstice times are from Meeus, J (1997) 'Equinoxes and solstices on Uranus and Neptune' J. Brit. Astronomical Assoc. 107(6), p332, http://adsabs.harvard.edu/full/1997JBAA..107..332M <br><br>Moon and ring data from PDS: https://pds-rings.seti.org/uranus/uranus_tables.html <br><br>Eccentric dipole properties from Connerney, J.E.P. (1993) 'Magnetic fields of the outer planets' J. Geophys. Res. 98(E10) 18659-18679. Note that since the dipole properties were derived in a frame where the north pole was coincident with the rotational pole (i.e., opposite to the IAU definition we use here) the colatitude is swapped from 60 degrees quoted in Connerney (1993) to 120 degrees to place the dipole north pole in the rotational northern hemisphere. We also invert the z0 position of the dipole from -0.31 to 0.31 Ru to reflect the definitions used here. In lieu of a new fit in the IAU coordinate system we simply set the dipole longitude, x0 and y0 to zero."
}
},
"planetNeptune": {
Expand Down
Binary file modified uranus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8b94393

Please sign in to comment.