11/*
22 * -----------------------------------------------------------------------
3- * Copyright © 2013-2021 Meno Hochschild, <http://www.menodata.de/>
3+ * Copyright © 2013-2023 Meno Hochschild, <http://www.menodata.de/>
44 * -----------------------------------------------------------------------
55 * This file (SolarTime.java) is part of project Time4J.
66 *
@@ -1850,6 +1850,9 @@ public interface Calculator {
18501850
18511851 /**
18521852 * <p>Calculates the moment of sunrise. </p>
1853+ *
1854+ * <p>The zenith angle can be represented by the result of the method
1855+ * {@link #getZenithAngle(double, int) getZenithAngle(latitude, altitude)}. </p>
18531856 *
18541857 * @param date the local calendar date
18551858 * @param latitude geographical latitude in degrees, positive for North, negative for South
@@ -1861,6 +1864,10 @@ public interface Calculator {
18611864 /*[deutsch]
18621865 * <p>Berechnet den Zeitpunkt des Sonnenaufgangs. </p>
18631866 *
1867+ * <p>Der Zenitwinkel kann mittels des Ergebnisses der Methode
1868+ * {@link #getZenithAngle(double, int) getZenithAngle(latitude, altitude)}
1869+ * berechnet werden. </p>
1870+ *
18641871 * @param date the local calendar date
18651872 * @param latitude geographical latitude in degrees, positive for North, negative for South
18661873 * @param longitude geographical longitude in degrees, positive for East, negative for West
@@ -1878,6 +1885,9 @@ Optional<Moment> sunrise(
18781885 /**
18791886 * <p>Calculates the moment of sunset. </p>
18801887 *
1888+ * <p>The zenith angle can be represented by the result of the method
1889+ * {@link #getZenithAngle(double, int) getZenithAngle(latitude, altitude)}. </p>
1890+ *
18811891 * @param date the local calendar date
18821892 * @param latitude geographical latitude in degrees, positive for North, negative for South
18831893 * @param longitude geographical longitude in degrees, positive for East, negative for West
@@ -1888,6 +1898,10 @@ Optional<Moment> sunrise(
18881898 /*[deutsch]
18891899 * <p>Berechnet den Zeitpunkt des Sonnenuntergangs. </p>
18901900 *
1901+ * <p>Der Zenitwinkel kann mittels des Ergebnisses der Methode
1902+ * {@link #getZenithAngle(double, int) getZenithAngle(latitude, altitude)}
1903+ * berechnet werden. </p>
1904+ *
18911905 * @param date the local calendar date
18921906 * @param latitude geographical latitude in degrees, positive for North, negative for South
18931907 * @param longitude geographical longitude in degrees, positive for East, negative for West
@@ -1949,21 +1963,28 @@ default double getFeature(
19491963 /**
19501964 * <p>Calculates the additional geodetic angle due to the extra altitude of the observer. </p>
19511965 *
1952- * <p>The default implementation just returns {@code 0.0}. </p>
1966+ * <p>The default implementation just returns {@code 0.0}. Negative altitudes modelling
1967+ * a valley between hight mountains are not supported but might be approximated by an angle
1968+ * calculation using the altitude difference between valley and mountain and also using
1969+ * the distance between valley and mountain resulting in a negative angle. </p>
19531970 *
19541971 * @param latitude the geographical latitude in degrees
1955- * @param altitude the altitude of the observer in meters
1972+ * @param altitude the altitude of the observer in meters, not negative
19561973 * @return geodetic angle correction in degrees
19571974 * @since 3.36/4.31
19581975 */
19591976 /*[deutsch]
19601977 * <p>Berechnet die zusätzliche geodätische Winkelkorrektur, die der Höhe
19611978 * des Beobachters auf der Erdoberfläche geschuldet ist. </p>
19621979 *
1963- * <p>Die Standardimplementierung liefert nur {@code 0.0}. </p>
1980+ * <p>Die Standardimplementierung liefert nur {@code 0.0}. Negative Höhen, die ein
1981+ * Tal zwischen hohen Bergen modellieren, werden nicht unterstützt. Eine solche
1982+ * Ausnahmesituation muß durch eine Winkelberechnung mit der Höhendifferenz
1983+ * zwischen Berg und Tal sowie der Entfernung Berg-Tal gelöst werden, resultierend
1984+ * in einem negativen Winkel. </p>
19641985 *
19651986 * @param latitude the geographical latitude in degrees
1966- * @param altitude the altitude of the observer in meters
1987+ * @param altitude the altitude of the observer in meters, not negative
19671988 * @return geodetic angle correction in degrees
19681989 * @since 3.36/4.31
19691990 */
@@ -1980,10 +2001,19 @@ default double getGeodeticAngle(
19802001 * <p>Calculates the angle of the sun relative to the zenith at sunrise or sunset. </p>
19812002 *
19822003 * <p>The default implementation just uses the standard refraction angle of 34 arc minutes,
1983- * adds to it {@code 90°} and the {@link #getGeodeticAngle(double, int) geodetic angle correction}. </p>
2004+ * adds to it {@code 90°} and the {@link #getGeodeticAngle(double, int) geodetic angle correction}.
2005+ * In case users do not want to take into account the geodetic angle correction, they might simply
2006+ * subtract latter one. Example for the situation of Denver in USA which is suited in a valley with
2007+ * far mountain ranges: </p>
2008+ *
2009+ * <pre>
2010+ * double zenith =
2011+ * calculator.getZenithAngle(latitude, altitude)
2012+ * - calculator.getGeodeticAngle(latitude, altitude);
2013+ * </pre>
19842014 *
19852015 * @param latitude the geographical latitude in degrees
1986- * @param altitude the altitude of the observer in meters
2016+ * @param altitude the altitude of the observer in meters, not negative
19872017 * @return effective zenith angle in degrees
19882018 * @since 3.36/4.31
19892019 */
@@ -1992,10 +2022,18 @@ default double getGeodeticAngle(
19922022 *
19932023 * <p>Die Standardimplementierung verwendet nur den normalen Refraktionswinkel von 34 Bogenminuten und
19942024 * addiert dazu {@code 90°} und die {@link #getGeodeticAngle(double, int) geodätische Winkelkorrektur}.
1995- * </p>
2025+ * Wird als Zenitwinkel eine Implementierung ohne Berücksichtigung der geodätischen
2026+ * Winkelkorrektur gewünscht, darf letztere einfach subtrahiert werden. Beispiel für die
2027+ * Situation von Denver in den USA, das in einem weiten Tal mit fernen Bergketten gelegen ist: </p>
2028+ *
2029+ * <pre>
2030+ * double zenith =
2031+ * calculator.getZenithAngle(latitude, altitude)
2032+ * - calculator.getGeodeticAngle(latitude, altitude);
2033+ * </pre>
19962034 *
19972035 * @param latitude the geographical latitude in degrees
1998- * @param altitude the altitude of the observer in meters
2036+ * @param altitude the altitude of the observer in meters, not negative
19992037 * @return effective zenith angle in degrees
20002038 * @since 3.36/4.31
20012039 */
0 commit comments