earth_2.ssc   earth_2.ssc 
// Author: Qam1 // Author: Qam1
// Name: Earth Events from Mercury // Name: Earth Events from Mercury
// License: Public Domain // License: Public Domain
// Version: 7.0 // Version: 8.0
// Description: Earth Events from Mercury // Description: Earth Events from Mercury
// Made on Stellarium 0.14.0 // Made on Stellarium 0.14.1
spd = 4; // speed for screen saver mode in seconds spd = 4; // speed for screen saver mode in seconds
long = -73.4 long = -73.4
lat = 30.1 lat = 30.1
y = core.getScreenHeight()/768; y = core.getScreenHeight()/768;
x = core.getScreenWidth()/1024; x = core.getScreenWidth()/1024;
wt = 0.05; wt = 0.05;
q = 0; q = 0;
pi = 3.14159265358979323846264338327950288419716939937510; pi = 3.14159265358979323846264338327950288419716939937510;
rad = pi/180; rad = pi/180;
deg = 180/pi; deg = 180/pi;
root = Math.pow(100,0.2); root = Math.pow(100,0.2);
degstring = "\u00B0"; degstring = "\u00B0";
core.setDeltaTAlgorithm("WithoutCorrection"); core.setDeltaTAlgorithm("WithoutCorrection");
core.setTimeRate(0);
ah = "7777-07-07T07:07:07"; //why o why is this necessary?? ah = "7777-07-07T07:07:07"; //why o why is this necessary??
id = new Array(length= 24000); id = new Array(length= 24000);
ik = new Array(length= 24000); ik = new Array(length= 24000);
ij = new Array(length= 24000); ij = new Array(length= 24000);
il = new Array(length= 24000); il = new Array(length= 24000);
im = new Array(length= 24000); im = new Array(length= 24000);
fv = new Array(length= 24000); fv = new Array(length= 24000);
fvp = new Array(length= 24000); fvp = new Array(length= 24000);
efv = new Array(length= 24000); efv = new Array(length= 24000);
skipping to change at line 50873 skipping to change at line 50875
LabelMgr.setLabelShow(txt1, true); LabelMgr.setLabelShow(txt1, true);
au = 1; au = 1;
txt1 = LabelMgr.labelScreen(lat, 20, 650, false, 10, "#FF0000"); txt1 = LabelMgr.labelScreen(lat, 20, 650, false, 10, "#FF0000");
LabelMgr.setLabelShow(txt1, true); LabelMgr.setLabelShow(txt1, true);
txt1 = LabelMgr.labelScreen(long, 20, 665, false, 10, "#FF0000"); txt1 = LabelMgr.labelScreen(long, 20, 665, false, 10, "#FF0000");
LabelMgr.setLabelShow(txt1, true); LabelMgr.setLabelShow(txt1, true);
sty = 15; sty = 55;
txt1 = LabelMgr.labelScreen("Everything", 750 * x, sty *y, false, 15,"#F9E3 97"); txt1 = LabelMgr.labelScreen("Everything", 750 * x, sty *y, false, 15,"#F9E3 97");
LabelMgr.setLabelShow(txt1, true); LabelMgr.setLabelShow(txt1, true);
txt1 = LabelMgr.labelScreen(" Oppositions", 750 * x, (sty+20)*y, false, 15 ,"#F9E397"); txt1 = LabelMgr.labelScreen(" Oppositions", 750 * x, (sty+20)*y, false, 15 ,"#F9E397");
LabelMgr.setLabelShow(txt1, true); LabelMgr.setLabelShow(txt1, true);
txt1 = LabelMgr.labelScreen(" Oppositions Cycle 1", 750 * x, (sty+40)*y, false, 15,"#F9E397"); txt1 = LabelMgr.labelScreen(" Oppositions Cycle 1", 750 * x, (sty+40)*y, false, 15,"#F9E397");
LabelMgr.setLabelShow(txt1, true); LabelMgr.setLabelShow(txt1, true);
skipping to change at line 50905 skipping to change at line 50907
txt1 = LabelMgr.labelScreen(" Venus-Earth Conjunctions", 750 * x, (sty+140 )*y, false, 15,"#F9E397"); txt1 = LabelMgr.labelScreen(" Venus-Earth Conjunctions", 750 * x, (sty+140 )*y, false, 15,"#F9E397");
LabelMgr.setLabelShow(txt1, true); LabelMgr.setLabelShow(txt1, true);
txt1 = LabelMgr.labelScreen(" Venus-Earth Conjunctions <1" + degstring, 75 0 * x, (sty+160)*y, false, 15,"#F9E397"); txt1 = LabelMgr.labelScreen(" Venus-Earth Conjunctions <1" + degstring, 75 0 * x, (sty+160)*y, false, 15,"#F9E397");
LabelMgr.setLabelShow(txt1, true); LabelMgr.setLabelShow(txt1, true);
txt1 = LabelMgr.labelScreen("Quit", 750 * x, (sty+180)*y, false, 15, "#F9E3 97"); txt1 = LabelMgr.labelScreen("Quit", 750 * x, (sty+180)*y, false, 15, "#F9E3 97");
LabelMgr.setLabelShow(txt1, true); LabelMgr.setLabelShow(txt1, true);
txt1 = LabelMgr.labelScreen("Press = / - to toggle", 680 * x, (sty+650)*y, false, 15,"#FF0000"); txt1 = LabelMgr.labelScreen("Press = / - to toggle", 680 * x, (sty+600)*y, false, 15,"#FF0000");
LabelMgr.setLabelShow(txt1, true); LabelMgr.setLabelShow(txt1, true);
txt1 = LabelMgr.labelScreen("Press [ for Keypress mode", 680 * x, (sty+670) *y, false, 15, "#FF0000"); txt1 = LabelMgr.labelScreen("Press [ for Keypress mode", 680 * x, (sty+620) *y, false, 15, "#FF0000");
LabelMgr.setLabelShow(txt1, true); LabelMgr.setLabelShow(txt1, true);
txt1 = LabelMgr.labelScreen("Press ] for Screen Saver Mode", 680 * x, (sty+ 690)*y,false, 15, "#FF0000"); txt1 = LabelMgr.labelScreen("Press ] for Screen Saver Mode", 680 * x, (sty+ 640)*y,false, 15, "#FF0000");
LabelMgr.setLabelShow(txt1, true); LabelMgr.setLabelShow(txt1, true);
txt1 = LabelMgr.labelScreen("By Qam1", 900*x, 10, false, 25, "#A0801D"); txt1 = LabelMgr.labelScreen("By Qam1", 10, 700*y, false, 25, "#A0801D");
LabelMgr.setLabelShow(txt1, true); LabelMgr.setLabelShow(txt1, true);
// Label // Label
// Get au // Get au
q = 0; q = 0;
while (q ==0) while (q ==0)
{ {
txt1 = LabelMgr.labelScreen("-->", 710*x, ((au*20)-12)*y, false, 25, "#FF00 00"); txt1 = LabelMgr.labelScreen("-->", 710*x, ((au*20)+26)*y, false, 25, "#FF00 00");
LabelMgr.setLabelShow(txt1, true); LabelMgr.setLabelShow(txt1, true);
core.wait(0.07); core.wait(0.07);
d = Math.floor(core.getJDay()); d = Math.floor(core.getJDay());
r = d; r = d;
while (d==r) while (d==r)
{ {
r = Math.floor(core.getJDay()); r = Math.floor(core.getJDay());
skipping to change at line 50975 skipping to change at line 50977
if (r - d == -sw) if (r - d == -sw)
{ {
q = 1; q = 1;
ss = 0; ss = 0;
} }
LabelMgr.setLabelShow(txt1, false); LabelMgr.setLabelShow(txt1, false);
} // end main screen } // end main screen
txt1 = LabelMgr.labelScreen("-->", 710*x, ((au*20)-12)*y, false, 25, "#FFFF FF"); txt1 = LabelMgr.labelScreen("-->", 710*x, ((au*20)+26)*y, false, 25, "#FFFF FF");
LabelMgr.setLabelShow(txt1, true); LabelMgr.setLabelShow(txt1, true);
core.wait(.5); core.wait(.5);
LabelMgr.deleteAllLabels(); LabelMgr.deleteAllLabels();
LandscapeMgr.setFlagAtmosphere(oatmo); LandscapeMgr.setFlagAtmosphere(oatmo);
LandscapeMgr.getFlagLandscape(oland); LandscapeMgr.getFlagLandscape(oland);
// Basics // Basics
skipping to change at line 51003 skipping to change at line 51005
LandscapeMgr.setFlagAtmosphere(true); LandscapeMgr.setFlagAtmosphere(true);
LandscapeMgr.setFlagLandscape(true); LandscapeMgr.setFlagLandscape(true);
p = 0; p = 0;
// Label // Label
if (ss == 0) if (ss == 0)
{ {
txt1 = LabelMgr.labelScreen("Press + for next event", 700 * x, 400*y, false , 15, "#FF0000"); txt1 = LabelMgr.labelScreen("Press = for next event", 700 * x, 400*y, false , 15, "#FF0000");
LabelMgr.setLabelShow(txt1, true); LabelMgr.setLabelShow(txt1, true);
txt1 = LabelMgr.labelScreen("Press - for previous event", 700*x, 440*y, fa lse,15, "#FF0000"); txt1 = LabelMgr.labelScreen("Press - for previous event", 700*x, 420*y, fa lse,15, "#FF0000");
LabelMgr.setLabelShow(txt1, true); LabelMgr.setLabelShow(txt1, true);
txt1 = LabelMgr.labelScreen("Press [ go back to start date ", 700*x, 460*y ,false, 15, "#FF0000"); txt1 = LabelMgr.labelScreen("Press [ go back to start date ", 700*x, 460*y ,false, 15, "#FF0000");
LabelMgr.setLabelShow(txt1, true); LabelMgr.setLabelShow(txt1, true);
txt1 = LabelMgr.labelScreen("Press ] go back to Main Menu", 700*x, 480*y, false, 15, "#FF0000"); txt1 = LabelMgr.labelScreen("Press ] go back to Main Menu", 700*x, 480*y, false, 15, "#FF0000");
LabelMgr.setLabelShow(txt1, true); LabelMgr.setLabelShow(txt1, true);
} }
skipping to change at line 51320 skipping to change at line 51322
core.stopScript(); core.stopScript();
} }
// #&!@)#& // #&!@)#&
// Find best times // Find best times
core.setDate(id[i]); core.setDate(id[i]);
jd = core.getJDay(); jd = core.getJDay();
d = jd - 2451543.5; d = jd - 2451543.5;
core.setObserverLocation(il[i], 30.1, 20, 0, "", "Mercury"); core.setObserverLocation(il[i], 30.1, 20, 0, "", "Mercury");
// Sun // Sun
w = 282.9404 + 0.0000470935 * d; w = 282.9404 + 0.0000470935 * d;
Me = 356.0470 + 0.9856002585 * d; Me = 356.0470 + 0.9856002585 * d;
e = 0.016709 - 0.000000001151 * d; e = 0.016709 - 0.000000001151 * d;
wme = w + Me; wme = w + Me;
ob = 23.439281 - 0.0000003563 * d; ob = 23.439281 - 0.0000003563 * d;
ob = ob * rad; ob = ob * rad;
if (wme < 0)
{
while (wme < 0)
{
wme = wme + 360;
}
}
if (wme > 360)
{
while (wme > 360)
{
wme = wme - 360;
}
}
EA = Me + (deg) * e * Math.sin(Me*rad) * (1 + e * Math.cos(Me*rad)); EA = Me + (deg) * e * Math.sin(Me*rad) * (1 + e * Math.cos(Me*rad));
xx = Math.cos(EA*rad) - e; xx = Math.cos(EA*rad) - e;
ysun = Math.sin(EA*rad) * Math.sqrt(1 - e*e); ysun = Math.sin(EA*rad) * Math.sqrt(1 - e*e);
r = Math.sqrt(xx*xx + ysun*ysun); r = Math.sqrt(xx*xx + ysun*ysun);
rapp = r; rapp = r;
v = Math.atan2(ysun, xx) * deg; v = Math.atan2(ysun, xx) * deg;
Lon = v + w; Lon = v + w;
skipping to change at line 51414 skipping to change at line 51399
// Earth set // Earth set
N = 48.3313 + 0.0000324587 * d; // (Long of asc. node) N = 48.3313 + 0.0000324587 * d; // (Long of asc. node)
ii = 7.0047 + 0.00000005 * d; // (Inclination) ii = 7.0047 + 0.00000005 * d; // (Inclination)
w = 29.1241 + 0.0000101444 * d; // (Argument of perihelion) w = 29.1241 + 0.0000101444 * d; // (Argument of perihelion)
a = 0.387098; // (Semi-major axis) a = 0.387098; // (Semi-major axis)
e = 0.205635 + 0.000000000559 * d; // (Eccentricity) e = 0.205635 + 0.000000000559 * d; // (Eccentricity)
Me = 168.6562 + 4.0923344368 * d; // (Mean anonaly) Me = 168.6562 + 4.0923344368 * d; // (Mean anonaly)
pet = 0; pet = 0;
pety = 0; pety = 0;
if (Me<0)
{
while (Me >0)
{
Me = Me + 360;
}
}
if (Me>360)
{
while (Me <360)
{
Me = Me - 360;
}
}
Mj = Me * rad; Mj = Me * rad;
if (Me<0)
{
while (Me >0)
{
Me = Me + 360;
}
}
if (Me>360)
{
while (Me <360)
{
Me = Me - 360;
}
}
Ms = Me * rad; Ms = Me * rad;
if (Me<0)
{
while (Me >0)
{
Me = Me + 360;
}
}
if (Me>360)
{
while (Me <360)
{
Me = Me - 360;
}
}
if (w<0)
{
while (w >0)
{
w = w + 360;
}
}
if (w>360)
{
while (w <360)
{
w = w - 360;
}
}
if (Me<0)
{
while (Me >0)
{
Me = Me + 360;
}
}
if (Me>360)
{
while (Me <360)
{
Me = Me - 360;
}
}
if (N<0)
{
while (N >0)
{
N = N + 360;
}
}
if (N>360)
{
while (N <360)
{
N = N - 360;
}
}
if (ii<0)
{
while (ii >0)
{
ii = ii + 360;
}
}
if (ii>360)
{
while (ii <360)
{
ii = ii - 360;
}
}
ii = ii * rad; ii = ii * rad;
Merad = Me * rad; Merad = Me * rad;
N = N * rad; N = N * rad;
E4 = 0; E4 = 0;
E0 = Me + e*(deg) * Math.sin(Merad) * ( 1.0 + e * Math.cos(Merad) ); E0 = Me + e*(deg) * Math.sin(Merad) * ( 1.0 + e * Math.cos(Merad) );
while (E4 == 0) while (E4 == 0)
{ {
E2 = E0 * rad; E2 = E0 * rad;
E1 = E0 - (E2 - (e * Math.sin(E2)) - (Me* rad)) / ( 1 - e * Math.cos(E2)); E1 = E0 - (E2 - (e * Math.sin(E2)) - (Merad)) / ( 1 - e * Math.cos(E2));
if (Math.abs(E1-E0)< 0.000001) if (Math.abs(E1-E0)< 0.001)
{ {
E4 = 1; E4 = 1;
} }
else else
{ {
E0 = E1; E0 = E1;
} }
} }
E0 = E1 * rad // Might as well use E0 as Radians E0 = E1 * rad // Might as well use E0 as Radians
skipping to change at line 51728 skipping to change at line 51601
LabelMgr.setLabelShow(txt1, true); LabelMgr.setLabelShow(txt1, true);
} }
txt1 = LabelMgr.labelScreen(fvp[i].toFixed(3)+"%", 195*x, 555*y, false, 20, "#AAFFAA"); txt1 = LabelMgr.labelScreen(fvp[i].toFixed(3)+"%", 195*x, 555*y, false, 20, "#AAFFAA");
LabelMgr.setLabelShow(txt1, true); LabelMgr.setLabelShow(txt1, true);
txt1 = LabelMgr.labelScreen("Illumination:", 10*x, 555*y, false, 20, "#AAFF AA"); txt1 = LabelMgr.labelScreen("Illumination:", 10*x, 555*y, false, 20, "#AAFF AA");
LabelMgr.setLabelShow(txt1, true); LabelMgr.setLabelShow(txt1, true);
txt1 = LabelMgr.labelScreen("Total Magnitude:", 10*x, 580*y, false, 20, "#A txt1 = LabelMgr.labelScreen("Earth Magnitude:", 10*x, 580*y, false, 20, "#A
AFFAA"); AFFAA");
LabelMgr.setLabelShow(txt1, true);
txt1 = LabelMgr.labelScreen(tmag.toFixed(3), 200*x, 580*y, false, 20, "#AAF
FAA");
LabelMgr.setLabelShow(txt1, true);
txt1 = LabelMgr.labelScreen("Earth Magnitude:", 10*x, 610*y, false, 20, "#A
AFFAA");
LabelMgr.setLabelShow(txt1, true); LabelMgr.setLabelShow(txt1, true);
txt1 = LabelMgr.labelScreen(emag[i].toFixed(3), 200*x, 610*y, false, 20, "# AAFFAA"); txt1 = LabelMgr.labelScreen(emag[i].toFixed(3), 200*x, 580*y, false, 20, "# AAFFAA");
LabelMgr.setLabelShow(txt1, true); LabelMgr.setLabelShow(txt1, true);
txt1 = LabelMgr.labelScreen("Moon Magnitude:", 10*x, 640*y, false, 20, "#AA FFAA"); txt1 = LabelMgr.labelScreen("Moon Magnitude:", 10*x, 605*y, false, 20, "#AA FFAA");
LabelMgr.setLabelShow(txt1, true); LabelMgr.setLabelShow(txt1, true);
if (mfv[i] < 0) if (mfv[i] < 0)
{ {
txt1 = LabelMgr.labelScreen(mfv[i].toFixed(3), 200*x, 640*y, false, 20, "#A AFFAA"); txt1 = LabelMgr.labelScreen(mfv[i].toFixed(3), 200*x, 605*y, false, 20, "#A AFFAA");
LabelMgr.setLabelShow(txt1, true); LabelMgr.setLabelShow(txt1, true);
} }
else else
{ {
txt1 = LabelMgr.labelScreen(mfv[i].toFixed(3), 205*x, 640*y, false, 20, "#A AFFAA"); txt1 = LabelMgr.labelScreen(mfv[i].toFixed(3), 205*x, 605*y, false, 20, "#A AFFAA");
LabelMgr.setLabelShow(txt1, true); LabelMgr.setLabelShow(txt1, true);
} }
txt1 = LabelMgr.labelScreen("Moon Elongation:", 10*x, 665*y, false, 20, "#A AFFAA"); txt1 = LabelMgr.labelScreen("Moon Elongation:", 10*x, 635*y, false, 20, "#A AFFAA");
LabelMgr.setLabelShow(txt1, true); LabelMgr.setLabelShow(txt1, true);
txt1 = LabelMgr.labelScreen(im[i].toFixed(3) + degstring, 205*x, 665*y, fal se, 20, "#AAFFAA"); txt1 = LabelMgr.labelScreen(im[i].toFixed(3) + degstring, 205*x, 635*y, fal se, 20, "#AAFFAA");
LabelMgr.setLabelShow(txt1, true); LabelMgr.setLabelShow(txt1, true);
if (il[i] > 0) if (il[i] > 0)
{ {
txt1 = LabelMgr.labelScreen("Viewing Longitude: " + il[i] + "E", 10*x, 695*y, false, 20, "#FF0000"); txt1 = LabelMgr.labelScreen("Viewing Longitude: " + il[i] + "E", 10*x, 665*y, false, 20, "#FF0000");
LabelMgr.setLabelShow(txt1, true); LabelMgr.setLabelShow(txt1, true);
} }
else else
{ {
txt1 = LabelMgr.labelScreen("Viewing Longitude: " + Math.abs(il[i])+"W" , 10*x, 695*y, false, 20, "#FF0000"); txt1 = LabelMgr.labelScreen("Viewing Longitude: " + Math.abs(il[i])+"W" , 10*x, 665*y, false, 20, "#FF0000");
LabelMgr.setLabelShow(txt1, true); LabelMgr.setLabelShow(txt1, true);
} }
txt1 = LabelMgr.labelScreen("Cycle: "+ cycle[i], 10*x, 505*y, false, 20, "# AAFFAA"); txt1 = LabelMgr.labelScreen("Cycle: "+ cycle[i], 10*x, 505*y, false, 20, "# AAFFAA");
LabelMgr.setLabelShow(txt1, true); LabelMgr.setLabelShow(txt1, true);
flo = Math.floor(ij[i]); flo = Math.floor(ij[i]);
// Yes an Array would be nice but for some !@^# reason it won't work so I h ave to do it the hard //way // Yes an Array would be nice but for some !@^# reason it won't work so I h ave to do it the hard //way
skipping to change at line 51850 skipping to change at line 51717
} }
if (flo == 28) if (flo == 28)
{ {
ename = "Conjunction - Earth and Venus "+ik[i].toFixed(3) + degstring; ename = "Conjunction - Earth and Venus "+ik[i].toFixed(3) + degstring;
} }
txt1 = LabelMgr.labelScreen(ename, 450*x, 0*y, false, 20, "#AAFFAA"); txt1 = LabelMgr.labelScreen(ename, 3900*x, 0*y, false, 20, "#AAFFAA");
LabelMgr.setLabelShow(txt1, true); LabelMgr.setLabelShow(txt1, true);
txt1 = LabelMgr.labelScreen(ename, 10*x, 475*y, false, 20, "#00FF71"); txt1 = LabelMgr.labelScreen(ename, 10*x, 475*y, false, 20, "#00FF71");
LabelMgr.setLabelShow(txt1, true); LabelMgr.setLabelShow(txt1, true);
txt1 = LabelMgr.labelScreen("Julian Date:", 700*x, 635*y, false, 15, "#00FF 71"); txt1 = LabelMgr.labelScreen("Julian Date:", 700*x, 635*y, false, 15, "#00FF 71");
LabelMgr.setLabelShow(txt1, true); LabelMgr.setLabelShow(txt1, true);
txt1 = LabelMgr.labelScreen(core.getJDay().toFixed(3), 775*x, 635*y, false, 15, "#00FF71"); txt1 = LabelMgr.labelScreen(core.getJDay().toFixed(3), 790*x, 635*y, false, 15, "#00FF71");
LabelMgr.setLabelShow(txt1, true); LabelMgr.setLabelShow(txt1, true);
// Wait for Keypress // Wait for Keypress
d = Math.floor(core.getJDay()); d = Math.floor(core.getJDay());
r = d; r = d;
pak = 0 pak = 0
if (ss ==1) if (ss ==1)
 End of changes. 30 change blocks. 
162 lines changed or deleted 27 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/