Beispiel #1
0
        // MMoon.NewMoon(ref EEclipseType)
        /// <summary>
        /// Setzt die Kennung der Finsternisabschätzung und liefert die julianische Tageszahl des nächsten Neumondes nach der aktuellen Systemzeit.
        /// </summary>
        /// <param name="type">Kennung der Finsternisabschätzung.</param>
        /// <returns>Julianische Tageszahl des nächsten Neumondes nach der julianischen Tageszahl.</returns>
        public static double NewMoon(ref EEclipseType type)
        {
            // Lokale Felder einrichten und Ereigniszeit berechnen
            double jd = MCalendar.FromDateTime(DateTime.Now);

            return(MMoon.NewMoon(jd, ref type));
        }
Beispiel #2
0
        // MMoon.PhaseAngle()
        /// <summary>
        /// Liefert den Phasenwinkel zur aktuellen Systemzeit.
        /// </summary>
        /// <returns>Phasenwinkel zur aktuellen Systemzeit.</returns>
        public static double PhaseAngle()
        {
            // Phasenwinkel berechnen
            double jdn = MCalendar.FromDateTime(DateTime.Now);

            return(MMoon.PhaseAngle(jdn));
        }
Beispiel #3
0
        // MMoon.LastQuarter()
        /// <summary>
        /// Liefert die julianische Tageszahl des nächsten letzten Viertels nach der aktuellen Systemzeit.
        /// </summary>
        /// <returns>Liefert die julianische Tageszahl des nächsten letzten Viertels nach der aktuellen Systemzeit.</returns>
        public static double LastQuarter()
        {
            // Lokale Felder einrichten und Ereigniszeit berechnen
            double jd = MCalendar.FromDateTime(DateTime.Now);

            return(MMoon.LastQuarter(jd));
        }
Beispiel #4
0
        // ------------------- //
        // Felder und Methoden //
        // ------------------- //
        // MUranus.Latitude(EPrecision)
        /// <summary>
        /// Liefert die heliozentrisch-ekliptikale Breite zur aktuellen Systemzeit.
        /// </summary>
        /// <param name="value">Genauigkeitskennung.</param>
        /// <returns>Heliozentrisch-ekliptikale Breite zur aktuellen Systemzeit.</returns>
        public static double Latitude(EPrecision value)
        {
            // Lokale Felder einrichten
            double jd = MCalendar.FromDateTime(DateTime.Now);

            return(MUranus.Latitude(value, jd));
        }
Beispiel #5
0
        // MNeptune.Transit(double, double)
        /// <summary>
        /// Liefert die julianische Tageszahl des Meridiandurchgangs am geographischen Ort und zur aktuellen Systemzeit.
        /// </summary>
        /// <param name="lambda">Geographische Länge.</param>
        /// <param name="phi">Geographische Breite.</param>
        /// <returns>Liefert die julianische Tageszahl des Meridiandurchgangs am geographischen Ort und zur aktuellen Systemzeit.</returns>
        public static double Transit(double lambda, double phi)
        {
            // Lokale Felder einrichten und Ereigniszeit bestimmen
            double h  = 0.0;
            double jd = MCalendar.FromDateTime(DateTime.Now);

            return(MNeptune.Transit(lambda, phi, jd, ref h));
        }
Beispiel #6
0
        // MNeptune.Transit(CPolar)
        /// <summary>
        /// Liefert die julianische Tageszahl des Meridiandurchgangs am geographischen Ort und zur aktuellen Systemzeit.
        /// </summary>
        /// <param name="position">Geographische Position.</param>
        /// <returns>Julianische Tageszahl des Meridiandurchgangs am geographischen Ort und zur aktuellen Systemzeit.</returns>
        public static double Transit(CPolar position)
        {
            // Lokale Felder einrichten und Ereigniszeit bestimmen
            double h  = 0.0;
            double jd = MCalendar.FromDateTime(DateTime.Now);

            return(MNeptune.Transit(position.Longitude, position.Latitude, jd, ref h));
        }
Beispiel #7
0
        // MNeptune.Set(double, double, ref double)
        /// <summary>
        /// Setzt die julianische Tageszahl des Untergangs am geographischen Ort und zur aktuellen Systemzeit und liefert die Ereigniskennung.
        /// </summary>
        /// <param name="lambda">Geographische Länge.</param>
        /// <param name="phi">Geographische Breite.</param>
        /// <param name="jdEvent">Julianische Tageszahl des Untergangs.</param>
        /// <returns>Ereigniskennung.</returns>
        public static EEventType Set(double lambda, double phi, ref double jdEvent)
        {
            // Lokale Felder einrichten und Ereigniszeit bestimmen
            double jd  = MCalendar.FromDateTime(DateTime.Now);
            double azm = 0.0;

            return(MNeptune.Set(lambda, phi, ref jdEvent, jd, ref azm));
        }
Beispiel #8
0
        // MNeptune.Set(CPolar, ref double)
        /// <summary>
        /// Setzt die julianische Tageszahl des Untergangs am geographischen Ort und zur aktuellen Systemzeit und liefert die Ereigniskennung.
        /// </summary>
        /// <param name="position">Geographisches Position.</param>
        /// <param name="jdEvent">Julianische Tageszahl des Untergangs.</param>
        /// <returns>Ereigniskennung.</returns>
        public static EEventType Set(CPolar position, ref double jdEvent)
        {
            // Lokale Felder einrichten und Ereigniszeit bestimmen
            double jd  = MCalendar.FromDateTime(DateTime.Now);
            double azm = 0.0;

            return(MNeptune.Set(position.Longitude, position.Latitude, ref jdEvent, jd, ref azm));
        }
Beispiel #9
0
        // MMoon.FullMoon()
        /// <summary>
        /// Liefert die julianische Tageszahl des nächsten Vollmondes nach der aktuellen Systemzeit.
        /// </summary>
        /// <returns>Liefert die julianische Tageszahl des nächsten Vollmondes nach der aktuellen Systemzeit.</returns>
        public static double FullMoon()
        {
            // Private Felder einrichten und Ereigniszeit berechnen
            EEclipseType t  = EEclipseType.None;
            double       jd = MCalendar.FromDateTime(DateTime.Now);

            return(MMoon.FullMoon(jd, ref t));
        }
Beispiel #10
0
        // CDate(double)
        /// <summary>
        /// Konstruktor eines gregorianischen Kalenders mit Angabe einer julianischen Tageszahl ein.
        /// </summary>
        /// <param name="jd">Julianische Tageszahl.</param>
        public CDate(double jd)
        {
            // Felder einrichten
            DateTime date = MCalendar.ToDate(jd);

            this.Day   = date.Day;
            this.Month = date.Month;
            this.Year  = date.Year;
        }
Beispiel #11
0
        // MNeptune.Perihelion(double)
        /// <summary>
        /// Liefert die julianische Tageszahl der nächsten Durchgangs durch das Perihel nach der julianischen Tageszahl.
        /// </summary>
        /// <param name="jd">Julianische Tageszahl.</param>
        /// <returns>Julianische Tageszahl der nächsten Durchgangs durch das Perihel nach der julianischen Tageszahl.</returns>
        public static double Perihelion(double jd)
        {
            // Lokale Felder einrichten
            double y = (double)MCalendar.GregorianYear(jd) + MEphemerides.YearFragment(jd);
            double k = MMath.Floor(0.00607 * (y - 2047.50)) - 1.0;
            double j = 0.0;

            // Berechnungsschleife
            while (j <= jd)
            {
                // Tageszahl berechnen
                k += 1.0;
                j  = MMath.Polynome(k, 2468895.100, 60190.33, 0.03429);
            }
            return(j);
        }
Beispiel #12
0
        // MUranus.Perihelion(double)
        /// <summary>
        /// Liefert die julianische Tageszahl der nächsten Durchgangs durch das Perihel nach der julianischen Tageszahl.
        /// </summary>
        /// <param name="jd">Julianische Tageszahl.</param>
        /// <returns>Julianische Tageszahl der nächsten Durchgangs durch das Perihel nach der julianischen Tageszahl.</returns>
        public static double Perihelion(double jd)
        {
            // Lokale Felder einrichten
            double y = (double)MCalendar.GregorianYear(jd) + MEphemerides.YearFragment(jd);
            double k = MMath.Floor(0.01190 * (y - 2051.10)) - 1.0;
            double j = 0.0;

            // Berechnungsschleife
            while (j <= jd)
            {
                // Tageszahl berechnen
                k += 1.0;
                j  = MMath.Polynome(k, 2470213.500, 30694.87670, -0.00542);
            }
            return(j);
        }
Beispiel #13
0
        // MEarth.Aphelion(double)
        /// <summary>
        /// Liefert die julianische Tageszahl des nächsten Durchgangs durch das Aphel nach der julianischen Tageszahl.
        /// </summary>
        /// <param name="jd">Julianische Tageszahl.</param>
        /// <returns>Julianische Tageszahl des nächsten Durchgangs durch das Aphel nach der julianischen Tageszahl.</returns>
        public static double Aphelion(double jd)
        {
            // Lokale Felder einrichten
            double y = (double)MCalendar.GregorianYear(jd) + MEphemerides.YearFragment(jd);
            double k = MMath.Floor(0.99997 * (y - 2000.01)) - 0.5;
            double j = 0.0;

            // Berechnungsschleife
            while (j <= jd)
            {
                // Näherung berechnen
                k += 1.0;
                j  = MMath.Polynome(k, 2451547.507, 365.2596358, 0.0000000156);

                // Näherung korregieren
                j += -1.352 * MMath.Sin(MMath.ToRad(328.41 + 132.788585 * k));
                j += 0.061 * MMath.Sin(MMath.ToRad(316.13 + 584.903153 * k));
                j += 0.062 * MMath.Sin(MMath.ToRad(346.20 + 450.380738 * k));
                j += 0.029 * MMath.Sin(MMath.ToRad(136.95 + 659.306737 * k));
                j += 0.031 * MMath.Sin(MMath.ToRad(249.52 + 329.653368 * k));
            }
            return(j);
        }
Beispiel #14
0
        // MMoon.NewMoon(double, ref EEclipseType)
        /// <summary>
        /// Setzt die Kennung der Finsternisabschätzung und liefert die julianische Tageszahl des nächsten Neumondes nach der julianischen Tageszahl.
        /// </summary>
        /// <param name="jd">Julianische Tageszahl.</param>
        /// <param name="type">Kennung der Finsternisabschätzung.</param>
        /// <returns>Julianische Tageszahl des nächsten Neumondes nach der julianischen Tageszahl.</returns>
        public static double NewMoon(double jd, ref EEclipseType type)
        {
            // Lokale Felder einrichten und Ereigniszeit berechen
            double y = (double)MCalendar.GregorianYear(jd) + MEphemerides.YearFragment(jd);
            double k = MMath.Floor(12.3685 * (y - 2000.0)) - 1.0;
            double j = 0.0;

            // Berechnungsschleife
            while (j <= jd)
            {
                // Lunation inkrementieren und lokale Felder einrichten
                k += 1.0;
                double t = k / 1236.85;

                // Näherung berechnen und Hilfsfelder einrichten
                j = MMath.Polynome(t, 2451550.09766 + 29.530588861 * k, 0.0, 0.00015437, -0.000000150, 0.00000000073);
                double e1 = MMath.Polynome(t, 1.0, -0.002516, -0.0000074);
                double e2 = e1 * e1;
                double m  = MMath.Mod(MMath.ToRad(MMath.Polynome(t, 2.5534 + 29.10535670 * k, 0.0, -0.0000014, -0.00000011)), MMath.Pi2);
                double a  = MMath.Mod(MMath.ToRad(MMath.Polynome(t, 201.5643 + 385.81693528 * k, 0.0, 0.0107582, 0.00001238, -0.000000058)), MMath.Pi2);
                double f  = MMath.Mod(MMath.ToRad(MMath.Polynome(t, 160.7108 + 390.67050284 * k, 0.0, -0.0016118, -0.00000227, 0.000000011)), MMath.Pi2);
                double o  = MMath.Mod(MMath.ToRad(MMath.Polynome(t, 124.7746 - 1.56375588 * k, 0.0, 0.0020672, 0.00000215)), MMath.Pi2);
                double h;

                // Korrektur berechnen
                h  = -0.40720 * MMath.Sin(a);
                h += 0.17241 * e1 * MMath.Sin(m);
                h += 0.01608 * MMath.Sin(2.0 * a);
                h += 0.01039 * MMath.Sin(2.0 * f);
                h += 0.00739 * e1 * MMath.Sin(a - m);
                h += -0.00514 * e1 * MMath.Sin(a + m);
                h += 0.00208 * e2 * MMath.Sin(2.0 * m);
                h += -0.00111 * MMath.Sin(a - 2.0 * f);
                h += -0.00057 * MMath.Sin(a + 2.0 * f);
                h += 0.00056 * e1 * MMath.Sin(2.0 * a + m);
                h += -0.00042 * MMath.Sin(3.0 * a);
                h += 0.00042 * e1 * MMath.Sin(m + 2.0 * f);
                h += 0.00038 * e1 * MMath.Sin(m - 2.0 * f);
                h += -0.00024 * e1 * MMath.Sin(2.0 * a - m);
                h += -0.00017 * MMath.Sin(o);
                h += -0.00007 * MMath.Sin(a + 2.0 * m);
                h += 0.00004 * MMath.Sin(2.0 * a - 2.0 * f);
                h += 0.00004 * MMath.Sin(3.0 * m);
                h += 0.00003 * MMath.Sin(a + m - 2.0 * f);
                h += 0.00003 * MMath.Sin(2.0 * a + 2.0 * f);
                h += -0.00003 * MMath.Sin(a + m + 2.0 * f);
                h += 0.00003 * MMath.Sin(a - m + 2.0 * f);
                h += -0.00002 * MMath.Sin(a - m - 2.0 * f);
                h += -0.00002 * MMath.Sin(3.0 * a + m);
                h += 0.00002 * MMath.Sin(4.0 * a);

                // Störungen durch Planeten berechnen
                h += 0.000325 * MMath.Sin(MMath.ToRad(299.77 + 0.107408 * k - 0.009173 * t * t));
                h += 0.000165 * MMath.Sin(MMath.ToRad(251.88 + 0.016321 * k));
                h += 0.000164 * MMath.Sin(MMath.ToRad(251.83 + 26.651886 * k));
                h += 0.000126 * MMath.Sin(MMath.ToRad(349.42 + 36.412478 * k));
                h += 0.000110 * MMath.Sin(MMath.ToRad(84.66 + 18.206239 * k));
                h += 0.000062 * MMath.Sin(MMath.ToRad(141.74 + 53.303771 * k));
                h += 0.000060 * MMath.Sin(MMath.ToRad(207.14 + 2.453732 * k));
                h += 0.000056 * MMath.Sin(MMath.ToRad(154.84 + 7.306860 * k));
                h += 0.000047 * MMath.Sin(MMath.ToRad(34.52 + 27.261239 * k));
                h += 0.000042 * MMath.Sin(MMath.ToRad(207.19 + 0.121824 * k));
                h += 0.000040 * MMath.Sin(MMath.ToRad(291.34 + 1.844379 * k));
                h += 0.000037 * MMath.Sin(MMath.ToRad(161.72 + 24.198154 * k));
                h += 0.000035 * MMath.Sin(MMath.ToRad(239.56 + 25.513099 * k));
                h += 0.000023 * MMath.Sin(MMath.ToRad(331.55 + 3.592518 * k));

                // Korrekturen anwenden
                j += h;
            }

            // Ekliptikale Breite berechnen und Finsternisabschätzung bestimmen
            double b = MMath.Abs(MMoon.Latitude(EPrecision.Medium, j));

            if (b < 0.015223)
            {
                type = EEclipseType.SunCentralDefinite;
            }
            else if (b < 0.018210)
            {
                type = EEclipseType.SunCentralPotential;
            }
            else if (b < 0.024595)
            {
                type = EEclipseType.SunPartialDefinite;
            }
            else if (b < 0.027586)
            {
                type = EEclipseType.SunPartialPotential;
            }
            else
            {
                type = EEclipseType.SunNoEclipse;
            }
            return(j);
        }
Beispiel #15
0
        // MMoon.FirstQuarter(double)
        /// <summary>
        /// Liefert die julianische Tageszahl des nächsten ersten Viertels nach der julianischen Tageszahl.
        /// </summary>
        /// <param name="jd">Julianische Tageszahl.</param>
        /// <returns>Julianische Tageszahl des nächsten ersten Viertels nach der julianischen Tageszahl.</returns>
        public static double FirstQuarter(double jd)
        {
            // Lokale Felder einrichten
            double y = (double)MCalendar.GregorianYear(jd) + MEphemerides.YearFragment(jd);
            double k = MMath.Floor(12.3685 * (y - 2000.0)) - 0.75;
            double j = 0.0;

            // Berechnungsschleife
            while (j <= jd)
            {
                // Lunation inkrementieren und lokale Felder einrichten
                k += 1.0;
                double t = k / 1236.85;

                // Näherung berechnen und Hilfsfelder einrichten
                j = MMath.Polynome(t, 2451550.09766 + 29.530588861 * k, 0.0, 0.00015437, -0.000000150, 0.00000000073);
                double e1 = MMath.Polynome(t, 1.0, -0.002516, -0.0000074);
                double e2 = e1 * e1;
                double m  = MMath.Mod(MMath.ToRad(MMath.Polynome(t, 2.5534 + 29.10535670 * k, 0.0, -0.0000014, -0.00000011)), MMath.Pi2);
                double a  = MMath.Mod(MMath.ToRad(MMath.Polynome(t, 201.5643 + 385.81693528 * k, 0.0, 0.0107582, 0.00001238, -0.000000058)), MMath.Pi2);
                double f  = MMath.Mod(MMath.ToRad(MMath.Polynome(t, 160.7108 + 390.67050284 * k, 0.0, -0.0016118, -0.00000227, 0.000000011)), MMath.Pi2);
                double o  = MMath.Mod(MMath.ToRad(MMath.Polynome(t, 124.7746 - 1.56375588 * k, 0.0, 0.0020672, 0.00000215)), MMath.Pi2);
                double h  = 0.0;

                // Korrektur berechnen
                h  = -0.62801 * MMath.Sin(a);
                h += 0.17172 * e1 * MMath.Sin(m);
                h += -0.01183 * e1 * MMath.Sin(a + m);
                h += 0.00862 * MMath.Sin(2.0 * a);
                h += 0.00804 * MMath.Sin(2.0 * f);
                h += 0.00454 * e1 * MMath.Sin(a - m);
                h += 0.00204 * e2 * MMath.Sin(2.0 * m);
                h += -0.00180 * MMath.Sin(a - 2.0 * f);
                h += -0.00070 * MMath.Sin(a + 2.0 * f);
                h += -0.00040 * MMath.Sin(3.0 * a);
                h += -0.00034 * e1 * MMath.Sin(2.0 * a - m);
                h += 0.00032 * e1 * MMath.Sin(m + 2.0 * f);
                h += 0.00032 * e1 * MMath.Sin(m - 2.0 * f);
                h += -0.00028 * e2 * MMath.Sin(a + 2.0 * m);
                h += 0.00027 * e1 * MMath.Sin(2.0 * a + m);
                h += -0.00017 * MMath.Sin(o);
                h += -0.00005 * MMath.Sin(a - m - 2.0 * f);
                h += 0.00004 * MMath.Sin(2.0 * a + 2.0 * f);
                h += -0.00004 * MMath.Sin(a + m + 2.0 * f);
                h += 0.00004 * MMath.Sin(a - 2.0 * m);
                h += 0.00003 * MMath.Sin(a + m - 2.0 * f);
                h += 0.00003 * MMath.Sin(3.0 * m);
                h += 0.00002 * MMath.Sin(2.0 * a - 2.0 * f);
                h += 0.00002 * MMath.Sin(a - m + 2.0 * f);
                h += -0.00002 * MMath.Sin(3.0 * a + m);

                // Viertelkorrektur berechnen
                h += 0.00306;
                h += -0.00038 * e1 * MMath.Cos(m);
                h += 0.00026 * MMath.Cos(a);
                h += -0.00002 * MMath.Cos(a - m);
                h += 0.00002 * MMath.Cos(a + m);
                h += 0.00002 * MMath.Cos(2.0 * f);

                // Störungen durch Planeten berechnen
                h += 0.000325 * MMath.Sin(MMath.ToRad(299.77 + 0.107408 * k - 0.009173 * t * t));
                h += 0.000165 * MMath.Sin(MMath.ToRad(251.88 + 0.016321 * k));
                h += 0.000164 * MMath.Sin(MMath.ToRad(251.83 + 26.651886 * k));
                h += 0.000126 * MMath.Sin(MMath.ToRad(349.42 + 36.412478 * k));
                h += 0.000110 * MMath.Sin(MMath.ToRad(84.66 + 18.206239 * k));
                h += 0.000062 * MMath.Sin(MMath.ToRad(141.74 + 53.303771 * k));
                h += 0.000060 * MMath.Sin(MMath.ToRad(207.14 + 2.453732 * k));
                h += 0.000056 * MMath.Sin(MMath.ToRad(154.84 + 7.306860 * k));
                h += 0.000047 * MMath.Sin(MMath.ToRad(34.52 + 27.261239 * k));
                h += 0.000042 * MMath.Sin(MMath.ToRad(207.19 + 0.121824 * k));
                h += 0.000040 * MMath.Sin(MMath.ToRad(291.34 + 1.844379 * k));
                h += 0.000037 * MMath.Sin(MMath.ToRad(161.72 + 24.198154 * k));
                h += 0.000035 * MMath.Sin(MMath.ToRad(239.56 + 25.513099 * k));
                h += 0.000023 * MMath.Sin(MMath.ToRad(331.55 + 3.592518 * k));

                // Korrekturen anwenden
                j += h;
            }
            return(j);
        }