astro-0.4.1.3: Amateur astronomical computations

CopyrightAlexander Ignatyev 2016
Safe HaskellSafe
LanguageHaskell2010

Data.Astro.Coordinate

Description

See Data.Astro.Types module for Georgraphic Coordinates.

Celestial Coordinate Systems

Horizon coordinates

  • altitude, α - 'how far up' angle from the horizontal plane in degrees
  • azimuth, Α - 'how far round' agle from the north direction in degrees to the east

Equatorial coordinates

Accoring to the equatorial coordinates system stars move westwards along the circles centered in the north selestial pole, making the full cicrle in 24 hours of sidereal time (see Data.Astro.Time.Sidereal).

  • declination, δ - 'how far up' angle from the quatorial plane;
  • right ascension, α - 'how far round' angle from the vernal equinox to the east; or
  • hour angle - 'how far round' angle from the meridian to the west

Ecliptic Coordinate

Accoring to the ecliptic coordinates system the Sun moves eastwards along the trace of th ecliptic. The Sun's ecplitic latitude is always 0.

  • ecliptic latitude, β - 'how far up' angle from the ecliptic
  • ecliptic longitude, λ - 'how far round' angle from the vernal equinox to the east

Galactic Coordinates

  • galactic latitute, b - 'how far up' angle from the plane of the Galaxy
  • galactiv longitude, l - - 'how far round' angle from the direction the Sun - the centre of the Galaxy

Terms

  • ecliptic - the plane containing the Earth's orbit around the Sun
  • vernal equinox, ♈ - fixed direction lies along the line of the intersection of the equatorial plane and the ecliptic
  • obliquity of the ecliptic, β - the angle between the plane of the Earth's equator and the ecliptic
  • north selestial pole, P - the point on the selestial sphere, right above the Earth's North Pole

Examples

Horizontal Coordinate System

import Data.Astro.Coordinate
import Data.Astro.Types

hc :: HorizonCoordinates
hc = HC (DD 30.5) (DD 180)
-- HC {hAltitude = DD 30.0, hAzimuth = DD 180.0}

Equatorial Coordinate System

import Data.Astro.Coordinate
import Data.Astro.Types

ec1 :: EquatorialCoordinates1
ec1 = EC1 (DD 71.7) (DH 8)
-- EC1 {e1Declination = DD 71.7, e1RightAscension = DH 8.0}

ec2 :: EquatorialCoordinates2
ec2 = EC1 (DD 77.7) (DH 11)
-- EC2 {e2Declination = DD 77.7, e2HoursAngle = DH 11.0}

Transformations

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

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

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

sunHC :: HorizonCoordinates
sunHC = HC (fromDMS 49 18 21.77) (fromDMS 118 55 19.53)
-- HC {hAltitude = DD 49.30604722222222, hAzimuth = DD 118.92209166666666}

sunEC2 :: EquatorialCoordinates2
sunEC2 = horizonToEquatorial (geoLatitude ro) sunHC
-- EC2 {e2Declination = DD 23.378295912623855, e2HoursAngle = DH 21.437117068873537}

sunEC1 :: EquatorialCoordinates1
sunEC1 = EC1 (e2Declination sunEC2) (haToRA (e2HoursAngle sunEC2) (geoLongitude ro) (lctUniversalTime dt))
-- EC1 {e1Declination = DD 23.378295912623855, e1RightAscension = DH 6.29383725890224}


sunEC2' :: EquatorialCoordinates2
sunEC2' = EC2 (e1Declination sunEC1) (raToHA (e1RightAscension sunEC1) (geoLongitude ro) (lctUniversalTime dt))
-- EC2 {e2Declination = DD 23.378295912623855, e2HoursAngle = DH 21.437117068873537}

sunHC' :: HorizonCoordinates
sunHC' = equatorialToHorizon (geoLatitude ro) sunEC2'
-- HC {hAltitude = DD 49.30604722222222, hAzimuth = DD 118.92209166666666}

Function-shortcuts

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

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

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

sunHC :: HorizonCoordinates
sunHC = HC (fromDMS 49 18 21.77) (fromDMS 118 55 19.53)
-- HC {hAltitude = DD 49.30604722222222, hAzimuth = DD 118.92209166666666}

sunEC1 :: EquatorialCoordinates1
sunEC1 = hcToEC1 ro (lctUniversalTime dt) sunHC
-- EC1 {e1Declination = DD 23.378295912623855, e1RightAscension = DH 6.29383725890224}

sunHC' :: HorizonCoordinates
sunHC' = ec1ToHC ro (lctUniversalTime dt) sunEC1
-- HC {hAltitude = DD 49.30604722222222, hAzimuth = DD 118.92209166666666}

Synopsis

Documentation

newtype DecimalDegrees Source #

Constructors

DD Double 

Instances

Eq DecimalDegrees Source # 
Fractional DecimalDegrees Source # 
Num DecimalDegrees Source # 
Ord DecimalDegrees Source # 
Real DecimalDegrees Source # 
RealFrac DecimalDegrees Source # 
Show DecimalDegrees Source # 

newtype DecimalHours Source #

Constructors

DH Double 

Instances

Eq DecimalHours Source # 
Fractional DecimalHours Source # 
Num DecimalHours Source # 
Ord DecimalHours Source # 
Real DecimalHours Source # 
RealFrac DecimalHours Source # 
Show DecimalHours Source # 

raToHA :: DecimalHours -> DecimalDegrees -> JulianDate -> DecimalHours Source #

Convert Right Ascension to Hour Angle for specified longitude and Universal Time

haToRA :: DecimalHours -> DecimalDegrees -> JulianDate -> DecimalHours Source #

Convert Hour Angle to Right Ascension for specified longitude and Universal Time

equatorialToHorizon :: DecimalDegrees -> EquatorialCoordinates2 -> HorizonCoordinates Source #

Convert Equatorial Coordinates to Horizon Coordinates. It takes a latitude of the observer and EquatorialCoordinates2. If you need to convert EquatorialCoordinates1 you may use raToHa function to obtain EquatorialCoordinates2 or just use function-shortcut ec1ToHC straightaway. The functions returns HorizonCoordinates.

horizonToEquatorial :: DecimalDegrees -> HorizonCoordinates -> EquatorialCoordinates2 Source #

Convert Horizon Coordinates to Equatorial Coordinates. It takes a latitude of the observer and HorizonCoordinates. The functions returns EquatorialCoordinates2. If you need to obtain EquatorialCoordinates1 you may use haToRa function, or function-shortcut hcToEC1.

ec1ToHC :: GeographicCoordinates -> JulianDate -> EquatorialCoordinates1 -> HorizonCoordinates Source #

Convert Equatorial Coordinates (Type 1) to Horizon Coordinates. This is function shortcut - tt combines equatorialToHorizon and raToHA. It takes geographic coordinates of the observer, universal time and equatorial coordinates.

hcToEC1 :: GeographicCoordinates -> JulianDate -> HorizonCoordinates -> EquatorialCoordinates1 Source #

Convert Horizon Coordinates to Equatorial Coordinates (Type 1). This is function shortcut - tt combines horizonToEquatorial and haToRA. It takes geographic coordinates of the observer, universal time and horizon coordinates.

ecHCConv :: DecimalDegrees -> (DecimalDegrees, DecimalDegrees) -> (DecimalDegrees, DecimalDegrees) Source #

Function converts Equatorial Coordinates To Horizon Coordinates and vice versa It takes a latitide of the observer as a first parameter and a pair of 'how far up' and 'how far round' coordinates as a second parameter. It returns a pair of 'how far up' and 'how far round' coordinates.

obliquity :: JulianDate -> DecimalDegrees Source #

Calculate the obliquity of the ecpliptic on JulianDate

eclipticToEquatorial :: EclipticCoordinates -> JulianDate -> EquatorialCoordinates1 Source #

Converts Ecliptic Coordinates on specified Julian Date to Equatorial Coordinates

equatorialToEcliptic :: EquatorialCoordinates1 -> JulianDate -> EclipticCoordinates Source #

Converts Equatorial Coordinates to Ecliptic Coordinates on specified Julian Date

galacticToEquatorial :: GalacticCoordinates -> EquatorialCoordinates1 Source #

Convert Galactic Coordinates Equatorial Coordinates

equatorialToGalactic :: EquatorialCoordinates1 -> GalacticCoordinates Source #

Convert Equatorial Coordinates to Galactic Coordinates