SolarCalculator

Functions

Link copied to clipboard
fun calculateAzimuthDifference(currentAzimuth: Double, targetAzimuth: Double): Double

Calculate the shortest angular difference between two bearings, normalized to ±180°.

Link copied to clipboard
fun calculateSunPosition(dateTime: ZonedDateTime, latitude: Double, longitude: Double): SolarPosition

Calculate the sun's position in the sky for a given location and time.