astro-0.4.3.0: Amateur astronomical computations
CopyrightAlexander Ignatyev 2017
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Astro.Star

Description

Stars.

Examples

Location

import Data.Astro.Time.JulianDate
import Data.Astro.Coordinate
import Data.Astro.Types
import Data.Astro.Star


ro :: GeographicCoordinates
ro = GeoC (fromDMS 51 28 40) (-(fromDMS 0 0 5))

dt :: LocalCivilTime
dt = lctFromYMDHMS (DH 1) 2017 6 25 10 29 0

-- Calculate location of Betelgeuse

betelgeuseEC1 :: EquatorialCoordinates1
betelgeuseEC1 = starCoordinates Betelgeuse
-- EC1 {e1Declination = DD 7.407064, e1RightAscension = DH 5.919529}

betelgeuseHC :: HorizonCoordinates
betelgeuseHC = ec1ToHC ro (lctUniversalTime dt) betelgeuseEC1
-- HC {hAltitude = DD 38.30483892505852, hAzimuth = DD 136.75755644642248}

Rise and Set

import Data.Astro.Time.JulianDate
import Data.Astro.Coordinate
import Data.Astro.Types
import Data.Astro.Effects
import Data.Astro.CelestialObject.RiseSet
import Data.Astro.Star


ro :: GeographicCoordinates
ro = GeoC (fromDMS 51 28 40) (-(fromDMS 0 0 5))

today :: LocalCivilDate
today = lcdFromYMD (DH 1) 2017 6 25

-- Calculate location of Betelgeuse

rigelEC1 :: EquatorialCoordinates1
rigelEC1 = starCoordinates Rigel

verticalShift :: DecimalDegrees
verticalShift = refract (DD 0) 12 1012
-- DD 0.5660098245614035

rigelRiseSet :: RiseSetLCT
rigelRiseSet = riseAndSetLCT ro today verticalShift rigelEC1
-- RiseSet (2017-06-25 06:38:18.4713 +1.0,DD 102.51249855335433) (2017-06-25 17:20:33.4902 +1.0,DD 257.48750144664564)
Synopsis

Documentation

data Star Source #

Some of the stars

Instances

Instances details
Eq Star Source # 
Instance details

Defined in Data.Astro.Star

Methods

(==) :: Star -> Star -> Bool #

(/=) :: Star -> Star -> Bool #

Show Star Source # 
Instance details

Defined in Data.Astro.Star

Methods

showsPrec :: Int -> Star -> ShowS #

show :: Star -> String #

showList :: [Star] -> ShowS #

starCoordinates :: Star -> EquatorialCoordinates1 Source #

Returns Equatorial Coordinates for the given star