src

Go monorepo.
git clone git://code.dwrz.net/src
Log | Files | Refs

transit.go (319B)


      1 package sunrise
      2 
      3 import (
      4 	"math"
      5 )
      6 
      7 // SolarTransit calculates the Julian data for the local true solar transit.
      8 func SolarTransit(d, solarAnomaly, eclipticLongitude float64) float64 {
      9 	equationOfTime := 0.0053*math.Sin(solarAnomaly*Degree) -
     10 		0.0069*math.Sin(2*eclipticLongitude*Degree)
     11 	return d + equationOfTime
     12 }