//
// Author: Qam1
// Name: Double eclipse from Deimos in 2017
// Version 5.1
// License: Public Domain
// Description: Just before Mars eclipses the sun, Phobos pops out from behind and eclipses it first. Takes place between Scorpio and Sagittarius on April 26, 2017.
//

core.setDate("2017-04-26T18:48:50", "utc");

long = 0.61;
alt = 0

while (alt < 20)
{
    long = long + 45;

    if (long > 360)
    {
	long = long - 360
    }

    core.setObserverLocation(long, -37.50, 17, 0, "", "Deimos");

    core.wait(0.1);

    SData = core.getObjectInfo("Sun");
    alt = SData["altitude"];

}



LandscapeMgr.setFlagAtmosphere(false);
LandscapeMgr.setFlagFog(false);
LandscapeMgr.setCurrentLandscapeID("moon");

core.selectObjectByName("Sun", pointer = true);

StelMovementMgr.setFlagTracking(true);
StelMovementMgr.zoomTo(14, 1);

core.setTimeRate(10);
core.wait(25);
core.selectObjectByName("Phobos", pointer = true);
core.setTimeRate(10);
