Companion

object Companion

Properties

Link copied to clipboard
const val ASTRONOMICAL_ZENITH: Double = 108.0

Sun's zenith at astronomical twilight (108).

Link copied to clipboard
const val CIVIL_ZENITH: Double = 96.0

Sun's zenith at civil twilight (96).

Link copied to clipboard
const val GEOMETRIC_ZENITH: Double = 90.0

90 below the vertical. Used as a basis for most calculations since the location of the sun is 90 below the horizon at sunrise and sunset. **Note **: it is important to note that for sunrise and sunset the adjusted zenith is required to account for the radius of the sun and refraction. The adjusted zenith should not be used for calculations above or below 90 since they are usually calculated as an offset to 90.

Link copied to clipboard
const val HOUR_MILLIS: Long

constant for milliseconds in an hour (3,600,000)

Link copied to clipboard
const val MINUTE_MILLIS: Long

constant for milliseconds in a minute (60,000)

Link copied to clipboard
const val NAUTICAL_ZENITH: Double = 102.0

Sun's zenith at nautical twilight (102).

Functions

Link copied to clipboard
fun getTimeOffset(time: <Error class: unknown class>?, offset: Double): <Error class: unknown class>?

A utility method that returns a date offset by the offset time passed in as a parameter. This method casts the offset as a long and calls getTimeOffset.

fun getTimeOffset(time: <Error class: unknown class>?, offset: Long): <Error class: unknown class>?

A utility method that returns a date offset by the offset time passed in. Please note that the level of light during twilight is not affected by elevation, so if this is being used to calculate an offset before sunrise or after sunset with the intent of getting a rough "level of light" calculation, the sunrise or sunset time passed to this method should be sea level sunrise and sunset.