ItimLabinaCalculator

class ItimLabinaCalculator(val climate: ItimLabinaClimate = ItimLabinaClimate.STANDARD) : SpaCalculator

The calculator of the עתים לבינה luach. On top of the SpaCalculator's sun:

  • The horizon of sunrise and sunset (horizonZenith) is the sun's semidiameter plus a refraction traced through a model atmosphere and corrected by the place's climate (see HorizonRefraction), for the month, morning or evening, at the observer's elevation; seen from an elevation the dip of the horizon is added. The fixed refraction and solarRadius are not used.

  • Solar midnight (getUTCMidnight) is noon − 12 h minus whole seconds, found by stepping from noon − 12 h past the lower transit.

Its degree-based zmanim ("72 במעלות"…) are measured from that horizon: see AstronomicalCalendar.getSunriseOffsetByDegreesBelowHorizon and the ItimLabina zmanim of ComplexZmanimCalendar.

Constructors

Link copied to clipboard
constructor(climate: ItimLabinaClimate = ItimLabinaClimate.STANDARD)

Properties

Link copied to clipboard
open override val calculatorName: String

Returns the name of the algorithm.

Link copied to clipboard

Monthly temperatures of the place; refracted times depend on them by a few seconds.

Link copied to clipboard
var earthRadius: Double

The commonly used average earth radius in KM. At this time, this only affects elevation adjustment and not the sunrise and sunset calculations. The value currently defaults to 6356.9 KM.

Link copied to clipboard
var refraction: Double

The commonly used average solar refraction. Calendrical Calculations lists a more accurate global average of 34.478885263888294

Link copied to clipboard
var solarRadius: Double

The commonly used average solar radius in minutes of a degree.

Functions

Link copied to clipboard
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.

Link copied to clipboard
open override fun copy(): AstronomicalCalculator
Link copied to clipboard
fun getElevationAdjustment(elevation: Double): Double

Method to return the adjustment to the zenith required to account for the elevation. Since a person at a higher elevation can see farther below the horizon, the calculation for sunrise / sunset is calculated below the horizon used at sea level. This is only used for sunrise and sunset and not times before or after it such as com.kosherjava.zmanim.AstronomicalCalendar.getBeginNauticalTwilight since those calculations are based on the level of available light at the given dip below the horizon, something that is not affected by elevation, the adjustment should only made if the zenith == 90 .adjustZenith for refraction and solar radius. The algorithm used is

Link copied to clipboard
open override fun getUTCMidnight(date: LocalDate, geoLocation: GeoLocation): Double

Solar midnight (UTC, 24-hour format like getUTCNoon) following the solar noon of date, or Double.NaN to let the calendar take it as halfway between two solar noons, which is the default.

Link copied to clipboard
open override fun getUTCNoon(date: LocalDate, geoLocation: GeoLocation): Double

Return solar noon (UTC) for the given day at the given location on earth. The the com.kosherjava.zmanim.util.NOAACalculator implementation calculates true solar noon, while the com.kosherjava.zmanim.util.SunTimesCalculator approximates it, calculating the time as halfway between sunrise and sunset.

Link copied to clipboard
open override fun getUTCSunrise(LocalDate: LocalDate, geoLocation: GeoLocation, zenith: Double, adjustForElevation: Boolean): Double

A method that calculates UTC sunrise as well as any time based on an angle above or below sunrise. This abstract method is implemented by the classes that extend this class.

Link copied to clipboard
open override fun getUTCSunset(LocalDate: LocalDate, geoLocation: GeoLocation, zenith: Double, adjustForElevation: Boolean): Double

A method that calculates UTC sunset as well as any time based on an angle above or below sunset. This abstract method is implemented by the classes that extend this class.

Link copied to clipboard
open override fun horizonZenith(date: LocalDate, geoLocation: GeoLocation, isSunrise: Boolean, adjustForElevation: Boolean): Double

The zenith of the apparent horizon of sunrise (isSunrise) or sunset on date: where the sun's center is when its upper limb touches the horizon. This is what adjustZenith adds to the geometric zenith, and what AstronomicalCalendar.getSunriseOffsetByDegreesBelowHorizon measures from. The default is the fixed 90° + solarRadius + refraction, plus the elevation adjustment if adjustForElevation; calculators with a finer model of the horizon override it.