Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Data.Time.Solar
Contents
Description
This module contains basic solar calculation functions. It is based on the methods found at https://www.esrl.noaa.gov/gmd/grad/solcalc/calcdetails.html
Accordingly, the same caveats apply. This method is therefore only accurate for dates between 1901 and 2099. The sunrise and sunset results are theoretically accurate to within a minute for locations between +/- 72° latitude, and within 10 minutes outside of those latitudes.
Synopsis
- data Location = Location {}
- solarNoon :: ZonedTime -> Location -> ZonedTime
- solarMidnight :: ZonedTime -> Location -> ZonedTime
- sunrise :: ZonedTime -> Location -> ZonedTime
- sunset :: ZonedTime -> Location -> ZonedTime
- sunlightDuration :: ZonedTime -> Location -> DiffTime
- hourAngle :: ZonedTime -> Location -> Double
- trueSolarTime :: ZonedTime -> Location -> DiffTime
- solarZenithAngle :: ZonedTime -> Location -> Double
- solarElevationAngle :: ZonedTime -> Location -> Double
- solarNoonLST :: ZonedTime -> Location -> Double
- sunriseLST :: ZonedTime -> Location -> Double
- sunsetLST :: ZonedTime -> Location -> Double
- data ZonedTime = ZonedTime {}
Documentation
solarNoon :: ZonedTime -> Location -> ZonedTime Source #
Return the time of solar noon in a given timezone for a given day, at a given location. Solar noon is the moment when the sun contacts the observer's meridian, reaching its highest position above the horizon on that day.
solarMidnight :: ZonedTime -> Location -> ZonedTime Source #
Return the time of solar midnight, opposite of solarNoon
. Note that this
will return the next solar midnight!
sunrise :: ZonedTime -> Location -> ZonedTime Source #
Determine the time of sunrise relative to a zoned time, at a given location.
sunset :: ZonedTime -> Location -> ZonedTime Source #
Determine the time of sunset relative to a zoned time, at a given location.
sunlightDuration :: ZonedTime -> Location -> DiffTime Source #
Duration of sunlight on a given date and location.
hourAngle :: ZonedTime -> Location -> Double Source #
Return hour angle, one of the coordinates used in the equatorial coordinate system to give the direction of a point on the celestial sphere. Given in degrees.
trueSolarTime :: ZonedTime -> Location -> DiffTime Source #
Time of day at a given location as measured by the movement of the sun, given as time after midnight.
solarZenithAngle :: ZonedTime -> Location -> Double Source #
The solar zenith angle is the angle between the zenith and the centre of the Sun's disc. Given in degrees.
solarElevationAngle :: ZonedTime -> Location -> Double Source #
The solar elevation angle is the altitude of the Sun, the angle between
the horizon and the centre of the Sun's disc. Given in degrees.
Complimentary to solarZenithAngle
.
Local Solar Time
Re-Export
A local time together with a time zone.
Constructors
ZonedTime | |
Fields |
Instances
Data ZonedTime | |
Defined in Data.Time.LocalTime.Internal.ZonedTime Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ZonedTime -> c ZonedTime # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ZonedTime # toConstr :: ZonedTime -> Constr # dataTypeOf :: ZonedTime -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ZonedTime) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ZonedTime) # gmapT :: (forall b. Data b => b -> b) -> ZonedTime -> ZonedTime # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ZonedTime -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ZonedTime -> r # gmapQ :: (forall d. Data d => d -> u) -> ZonedTime -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ZonedTime -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ZonedTime -> m ZonedTime # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ZonedTime -> m ZonedTime # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ZonedTime -> m ZonedTime # | |
Show ZonedTime | |
NFData ZonedTime | |
Defined in Data.Time.LocalTime.Internal.ZonedTime | |
FormatTime ZonedTime | |
Defined in Data.Time.Format Methods formatCharacter :: Char -> Maybe (TimeLocale -> Maybe NumericPadOption -> Maybe Int -> ZonedTime -> String) # | |
ParseTime ZonedTime | |
Defined in Data.Time.Format.Parse |