Package-level declarations

Types

Link copied to clipboard
abstract class AstronomicalCalculator

An abstract class that all sun time calculating classes extend. This allows the algorithm used to be changed at runtime, easily allowing comparison the results of using different algorithms.

Link copied to clipboard
object DateUtils

TODO this is debateably an anti-pattern. Figure out where to put these functinos.

Link copied to clipboard
data class GeoLocation(var timeZone: TimeZone, var locationName: String)

A class that contains location information such as latitude and longitude required for astronomical calculations. The elevation field may not be used by some calculation engines and would be ignored if set. Check the documentation for specific implementations of the AstronomicalCalculator to see if elevation is calculated as part of the algorithm.

Link copied to clipboard
class ItimLabinaCalculator(val climate: ItimLabinaClimate = ItimLabinaClimate.STANDARD) : SpaCalculator

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

Link copied to clipboard
class ItimLabinaClimate(val minimum: DoubleArray, val maximum: DoubleArray, val mean: DoubleArray, val elevation: Double = 0.0)

Monthly climatology of a place (°C, January first), which drives the refraction of the horizon: minimum and maximum temperatures for sunrise and sunset, mean for the dip seen from an elevation, measured at elevation meters. WorldClim 2.1 normals on a 2.5' grid, with the grid's elevation, are a good source. STANDARD is the 15 °C standard atmosphere at sea level, every month.

Link copied to clipboard
data class Location(val latitude: Double, val longitude: Double, val elevation: Double? = null, val accuracy: Double? = null, val timestamp: Long? = null, val tz: TimeZone? = null, val locationName: String? = null)

Represents a coordinate on the globe. In contrast to GeoLocation which has an associated timezone and place name, Location may not. This is to accommodate various platforms, which may not expose as rich information as GeoLocation requires.

Link copied to clipboard

Implementation of sunrise and sunset methods to calculate astronomical times based on the NOAA algorithm. This calculator uses the Java algorithm based on the implementation by NOAA - National Oceanic and Atmospheric Administration's Surface Radiation Research Branch. NOAA's implementation is based on equations from Astronomical Algorithms by Jean Meeus. Added to the algorithm is an adjustment of the zenith to account for elevation. The algorithm can be found in the Wikipedia Sunrise Equation article.

Link copied to clipboard

A calculator after the NREL Solar Position Algorithm (Reda & Andreas, 2004): VSOP87 Earth terms, IAU 1980 nutation and aberration, geocentric sun. About 0.0003° on the sun's position, well under a second of sunrise time, where the NOAACalculator drifts by up to 0.01° (3–4 s). Times are solved for, not interpolated: the sun's altitude is bisected between the lower transit and solar noon.

Link copied to clipboard

Implementation of sunrise and sunset methods to calculate astronomical times. This calculator uses the Java algorithm written by htts://web.archive.org/web/20090531215353/http://www.kevinboone.com/suntimes.html that is based on the US Naval Observatory'sAstronomical Almanac and used with his permission. Added to Kevin's code is adjustment of the zenith to account for elevation. This algorithm returns the same time every year and does not account for leap years. It is not as accurate as the Jean Meeus based NOAACalculator that is the default calculator use by the KosherJava zmanim library.

Link copied to clipboard
data class Time(var hours: Int = 0, var minutes: Int = 0, var seconds: Int = 0, var milliseconds: Int = 0, var isNegative: Boolean = false)

A class that represents a numeric time. Times that represent a time of day are stored as java.util.Dates in this API. The time class is used to represent numeric time such as the time in hours, minutes, seconds and milliseconds of a com.kosherjava.zmanim.AstronomicalCalendar.temporalHour.

Link copied to clipboard
object WeekFormat