// Name: Moon Hopping // Author: Jason Hooper // Date: 2 July 2018 // About: Moon hopping, up to Saturn. See the planets up close from their innermost // moons, working outwards. Includes Earth and the four Galilean moons of Jupiter. var cameras = [ { name: "Earth", from: "Moon", fov: 40 , wait: 1, constellations: true }, { name: "Mars", from: "Phobos", fov: 40 , wait: 2 }, { name: "Phobos", from: "Deimos", fov: 40 , wait: 3 }, { name: "Jupiter", from: "Io", fov: 40 , wait: 2 }, { name: "Io", from: "Europa", fov: 40 , wait: 3 }, { name: "Europa", from: "Ganymede", fov: 40 , wait: 3 }, { name: "Ganymede", from: "Callisto", fov: 40 , wait: 3 }, { name: "Saturn", from: "Mimas", fov: 40 , wait: 2 }, { name: "Mimas", from: "Rhea", fov: 40 , wait: 5 } ]; // Set various display attributes core. setRealTime(); core. setGuiVisible(false); core. setMinFps(1); SolarSystem. setFlagLabels(true); SolarSystem. setLabelsAmount(1); StarMgr. setLabelsAmount(0); StelMovementMgr. setEquatorialMount(true); GridLinesMgr. setFlagEclipticLine(true); GridLinesMgr. setColorEclipticLine(Vec3f(0.3, 0.2, 0.2)); ConstellationMgr.setLinesColor (Vec3f(0.1, 0.2, 0.3)); ConstellationMgr.setLabelsColor(Vec3f(0.1, 0.2, 0.3)); ConstellationMgr.setFlagBoundaries(false); var wait = 60; // Number of seconds to wait between camera changes, multiplied by camera.wait var zoomSec = 0; // Duration of zooms (0 for instant) var round = 1; var i = 0; while(true) { var camera = cameras[i]; ConstellationMgr.setFlagLines(camera.constellations || false); // Toronto latitude/longitude core.setObserverLocation(43.65, 79.38, 100, 0, "", camera.from); // Newer versions of Stellarium keep different landscape states for each planet/moon so we have to hide it for each hideLandscape(); core.selectObjectByName(camera.name, false); StelMovementMgr.setFlagTracking(true); core.wait(camera.spinWait || 0); StelMovementMgr.zoomTo(camera.fov, camera.z || zoomSec); core.wait(camera.z || zoomSec); core.wait(2); core.setMinFps(1); core.wait(camera.wait * wait); core.setMinFps(25); core.wait(2); if (++i == cameras.length) { round++; i = 0; // Show planet/moon labels every few rounds SolarSystem.setFlagLabels(round % 5 == 1); } } function hideLandscape() { LandscapeMgr.setFlagAtmosphere(false); LandscapeMgr.setFlagLandscape(false); LandscapeMgr.setFlagFog(false); LandscapeMgr.setFlagCardinalPoints(false); }