adjustZenith

fun adjustZenith(zenith: Double, elevation: Double): Double

Adjusts the zenith of astronomical sunrise and sunset to account for solar refraction, solar radius and elevation. The value for Sun's zenith and true rise/set Zenith (used in this class and subclasses) is the angle that the center of the Sun makes to a line perpendicular to the Earth's surface. If the Sun were a point and the Earth were without an atmosphere, true sunset and sunrise would correspond to a 90 zenith. Because the Sun is not a point, and because the atmosphere refracts light, this 90 zenith does not, in fact, correspond to true sunset or sunrise, instead the center of the Sun's disk must lie just below the horizon for the upper edge to be obscured. This means that a zenith of just above 90 must be used. The Sun subtends an angle of 16 minutes of arc (this can be changed via the .setSolarRadius method , and atmospheric refraction accounts for 34 minutes or so (this can be changed via the .setRefraction method), giving a total of 50 arcminutes. The total value for ZENITH is 90+(5/6) or 90.8333333 for true sunrise/sunset. Since a person at an elevation can see blow the horizon of a person at sea level, this will also adjust the zenith to account for elevation if available. Note that this will only adjust the value if the zenith is exactly 90 degrees. For values below and above this no correction is done. As an example, astronomical twilight is when the sun is 18 below the horizon or com.kosherjava.zmanim.AstronomicalCalendar.ASTRONOMICAL_ZENITH. This is traditionally calculated with none of the above mentioned adjustments. The same goes for various tzais and alos times such as the com.kosherjava.zmanim.ZmanimCalendarZENITH_16_POINT_1 dip used in com.kosherjava.zmanim.ComplexZmanimCalendar.getAlos16Point1Degrees.

Return

The zenith adjusted to include the sun's radius, .getRefraction and .getElevationAdjustment adjustment. This will only be adjusted for sunrise and sunset (if the zenith == 90)

Parameters

zenith

the azimuth below the vertical zenith of 90. For sunset typically the .adjustZenith used for the calculation uses geometric zenith of 90 and .adjustZenith this slightly to account for solar refraction and the sun's radius. Another example would be com.kosherjava.zmanim.AstronomicalCalendar.getEndNauticalTwilight that passes com.kosherjava.zmanim.AstronomicalCalendar.NAUTICAL_ZENITH to this method.

elevation

elevation in Meters.

See also

.getElevationAdjustment