Documentation
¶
Overview ¶
Package gosolarpos contains functions to find topocentric solar coordinates. That is, the position of the sun on the sky for a given latitude/longitude, time, and other parameters.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EstimateDeltaT ¶
EstimateDeltaT returns an inter- or extrapolated estimate of Delta T for the given time. This is based on Espenak and Meeus, "Five Millennium Canon of Solar Eclipses: -1999 to +3000" (NASA/TP-2006-214141) and an update by Espenak in 2014 on EclipseWise.com.
func Grena3 ¶
func Grena3(date time.Time, latitudeDegrees float64, longitudeDegrees float64, deltaTSeconds float64, pressureHPa float64, temperatureCelsius float64) (azimuthDegrees, zenithDegrees float64)
Grena3 calculates topocentric solar position following algorithm number 3 described in Grena, 'Five new algorithms for the computation of sun position from 2010 to 2110', Solar Energy 86 (2012) pp. 1323-1337.
Example ¶
date := time.Date(2015, 6, 23, 10, 30, 12, 0, time.UTC)
azimuth, zenithAngle := Grena3(date,
52.521667, // latitude (degrees)
13.413333, // longitude (degrees)
68, // Delta T (s)
1000, // air pressure (hPa)
20) // air temperature (°C)
fmt.Printf("azimuth: %.2f°, zenith: %.2f°\n", azimuth, zenithAngle)
Output: azimuth: 162.23°, zenith: 29.99°
Types ¶
This section is empty.