Documentation
¶
Index ¶
- Variables
- func AltitudeOfCelestialBody(φ float64, δ float64, H float64) float64
- func ApparentObliquityOfTheEcliptic(t float64, ε0 float64) float64
- func ApparentSolarLongitude(t float64, L0 float64) float64
- func ApproximateTransit(L float64, Θ0 float64, α2 float64) float64
- func AscendingLunarNodeLongitude(t float64) float64
- func ClosestAngle(angle float64) float64
- func CorrectedHourAngle(m0 float64, h0 float64, coordinates *Coordinates, afterTransit bool, ...) float64
- func CorrectedTransit(m0 float64, L float64, Θ0 float64, α2 float64, α1 float64, α3 float64) float64
- func Degrees(radians float64) float64
- func GetJulianCentury(julianDay float64) float64
- func GetJulianDay(year int, month int, day int, hours float64) float64
- func Interpolate(y2 float64, y1 float64, y3 float64, n float64) float64
- func InterpolateAngles(y2 float64, y1 float64, y3 float64, n float64) float64
- func MeanLunarLongitude(t float64) float64
- func MeanObliquityOfTheEcliptic(t float64) float64
- func MeanSiderealTime(t float64) float64
- func MeanSolarAnomaly(t float64) float64
- func MeanSolarLongitude(t float64) float64
- func NormalizeWithBound(value float64, max float64) float64
- func NutationInLongitude(L0 float64, Lp float64, Ω float64) float64
- func NutationInObliquity(L0 float64, Lp float64, Ω float64) float64
- func Radians(degrees float64) float64
- func SolarEquationOfTheCenter(t float64, m float64) float64
- func UnwindAngle(value float64) float64
- type Coordinates
- type ShadowLength
- type SolarCoordinates
- type SolarTime
Constants ¶
This section is empty.
Variables ¶
var ShadowLengthToFloatMap = map[ShadowLength]float64{ SINGLE: 1.0, DOUBLE: 2.0, }
Functions ¶
func AltitudeOfCelestialBody ¶
AltitudeOfCelestialBody returns the altitude of the celestial body, given `φ` (the observer latitude), `δ` (the declination) and `H` (the local hour angle).
func ApparentObliquityOfTheEcliptic ¶
ApparentObliquityOfTheEcliptic returns the mean obliquity of the ecliptic, corrected for calculating the apparent position of the sun, in degrees, given `t` (julian century) and `ε0` (mean obliquity of the ecliptic).
func ApparentSolarLongitude ¶
ApparentSolarLongitude returns apparent longitude of the Sun, referred to as the true equinox of the date, given `t`, the julian century, and `L0`, the mean longitude.
func ApproximateTransit ¶
ApproximateTransit returns the approximate transite given L (the longitude), Θ0 (the sidereal time), and α2 (the right ascension).
func AscendingLunarNodeLongitude ¶
AscendingLunarNodeLongitude returns the ascending lunar node longitude, given `t`, the julian century,
func ClosestAngle ¶
func CorrectedHourAngle ¶
func CorrectedHourAngle(m0 float64, h0 float64, coordinates *Coordinates, afterTransit bool, Θ0 float64, α2 float64, α1 float64, α3 float64, δ2 float64, δ1 float64, δ3 float64) float64
CorrectedHourAngle returns the corrected hour angle given m0 (the approximate transit), h0 (the angle), coordinates (the coordinates), afterTransit(whether it's after transit), Θ0 (the sidereal time), α2 (the right ascension), α1 (the previous right ascension), α3 (the next right ascension), δ2 (the declination), δ1 (the previous declination), and δ3 (the next declination).
func CorrectedTransit ¶
func CorrectedTransit(m0 float64, L float64, Θ0 float64, α2 float64, α1 float64, α3 float64) float64
CorrectedTransit returns the time at which the sun is at its highest point in the sky (in universal time) given m0 (approximate transit), L (the longitude), Θ0 (the sidereal time), α2 (the right ascension), α1 (the previous right ascension) and α3 (the next right ascension).
func GetJulianCentury ¶
GetJulianCentury returns the Julian century from epoch, given `julianDay`.
func GetJulianDay ¶
GetJulianDay returns the Julian day for a given Gregorian date.
func Interpolate ¶
Interpolate returns the interpolated value given y2 (the value), y1 (the previous value), y3 (the next value) and n (the factor).
func InterpolateAngles ¶
InterpolateAngles returns the interpolation of three angles, accounting for angle unwinding, given y2 (the value), y1 (previousValue), y3 (nextValue), and n (factor).
func MeanLunarLongitude ¶
MeanLunarLongitude returns the geometric mean longitude of the moon in degrees, given `t`, the julian century.
func MeanObliquityOfTheEcliptic ¶
MeanObliquityOfTheEcliptic returns the mean obliquity of the ecliptic in degrees, given `t`, the julian century.
func MeanSiderealTime ¶
MeanSiderealTime returns mean sidereal time, aka the hour angle of the vernal equinox, in degrees, given `t`, the julian century.
func MeanSolarAnomaly ¶
MeanSolarAnomaly returns the sun's equation of the center in degrees, given `t`, the julian century, and `m`, the mean anomaly.
func MeanSolarLongitude ¶
MeanSolarLongitude returns the geometric mean longitude of the sun in degrees, given `t`, the julian century.
func NormalizeWithBound ¶
func NutationInLongitude ¶
NutationInLongitude returns the nutation in longitude, given `L0`, the the solar longitude, `Lp`, the lunar longitude and `Ω`, the ascending node.
func NutationInObliquity ¶
NutationInObliquity returns the nutation in obliquity, given `L0`, the the solar longitude, `Lp`, the lunar longitude and `Ω`, the ascending node.
func SolarEquationOfTheCenter ¶
SolarEquationOfTheCenter returns the sun's equation of the center in degrees, given `t`, the julian century, and `m`, the mean anomaly.
func UnwindAngle ¶
Types ¶
type Coordinates ¶
func NewCoordinates ¶
func NewCoordinates(latitude float64, longitude float64) (*Coordinates, error)
type SolarCoordinates ¶
type SolarCoordinates struct { // The declination of the sun, the angle between the rays of the Sun and the plane of the Earth's equator, in degrees. Declination float64 // Right ascension of the Sun, the angular distance on the celestial equator from the vernal equinox to the hour circle, in degrees. RightAscension float64 // Apparent sidereal time, the hour angle of the vernal equinox, in degrees. ApparentSiderealTime float64 }
func NewSolarCoordinates ¶
func NewSolarCoordinates(julian_day float64) *SolarCoordinates
type SolarTime ¶
type SolarTime struct { Transit float64 Sunrise float64 Sunset float64 Observer *Coordinates Solar *SolarCoordinates PrevSolar *SolarCoordinates NextSolar *SolarCoordinates ApproximateTransit float64 }
func NewSolarTime ¶
func NewSolarTime(d *data.DateComponents, c *Coordinates) *SolarTime
func (*SolarTime) Afternoon ¶
func (s *SolarTime) Afternoon(sl ShadowLength) float64