SolarPhase

sealed interface SolarPhase

Represents the "state" of the sun. SolarEvents represent moments in time where state transitions may occur. SolarPhase, in contrast, represents the ranges between SolarEvents. For a given location there is always a SolarPhase to describe the sun at any given kotlinx.datetime.Instant

Inheritors

Types

Link copied to clipboard

The sun is in the range of AstronomicalTwilight during dawn.

Link copied to clipboard

The sun is in the range of AstronomicalTwilight during dusk.

Link copied to clipboard

The sun is in the range of CivilTwilight during dawn.

Link copied to clipboard

The sun is in the range of CivilTwilight during dusk.

Link copied to clipboard
data object Day : SolarPhase

No twilight phase observed. Sun is up.

Link copied to clipboard

The sun is in the range of NauticalTwilight during dawn.

Link copied to clipboard

The sun is in the range of NauticalTwilight during dusk.

Link copied to clipboard
data object Night : SolarPhase

No twilight phase observed. Sun is down.

Properties

Link copied to clipboard
abstract val startAngle: Double

The angle that this SolarPhase begins at.