Documentation
¶
Index ¶
Constants ¶
View Source
const J0 = 0.0009
calculations for sun times
View Source
const J1970 = 2440588
View Source
const J2000 = 2451545
Variables ¶
This section is empty.
Functions ¶
func IsNight ¶
func IsNight(sunrisePos SunPosition) bool
Types ¶
type DayTime ¶
type DayTime struct { MorningName DayTimeName Time time.Time }
type DayTimeName ¶
type DayTimeName string
const ( Sunrise DayTimeName = "sunrise" // sunrise (top edge of the sun appears on the horizon) Sunset DayTimeName = "sunset" // sunset (sun disappears below the horizon, evening civil twilight starts) SunriseEnd DayTimeName = "sunriseEnd" // sunrise ends (bottom edge of the sun touches the horizon) SunsetStart DayTimeName = "sunsetStart" // sunset starts (bottom edge of the sun touches the horizon) Dawn DayTimeName = "dawn" // dawn (morning nautical twilight ends, morning civil twilight starts) Dusk DayTimeName = "dusk" // dusk (evening nautical twilight starts) NauticalDawn DayTimeName = "nauticalDawn" // nautical dawn (morning nautical twilight starts) NauticalDusk DayTimeName = "nauticalDusk" // nautical dusk (evening astronomical twilight starts) NightEnd DayTimeName = "nightEnd" // night ends (morning astronomical twilight starts) Night DayTimeName = "night" // night starts (dark enough for astronomical observations) GoldenHourEnd DayTimeName = "goldenHourEnd" // morning golden hour (soft light, best DayTime for photography) ends GoldenHour DayTimeName = "goldenHour" // evening golden hour starts SolarNoon DayTimeName = "solarNoon" // solar noon (sun is in the highest position) Nadir DayTimeName = "nadir" // nadir (darkest moment of the night, sun is in the lowest position) )
type MoonIllumination ¶
type MoonIllumination struct {
// contains filtered or unexported fields
}
func GetMoonIllumination ¶
func GetMoonIllumination(date time.Time) MoonIllumination
calculations for illumination parameters of the moon, based on http://idlastro.gsfc.nasa.gov/ftp/pro/astro/mphase.pro formulas and Chapter 48 of "Astronomical Algorithms" 2nd edition by Jean Meeus (Willmann-Bell, Richmond) 1998.
type MoonPosition ¶
type MoonPosition struct { Azimuth float64 Altitude float64 Distance float64 ParallacticAngle float64 }
func GetMoonPosition ¶
func GetMoonPosition(date time.Time, lat float64, lng float64) MoonPosition
type MoonTimes ¶
func GetMoonTimes ¶
calculations for moon rise/set times are based on http://www.stargazing.net/kepler/moonrise.html article
type SunPosition ¶
func GetSunPosition ¶
func GetSunPosition(date time.Time, lat float64, lng float64) SunPosition
calculates sun position for a given date and latitude/longitude
Click to show internal directories.
Click to hide internal directories.