Package-level declarations

Types

Link copied to clipboard
interface DawnPhase

A phase the sun can enter during dawn.

Link copied to clipboard
interface DuskPhase

A phase the sun can enter during dusk

Link copied to clipboard

States of the sun relevant to lighting effects. These states are of particular interest to photographers.

Link copied to clipboard

Times when particular solar events of interest happen. Examples would be things like Sunrise, sunset, solar noon, start of civil dawn, etc.

Link copied to clipboard
class SolarEventSequence(start: Instant, latitude: Double, longitude: Double, limit: Duration = 365.days, requestedSolarEvents: List<SolarEventType> = SolarEventType.simple) : Sequence<SolarEvent>

Sequence representing all SolarEvents supported by kAstro. The sequence will be ordered by SolarEvent.time with times farthest in the future being later in the Sequence. As implied by being a Sequence values will be lazily calculated so setting a large or even infinite limit is fine.

Link copied to clipboard
interface SolarEventType

Types of SolarEvents that can be requested in a SolarEventSequence

Link copied to clipboard

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

Link copied to clipboard
interface TwilightPhase

Represents the various Twilight phases the sun can have.

Functions

Link copied to clipboard
fun Instant.calculateSolarState(location: Pair<Double, Double>, height: Double = 0.0): SolarState
fun Instant.calculateSolarState(latitude: Double, longitude: Double, height: Double = 0.0): SolarState

Calculates the SolarState for a given Instant in time