<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
<head>
<title>[Sonnen- und Mondfinsterisse]>/title>
<meta http-equiv='cache-control' content='no-cache'>
<meta http-equiv='expires' content='0'>
<meta http-equiv='pragma' content='no-cache'>
<style>
/* ******************************
* ID des Body Tag Schriftfarbe
* und Hintergrundfarbe.
* ID of the body tag font color
* and background color.
*******************************/
#b {
background-color: #293133;
color: #eadebd;
border: 0px solid red;
}
/* ******************************
* Tabellenspalten Beschreibung.
* Table Columns Description.
*******************************/
#label {
width: 120px;
text-align: right;
font-family: Tahoma,Arial,Helvetica;
font-size: 14 px;
font-weight: 500;
}
/* ******************************
* Tabellenspalten Werte.
* Table column values.
*******************************/
#value {
width: 100px;
text-align: right;
font-family: Tahoma,Arial,Helvetica;
font-size: 14 px;
font-weight: 500;
}
/* ******************************
* Wichtige Werte markieren.
* Mark important values.
*******************************/
.color {
color: red;
}
/* ******************************
* HTML input-Tag.
* HTML-Eingabe-Tag.
*******************************/
input {
font-family: Tahoma,Arial,Helvetica;
font-size: 14 px;
font-weight: 500;
}
/* ******************************
* HTML td-Tag.
* HTML-Spalten-Tag der textarea.
*******************************/
#output {
text-align: center;
}
/* ******************************
* HTML textarea-Tag.
* HTML-Textausgabe-Tag.
*******************************/
#text{
width: 600px;
height: 300px;
background-color: black;
color: white;
}
>/style>
<script type="text/javascript" src="https://ajax.microsoft.com/ajax/jQuery/jquery-1.4.2.min.js"></script>
<script>
// Mit der Ausführung warten bis DOM geladen ist.
// With the execution wait until DOM is loaded.
document.addEventListener("DOMContentLoaded", function(event) {
/* **************************** Externe Quelldateien Laden *********************************************** */
// Funktion zum Einfügen der einzelnen Javascript Dateien.
// Function to insert the individual Javascript files.
function include(file) {
var script = document.createElement('script');
script.src = file;
script.type = 'text/javascript';
script.defer = true;
document.getElementsByTagName('head').item(0).appendChild(script);
}
// Variablendefinitionen und Deklarationen ...
// definitions of variables and declarations ...
include('./Globale-This.js');
// Keyboard Event Funktionen, die von den Listenern benutzt werden
// Datei muss hier lokal liegen, da andere Kontrollelemente verwendet werden
include('./Keyboard.js');
// Keyboard Eventlistener
// Datei muss hier lokal liegen, da andere Kontrollelemente verwendet werden
include('./Keyboard-Listener.js');
// Nützliche Funktionen wie Sommerzeit/Winterzeit, Popup Öffnen ...
// Useful functions like Daylight Savings Time, open popups ...
include('../../Bibliotheken/Utilities.js');
// Funktionen zur Berechnungen/Konvertierung des Julianischen Datum
// Functions for calculations/conversion of the Julian date
include('../../Bibliotheken/calculateJD.js');
// Konvertierung von Uhrzeiten
// Conversion of times
include('../../Bibliotheken/decTime.js');
// Funktionen für die Mondpositionen
// Functions for the moon positions
include('../../Bibliotheken/NewFullMoon.js');
// Funktionen für die Mondpositionen
// Functions for the moon positions
include('../../Bibliotheken/Moonpositions.js');
// Funktionen für die Sonnenpositionen
// Functions for the sun positions
include('../../Bibliotheken/Sunpositions.js');
// Funktionen für die Sternzeit/Lokale Zeit
// Functions for the siderial/local time
include('../../Bibliotheken/SiderialTime.js');
// Funktionen für Sonnen Auf- und Untergang
// Functions for the sunrise and sunset
include('../../Bibliotheken/SunRiseSet.js');
// Funktionen für Mond Auf- und Untergang
// Functions for the moonrise and moonset
include('../../Bibliotheken/MoonRiseSet.js');
// Funktionen für die Berechnung der Objekthöhe über dem Horizont
// Functions for calculating the object height above the horizon
include('../../Bibliotheken/ObjectHeight.js');
// Alles geladen inklusive Bilder.
// Funktioniert nicht alleine: DOM muss vorher geleden sein und danach erst
// der Windows Event Load.
// All loaded including pictures. // Does not work alone: DOM must be leden before and after
// the Windows Event Load.
window.addEventListener("load", function(){
//Füllen der Datumsfelder mit dem aktuellen Datum.
//Fill the date fields with the current date.
objDay.value = d.getDate(); // Tag - Day
objMonth.value = d.getMonth() + 1; // Monat - Month
objYear.value = d.getFullYear(); // Jahr - Year
/* ********************** Funktionen die beim Laden ausgeführt werden ************************ */
/* ******************************** Functions performed at loading ********************************* */
// Teste, ob der Rechner auf Sommer- o. Winterzeit steht ...
// Test whether the computer is set to summer or winter time . . .
ISDST = isDST(new Date(objYear.value, objMonth.value, objDay.value, 0, 0, 0, 0));
// ... und stelle das Ausgabefeld so ein. Sommerzeit = 1, Winterzeit = 0
// . . . and set the output field like this. DST = 1, winter time = 0
if (ISDST)objDST.value = 1; else objDST.value = 0;
// Ermittle die Zeitzone aus dem Datum des Rechners ...
// Identify the time zone from the date of the computer.
TZ = getTZ();
// ... ist er negativ geht's nach Osten, ansonsten nach Westen und
// im entsprechenden Ausgabefeld eintragen.
//
//. . . is he negative’s going east, otherwise to the west and Enter
// in the corresponding output field.
if (TZ < 0)objTZ.value = Math.abs(TZ);else objTZ.value = TZ;
/* ***************************************************GeoPosition******************************************************* */
// Hole Dir die Positionsdaten des Rechners und übergebe dabei die
// Ergebnisfelder für Längengrad, Breitengrad und Genauigkeit.
// Get the position data of the computer and hand over the
// Result fields for longitude, latitude.
// In Utilities.js
startGeoPosition(objLambda, objBeta, 0);
/* ********************** Verwendete/Used Event Listener ************************ */
// Klick auf die Checkbox "Ganzes Jahr" und den Ergebnisstring
// Löschen und in der Textbox ausgeben.
// Click on the checkbox “Fully Year” and the result string
// Delete and output in the text box.
objCalcYear.addEventListener("click", function(){
// Ausgabe String Löschen und Ausgeben
// Output string delete and output
s = "";
objText.value = s;
});
// Erstellt einen neuen Kommuikationskanal an dem alle Hören und damit
// Senden können.
// Creates a new communication channel where all listening and thus
// Can send.
var objChannel = new BroadcastChannel("com");
// Wenn das SiderialTime Program beendet wird, dann Sende auf dem Kanal
// diese Info, damit in Wordpress die Fenstervariable wieder zurückgesetzt
// wird und das Programm wieder starten kann.
// If the SiderialTime Program is terminated, then send on the channel
// this info, so that in Wordpress the window variable is reset
// and the program can start again.
window.addEventListener("beforeunload", function(event){
objChannel.postMessage("moonsuneclipse is closed");
});
// Klick auf den Button "Berechnen" ... Programm startet hier ...
// Click on the button "Calculate" . . . Program starts here . . .
objCalc.addEventListener("click", function () {
// Ergebnisarrays für Voll- und Neumond Löschen
// Delete result arrays for full and new moon
arrFullMoon = [];
arrNewMoon = [];
// Startet die Berechnung
// Starts the calculation
start();
// Hier wurde eine Sonnen/Mondfinsternis nur für den aktuellen Monat berechnet und
// es erfolgt die Ausgabe für die Überschrift ...
// Here a solar/lunar eclipse was calculated for the current month only and
// the output for the heading ...
if(arrFullMoon.length == 1 && arrNewMoon.length == 1){
if ( objCalcYear.checked == false) objText.style.visibility = "visible";
s += "\nBerechnung von Mond- und Sonnenfinsternis am: " + objDay.value + "." + objMonth.value + "." + objYear.value + "\n";
s += "_________________________________________________________________\n\n";
// Hier wurde eine Sonnen/Mondfinsternis für das gesamte Jahr berechnet und
// es erfolgt die Ausgabe für die Überschrift ...
// Here a solar/lunar eclipse has been calculated for the whole year and
// the output for the heading ...
} else if (arrFullMoon.length == 12 && arrNewMoon.length == 12){
s += "\nBerechnung von Mond- und Sonnenfinsternis für das Jahr: " + objYear.value + "\n";
s += "______________________________________________________________________\n\n";
// Hier ist ein Fehler bei der Berechnung aufgetreten ...
// Here an error occurred during the calculation ...
}else
s += "Fehler bei der Berechnung zur Mond- oder Sonnenfinsternis\n";
// *************************************** Mondfinsternis/Lunar eclipse************************************
// Array für Tag, Monat und Jahr des Ereignisses löschen ...
// Delete array for day, month and year of the event ...
arrDate = [];
// Überschrift - Head line
s += "Mondfinsternis:\n";
s += "_______________\n\n";
// Iteriere durch das gesamte Ergebnisarray ..
// Iterate through the entire result array ....
for (var a in arrFullMoon){
// ... und zuerst Datum-LCT-UT extrahieren ...
// [0] = Tag.Monat.Jahr
// [1] = LCT = Lokale Uhrzeit als Stunden und Stunde,dezimaler Anteil
// [2] = UT = Greenwich Universal Time als dezimaler Tagesanteil
// ... and first extract date-LCT-UT ...
// [0] = Day . Month . Year
// [1] = LCT = Local time as hours and hour,decimal proportion
// [2] = UT = Greenwich Universal Time as a decimal share of the day
arrFullMoonSplited = arrFullMoon[a].split("-");
// ... dann die einzelnen Komponenten des Datums Stunde, Minute, Sekunde ...
// [0] = Stunde
// [1] = Minute
// [2] = Sekunde
// ... then the individual components of the date hour, minute, second ...
// [0] = Hour
// [1] = Minute
// [2] = Second
arrDate = arrFullMoonSplited[0].split(".");
// ... und nun Greenwich Tag speichern ...
// ... and now Greenwich tag save ...
GDayFull = Number(arrDate[0]);
// ... und nun Greenwich Monat speichern ...
// ... and now Greenwich month save ...
GMonthFull = Number(arrDate[1]);
// ... und nun Greenwich Jahr speichern ...
// ... and now Greenwich year save ...
GYearFull = Number(arrDate[2]);
// ... und nun Grennwich UT speichern ...
// ... and now Greenwich universal time save ...
GUTFull = Number(arrFullMoonSplited[2]);
// ... und nun Lokale Zeit der Zeitzone speichern ...
// ... and now local time of time zone save ...
GLCTFull = Number(arrFullMoonSplited[1]);
// Nimmt das Ergebnis des Tests auf Mondfinsternis bei Vollmond auf
// Receives the result of the test for solar eclipse at new moon
moonEclipse = sunMoonEventsOccur(objDST.value, objTZ.value, arrFullMoonSplited[3], arrFullMoonSplited[4], arrFullMoonSplited[5], "Moon");
// Ergebnisteilstring zusammenstellen aus Vollmond Datum, Ereignis und Länge- und Breite des
// Beobachtungsorts ...
// compile result string from full moon Date, Event and Length and Width
// Observation sites ...
sMoonEclipse = "Vollmond :\t\t" + GDayFull + "." + GMonthFull + "." + GYearFull + " Lokale Zeit:" + dectime2Time(GLCTFull, "string")
+ "\nEreignis:\t\t" + moonEclipse + "\n";
sMoonEclipse += "Ort:\t\t\tLängengrad=" + Number(objLambda.value).toFixed(3) + "° Breitengrad=" + Number(objBeta.value).toFixed(3) + "°\n";
// ... und wenn es ein Ereignis gibt, dann zum Ausgabestring "s" hinzufügen ...
// ... and if there is an event, then add “s” to the output string ...
if (moonEclipse != ""){
s += sMoonEclipse;
// ... oder auch eine Fehlermeldung ...
// ... or an error message ...
}else{
s += "Fehler bei der Berechnung zur Mondfinsternis bei Vollmond\n";
}
// ... die Verhältnisse der Mondfinsternis ermitteln, hier der Grad der Bedeckung ...
// Degree of occulation at lunar eclipse
magLunar = magLunarEclipse(arrFullMoonSplited[6], objTZ.value, moonEclipse);
// ... bei dem Wert -99 gibt es zwar eine Mondfinsternis, aber sie ist an dem Ort Länge und Breitengrad
// nicht sichtbar ...
// ... at the value -99 there is indeed a lunar eclipse, but it is at the place longitude and latitude
// not visible ...
if ( (magLunar[0] == -99) || (magLunar[0] == 0) ){
s+= "Magnitude:\t\t" + 0.0 + " Bedeckung: " + (0.0 * 100).toFixed(3) + " %\n";
s += "\t\t\tKeine Mondfinsternis an diesem Ort ";
// ... Mondfinsternis ist hier an dem Ort sichtbar ...
// ... lunar eclipse is visible here at the place ...
}else{
s+= "Magnitude:\t\t" + (magLunar[0]).toFixed(3) + " Bedeckung: " + (magLunar[0] * 100).toFixed(3) + " %\n";
s += "UT Start pen. Phase:\t" + dectime2Time( magLunar[1], "string") + "\n";
s += "UT Start umbrale. Phase:" + dectime2Time(magLunar[2], "string") + "\n";
s += "UT Start Totale Phase:\t" + dectime2Time(magLunar[3], "string") + "\n";
s += "UT Mitte Totale Phase:\t" + dectime2Time(magLunar[4], "string") + "\n";
s += "UT Ende Totale Phase:\t" + dectime2Time(magLunar[5], "string") + "\n";
s += "UT Ende umbrale Phase:\t" + dectime2Time(magLunar[6], "string") + "\n";
s += "UT Ende pen. Phase:\t" + dectime2Time(magLunar[7], "string") + "\n";
}
s += "\n-----------------------------------------------------------------\n\n";
}// End of for() Mondfinsternis
// ************************************* Sonnenfinsternis/Solar eclipse *********************************
// Array für Tag, Monat und Jahr des Ereignisses löschen ...
// Delete array for day, month and year of the event ...
arrDate = [];
// Überschrift - Head line
s += "Sonnenfinsternis:\n";
s += "_________________\n\n";
// Iteriere durch das gesamte Ergebnisarray ..
// Iterate through the entire result array ....
for (var a in arrNewMoon){
// ... und zuerst Datum-LCT-UT extrahieren ...
// [0] = Tag.Monat.Jahr
// [1] = LCT = Lokale Uhrzeit als Stunden und Stunde,dezimaler Anteil
// [2] = UT = Greenwich Universal Time als dezimaler Tagesanteil
// ... and first extract date-LCT-UT ...
// [0] = Day . Month . Year
// [1] = LCT = Local time as hours and hour,decimal proportion
// [2] = UT = Greenwich Universal Time as a decimal share of the day
arrNewMoonSplited = arrNewMoon[a].split("-");
// ... dann die einzelnen Komponenten des Datums Stunde, Minute, Sekunde ...
// [0] = Stunde
// [1] = Minute
// [2] = Sekunde
// ... then the individual components of the date hour, minute, second ...
// [0] = Hour
// [1] = Minute
// [2] = Second
arrDate = arrNewMoonSplited[0].split(".");
// ... und nun Greenwich Tag speichern ...
// ... and now Greenwich tag save ...
GDayNew = Number(arrDate[0]);
// ... und nun Greenwich Monat speichern ...
// ... and now Greenwich month save ...
GMonthNew = Number(arrDate[1]);
// ... und nun Greenwich Jahr speichern ...
// ... and now Greenwich year save ...
GYearNew = Number(arrDate[2]);
// ... und nun Grennwich UT speichern ...
// ... and now Greenwich universal time save ...
GUTNew = Number(arrNewMoonSplited[2]);
// ... und nun Lokale Zeit der Zeitzone speichern ...
// ... and now local time of time zone save ...
GLCTNew = Number(arrNewMoonSplited[1]);
// Nimmt das Ergebnis des Tests auf Sonnefinsternis bei Neumond auf
// Receives the result of the test for solar eclipse at new moon
sunEclipse = sunMoonEventsOccur(objDST.value, objTZ.value, arrNewMoonSplited[3], arrNewMoonSplited[4], arrNewMoonSplited[5], "Sun");
// Ergebnisteilstring zusammenstellen aus Neumond Datum, Ereignis und Länge- und Breite des
// Beobachtungsorts ...
// compile result string from new moon Date, Event and Length and Width
// Observation sites ...
sSunEclipse = "Neumond :\t\t" + GDayNew + "." + GMonthNew + "." + GYearNew + " Lokale Zeit:" + dectime2Time(GLCTNew, "string")
+ "\nEreignis:\t\t" + sunEclipse + "\n";
sSunEclipse += "Ort:\t\t\tLängengrad=" + Number(objLambda.value).toFixed(3) + "° Breitengrad=" + Number(objBeta.value).toFixed(3) + "°\n";
// ... und wenn es ein Ereignis gibt, dann zum Ausgabestring "s" hinzufügen ...
// ... and if there is an event, then add “s” to the output string ...
if (sunEclipse != ""){
s += sSunEclipse;
// ... oder auch eine Fehlermeldung ...
// ... or an error message ...
}else{
s += "Fehler bei der Berechnung zur Sonnenfinsternis bei Neumond\n";
}
// ... die Verhältnisse der Sonnenfinsternis ermitteln, hier der Grad der Bedeckung ...
// Degree of occulation at lunar eclipse
magSolar = magSolarEclipse(arrNewMoonSplited[6], objLambda.value, objBeta.value, sunEclipse);
// ... bei dem Wert -99 gibt es zwar eine Sonnenfinsternis, aber sie ist an dem Ort Länge und Breitengrad
// nicht sichtbar ...
// ... at the value -99 there is indeed a solar eclipse, but it is at the place longitude and latitude
// not visible ...
if ( (magSolar[0] == -99) || (magSolar[0] == 0.0) ){
s += "Magnitude:\t\t" + 0.0 + " Bedeckung: " + (0.0 * 100).toFixed(3) + " %\n";
s += "\t\t\tKeine Sonnenfinsternis an diesem Ort ";
// ... Sonnenfinsternis ist hier an dem Ort sichtbar ...
// ... solar eclipse is visible here at the place ...
}else{
magSolar[0] = Number(magSolar[0]).toFixed(3);
s += "Magnitude:\t\t" + magSolar[0] + " Bedeckung: " + (magSolar[0] * 100).toFixed(3) + " %\n";
s += "UT erster Kontakt:\t" + dectime2Time(magSolar[1], "string") + "\n";
s += "UT mittlerer Kontakt:\t" + dectime2Time(magSolar[2], "string") + "\n";
s += "UT letzter Kontakt :\t" + dectime2Time(magSolar[3], "string");
}
s += "\n-----------------------------------------------------------------\n\n";
}// End of for() Sonnenfinsternis
// ... und alles in die Textarea als Ergebnis schreiben ...
// ... and write everything in the text area as a result ...
s += "\n_________________________________________________________________\n\n";
objText.value = s;
// Und zum Schluss kopiere noch alles in die Zwischenablage.
// And finally, copy everything to the clipboard.
copyText2Clipboard(objText);
});// End of Click auf "Berechnen" Button
// Berechnet als Unterfunktion die Neu- und Vollmonde des gesamten Jahres,
// wenn die Checkbox aktiviert ist.
// Calculates as a subfunction the new and full moon of the whole year,
// when the checkbox is activated.
function calcWholeYear(){
arrFullMoon = [];
arrNewMoon = [];
// ... iteriere durch die Monate des Jahres und berechne für jeden Monat
// den Voll- und Neumond ...
// ... iterate through the months of the year and work out for each month
// the full and new moon ...
for (var i = 1; i <= 12; i++){
// ...nun das Texteingabefeld für den Tag mit Wert 1 füllen ...
// ...fill the text input field for the day with value 1...
objDay.value = 15;
objMonth.focus();
// ... den Monat im Eingabefeld auf den Berechnungsmonat setzen ...
// ... set the month in the input field to the calculation month ...
objMonth.value = i;
objYear.focus();
// ... dann Neu- und Vollmond für den Monat berechnen lassen ...
// ... then calculate new and full moon for the month ...
calcNewFullMoon();
}
}// End of calcWholeYear()
/* ********************************* Programm / Program ******************************* */
// Berechnet als Unterfunktion den Neu- und Vollmond.
// Calculates the new and full moon as a subfunction.
function calcNewFullMoon(){
// ******************************************************** Neumond/ Newmoon ****************************************
// Berechnet das Julianische Datum des Neumondes. Der Wert ist aber nicht das Datum und Uhrzeit
// des Neumondes. Es ist die Universal Time und muss weiter berechnet werden ...
// Calculates the Julian date of the new moon. But the value is not the date and time
// of the New Worlds. It is Universal Time and has to be calculated further. . .
newmoon = newMoon(objDST.value, objTZ.value, objDay.value, objMonth.value, objYear.value, objJD, objJD0);
// ... und berechne den Greenwich Datum mit Uhrzeit aus dem JD des Neumondes ...
// ... and get the Greenwich date with time from the JD of the new moon ...
GDayNewMoon = julianDate2CalDay(newmoon);
// ... und aus dem Greenwich Datum mit Uhrzeit den Tag des neumondes ...
// ... and from the Greenwich date with time the day of the new moon ...
GDayNewMoonInt = parseInt(GDayNewMoon);
// ... und nun berechne den Greenwich Monat aus dem JD des Neumondes ...
// ... and now I’m going to work out the Greenwich month from the JD of the new moon...
GMonthNewMoonInt = julianDate2CalMonth(newmoon);
// ... und nun berechne das Greenwich Jahr aus dem JD des Neumondes ..
// ... and now the Greenwich year from the JD of the new moon ..
GYearNewMoonInt = julianDate2CalYear(newmoon);
// ... und nun berechne die UT aus dem Datum + Uhrzeit Neumond - Tag neumond ...
// ... and now get the UT from the date + time new moon – day new moon ...
UTNewMoon = 24.0 *(GDayNewMoon - GDayNewMoonInt);
// ... und nun berechne die lokale Zeit aus der UT des Vollmondes,
// Time Zone- u. Daylight Saving Offset und Datum des Vollmonds ...
// ... and now compute the local time from the UT of the New moon
// Time Zone & Daylight Saving Offset and Date of New Moon ...
LCTNewMoon = ut2LocalTime(UTNewMoon , 0, 0, objDST.value, objTZ.value, GDayNewMoonInt, GMonthNewMoonInt, GYearNewMoonInt);
// ... und nun berechne das lokale Datum aus der UT des Neumondes,
// Time Zone- u. Daylight Saving Offset und Datum des Neumonds ...
// ... and now find the local date from the UT of the new moon,
// Time Zone & Daylight Saving Offset and Date of new Moon ...
var arrLCTDateFromUTDateNew = ut2LocalDate(UTNewMoon, 0, 0, objDST.value, objTZ.value, GDayNewMoonInt, GMonthNewMoonInt, GYearNewMoonInt);
// im Ergebnisarray [0] steht der Tag ...
// in the result array [ 0] is the day ...
LCTDayNewMoon = arrLCTDateFromUTDateNew[0];
// im Ergebnisarray [1] steht der Monat ...
// in the result array [ 1] is themonth ...
LCTMonthNewMoon = arrLCTDateFromUTDateNew[1];
// im Ergebnisarray [2] steht das Jahr ...
// in the result array [ 2] is the year ...
LCTYearNewMoon = arrLCTDateFromUTDateNew[2];
// .. und aus der lokalen Zeit des Vollmondes noch hh:mm:ss.ms ...
// .. and from the local time of the New moon still hh: mm:ss.ms ...
LCTTimeLocalNew = dectime2Time(LCTNewMoon, "string");
// ... und trage die Werte in das Ausgabefeld ein Format: dd.mm.yyyy-Dez. Lokale Zeit-Dez. UT
// ... and enter the values in the output field of a format: dd.mm.yyyy-dec. local time-dec. UT
objNewMoon.value = LPad(LCTDayNewMoon , 2, "0") + "." + LPad(LCTMonthNewMoon , 2, "0") + "." + LPad(LCTYearNewMoon , 4, "0") + "-"
+ LCTNewMoon + "-" + UTNewMoon + "-" + objDay.value + "-" + objMonth.value + "-" + objYear.value + "-" + newmoon;
// ... Ergebnis von Neu- und Vollmond als Zeile im Array speichern ...
// --- Format: dd.mm.yyy_-_(LT)hh:mm.ss.msms_-_(UT)hh:mm.ss.msms
// ... Save newmoon and fullmoon result as line in array
// --- Format: dd.mm.yyy_-_(LT)hh:mm.ss.msms_-_(UT)hh:mm.ss.msms
arrNewMoon.push(objNewMoon.value);
// ******************************************************** Vollmond/ Fullmoon ****************************************
// Berechnet das Julianische Datum des Vollmondes. Der Wert ist aber nicht das Datum und Uhrzeit
// des Vollmondes. Es ist die Universal Time und muss weiter berechnet werden ...
// Calculates the Julian date of the full moon. But the value is not the date and time
// of the full moon. It is Universal Time and has to be calculated further. . .
fullmoon = fullMoon(objDST.value, objTZ.value, objDay.value, objMonth.value, objYear.value, objJD, objJD0);
// ... und berechne den Greenwich Datum mit Uhrzeit aus dem JD des Vollmondes ...
// ... and get the Greenwich date with time from the JD of the full moon ...
GDayFullMoon = julianDate2CalDay(fullmoon);
// ... und aus dem Greenwich Datum mit Uhrzeit den Tag des Vollmondes ...
// ... and from the Greenwich date with time the day of the full moon ...
GDayFullMoonInt = parseInt(GDayFullMoon);
// ... und nun berechne den Greenwich Monat aus dem JD des Vollmondes ...
// ... and now I’m going to work out the Greenwich month from the JD of the full moon...
GMonthFullMoonInt = julianDate2CalMonth(fullmoon);
// ... und nun berechne das Greenwich Jahr aus dem JD des Vollmondes ..
// ... and now the Greenwich year from the JD of the full moon ..
GYearFullMoonInt = julianDate2CalYear(fullmoon);
// ... und nun berechne die UT aus dem Datum + Uhrzeit Vollmond - Tag Vollmond ...
// ... and now get the UT from the date + time full moon – day full moon ...
UTFullMoon = 24.0 *(GDayFullMoon - GDayFullMoonInt);
// ... und nun berechne die lokale Zeit aus der UT des Vollmondes,
// Time Zone- u. Daylight Saving Offset und Datum des Vollmonds ...
// ... and now compute the local time from the UT of the full moon
// Time Zone & Daylight Saving Offset and Date of Full Moon ...
LCTFullMoon = ut2LocalTime(UTFullMoon , 0, 0, objDST.value, objTZ.value, GDayFullMoonInt, GMonthFullMoonInt, GYearFullMoonInt);
// ... und nun berechne das lokale Datum aus der UT des Vollmondes,
// Time Zone- u. Daylight Saving Offset und Datum des Vollmonds ...
// ... and now find the local date from the UT of the full moon,
// Time Zone & Daylight Saving Offset and Date of Full Moon ...
var arrLCTDateFromUTDateFull = ut2LocalDate(UTFullMoon, 0, 0, objDST.value, objTZ.value, GDayFullMoonInt, GMonthFullMoonInt, GYearFullMoonInt);
// im Ergebnisarray [0] steht der Tag ...
// in the result array [ 0] is the day ...
LCTDayFullMoon = arrLCTDateFromUTDateFull[0];
// im Ergebnisarray [1] steht der Monat ...
// in the result array [ 1] is themonth ...
LCTMonthFullMoon = arrLCTDateFromUTDateFull[1];
// im Ergebnisarray [2] steht das Jahr ...
// in the result array [ 2] is the year ...
LCTYearFullMoon = arrLCTDateFromUTDateFull[2];
// .. und aus der lokalen Zeit des Vollmondes noch hh:mm:ss.ms ...
// .. and from the local time of the full moon still hh: mm:ss.ms ...
LCTTimeLocalFull = dectime2Time(LCTFullMoon, "string");
// ... und trage die Werte in das Ausgabefeld ein Format: dd.mm.yyyy - Dez. Lokale Zeit - Dez. UT - Tag - Monat - Jahr
// ... and enter the values in the output field of a format: dd.mm.yyyy - dec. local time - dec. UT - day - month - year
objFullMoon.value = LPad(LCTDayFullMoon , 2, "0") + "." + LPad(LCTMonthFullMoon , 2, "0") + "." + LPad(LCTYearFullMoon , 4, "0") + "-"
+ LCTFullMoon + "-" + UTFullMoon + "-" + objDay.value + "-" + objMonth.value + "-" + objYear.value + "-" + fullmoon;
// ... Ergebnis von Neu- und Vollmond als Zeile im Array speichern ...
// --- Format: dd.mm.yyy_-_(LT)hh:mm.ss.msms_-_(UT)hh:mm.ss.msms
// ... Save newmoon and fullmoon result as line in array
// --- Format: dd.mm.yyy_-_(LT)hh:mm.ss.msms_-_(UT)hh:mm.ss.msms
arrFullMoon.push(objFullMoon.value);
}// End of calcNewFullMoon()
// Berechnungsstart - Start the calculation
//
function start(){
// Prüfe vor dem Berechnungsbeginn noch einmal, ob nicht eine falsche Eingabe des Tages,
// in Hinblick auf ein Schaltjahr und den Monat Februar, vorgenommen wurde. Dazu kann man
// die Callback Funktion des Eventlisteners des Tages für die Änderung benutzen.
// Check again before the calculation starts, if there is a wrong entry of the day,
// with regard to a leap year and the month February. To do this, you can use
// the callback function of the event listener of the day for the change.
keydownChangeDay(objDay, objMonth, objLeapYear);
keydownChangeMonth(objMonth);
keydownChangeYear(objYear, objLeapYear);
keydownChangeDST(objDST);
keydownChangeTZ(objTZ);
// Mit der Funktion isLeapYear() und dem Parameter des
// Berechnungsjahres (objYear.value) , wird festgestellt ob
// es sich um ein Schaltjahr handelt und dies Ausgegeben.
//
// With the function isLeapYear () and the parameter of the
// Calculation year (objYear. value), is determined whether
// it is a leap year and this is output.
if (isLeapYear(objYear.value))objLeapYear.value = "Ja"; else objLeapYear.value = "Nein";
// Wenn die Checkbox für die Berechnung eines ganzen Jahres nicht angeklickt ist ...
// If the checkbox is not clicked for the calculation of a whole year ...
if (objCalcYear.checked == false){
// ... dann berechne die Daten nur für den Monat des Eingabedatums und gebe sie in der Textarea aus ...
// ... then compulate the data only for the month of the input date and output it in the text area ...
calcNewFullMoon();
}
// ... wenn die Checkbox für "Berechnung des ganzen Jahres" markiert ist, dann
// berechne alle 12 Monate und gebe das Ergebnis in der Textarea aus...
// ... if the checkbox is marked for “Calculation of the whole year”, then
// calculate every 12 months and output the result in the text area...
if (objCalcYear.checked == true ) {
// ... dann berechne die Daten für das gesamte Jahr und gebe sie in der Textarea aus ...
// ... then computes the data for the entire year and display it in the text area ...
calcWholeYear();
}
}// End of start()
}); // Ende alles geladen - End of all things loaded
}); // Ende DOM geladen - End of DOM loaded
>/script>
>/head>
<body id="b">
<table border="0">
<tr>
<th id="label" colspan="8">
<center>Vorhersage von Sonnen- und Mondfinsterissen>/center>
>/th>
>/tr>
<tr>
<td colspan="8">
>/td>
>/tr>
<tr>
<td id="label">
Tag:
>/td>
<td id="value">
<input id="day" type="text" maxlength="2" value="1">
Monat:
>/td>
<td id="value">
<input id="month" type="text" maxlength="2" value="11">
Jahr:
>/td>
<td id="value">
<input id="year" type="text" maxlength="4" value="2020">
>/td>
<td id="value">
<input id="leapyear" title="Ermittelt automatisch, ob das Jahr ein Schaltjahr ist" type="hidden" value="" disabled="disabled">
<label title="Daylight Saving Time (Sommer/Winterzeit)">DST:
<input title="Daylight Saving Time (Sommer/Winterzeit)" id="dst" type="text" maxlength="1" value="1" >
<label title="Timezone (Westlich -, Östlich +)">TZ:
<input title="Timezone (Westlich -, Östlich +)" id="tz" type="text" maxlength="3" value="0" >
<label id="desclambda" title="Längengrad des Beobachtungsortes in dez. Grad">λ[Grad]:
<input title="Längengrad des Beobachtungsortes in dez. Grad" id="lambda" type="text" value="0.0" >
<label id="descbeta" title="Breitengrad des Beobachtungsortes in dez. Grad">β[Grad]:
<input title="Breitengrad des Beobachtungsortes in dez. Grad" id="beta" type="text" value="0.0" >
>/td>
<td id="value">
<input title="Julianisches Datum des eingegebenen Datums" id="jd" type="hidden" value="" disabled="disabled">
>/td>
<td id="value">
<input title="Julianisches Datum des Startdatums der Berechnung" id="jd0" type="hidden" value="" disabled="disabled">
>/td>
<td id="value">
<input class="color" title="Datum des Neumonds" id="newmoon" type="hidden" value="dd.mm.yyyy - hh:mm:ss.ms" disabled="disabled">
>/td>
<td id="value">
<input class="color" title="Datum des Vollmonds" id="fullmoon" type="hidden" value="dd.mm.yyyy - hh:mm:ss.ms" disabled="disabled">
>/td>
>/tr>
<tr>
<td colspan="3">
>/td>
<td>
<center>