Package-level declarations

Types

Link copied to clipboard
sealed interface LunarEvent : Comparable<LunarEvent>

Times when particular lunar events of interest happen. Examples would be moon set and moon rise.

Link copied to clipboard
class LunarEventSequence(start: Instant, latitude: Double, longitude: Double, limit: Duration = 365.days, requestedLunarEvents: List<LunarEvent.LunarEventType> = LunarEvent.all, reverse: Boolean = false) : Sequence<LunarEvent>

Sequence representing all LunarEvents supported by Kastro. The sequence will be ordered by SolarEvent.time either advancing forwards or backwards in time depending on the reverse parameter.

Link copied to clipboard
class LunarHorizonEventSequence(start: Instant, latitude: Double, longitude: Double, limit: Duration = 365.days, requestedHorizonEvents: List<LunarEvent.HorizonEvent.HorizonEventType> = LunarEvent.HorizonEvent.all, reverse: Boolean = false) : Sequence<LunarEvent.HorizonEvent>

Sequence representing all LunarEvent.HorizonEvents supported by Kastro. The sequence will be ordered by LunarEvent.time either advancing forwards or backwards in time depending on the reverse parameter.

Link copied to clipboard
class LunarIllumination(val fraction: Double, val phase: Double, val illuminationAngle: Double)

Calculates the illumination of the moon.

Link copied to clipboard
sealed interface LunarPhase

A LunarPhase is a specific shape of the moon's sunlit portion. There are Primary moon phases which are described by LunarPhase.Primary.phase and Intermediate moon phases which are described by LunarPhase.Intermediate.angleRange

Link copied to clipboard
class LunarPhaseSequence(start: Instant, limit: Duration = 365.days, requestedLunarPhases: List<LunarPhase.Primary> = LunarPhase.Primary.all, reverse: Boolean = false) : Sequence<LunarEvent.PhaseEvent>

Sequence representing all LunarEvent.PhaseEvents supported by Kastro. The sequence will be ordered by LunarEvent.time with times farthest in the future being later in the Sequence. As implied by being a Sequence

Link copied to clipboard

Calculates the position of the moon.

Link copied to clipboard

Single class containing all the information Kastro can calculate about Luna for a given instant of time. Contains the result of multiple calculations.

Properties

Link copied to clipboard
Link copied to clipboard

Checks if the moon is in a MicroMoon position.

Link copied to clipboard

Checks if the moon is in a SuperMoon position.

Functions

Link copied to clipboard

Calculates the distance of the moon for an instant in time.

Link copied to clipboard

Calculates the LunarIllumination for a given instant in time.

Link copied to clipboard
fun Instant.calculateLunarPosition(latitude: Double, longitude: Double): LunarPosition

Calculates the LunarPosition for a given instant in time.

Link copied to clipboard
fun Instant.calculateLunarState(location: Pair<Double, Double>): LunarState
fun Instant.calculateLunarState(latitude: Double, longitude: Double): LunarState

For a given time calculate the LunarState for a relative position. LunarState is a class containing the results of multiple calculations. Invoking this function provides maximum information about the moon for a given time/location. Therefore, this runs calculations requiring location and not requiring location, so you must have location to invoke.