Copyright | Alexander Ignatyev 2016 |
---|---|
Safe Haskell | Safe |
Language | Haskell2010 |
Data.Astro.Planet
Description
Planet calculations.
Example
Initialisation
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.Planet ro :: GeographicCoordinates ro = GeoC (fromDMS 51 28 40) (-(fromDMS 0 0 5)) dt :: LocalCivilTime dt = lctFromYMDHMS (DH 1) 2017 6 25 10 29 0 today :: LocalCivilDate today = lcdFromYMD (DH 1) 2017 6 25 jupiterDetails :: PlanetDetails jupiterDetails = j2010PlanetDetails Jupiter earthDetails :: PlanetDetails earthDetails = j2010PlanetDetails Earth jupiterPosition :: JulianDate -> EquatorialCoordinates1 jupiterPosition = planetPosition planetTrueAnomaly1 jupiterDetails earthDetails
Calcaulate Coordinates
jupiterEC1 :: EquatorialCoordinates1 jupiterEC1 = jupiterPosition (lctUniversalTime dt) -- EC1 {e1Declination = DD (-4.104626810672402), e1RightAscension = DH 12.863365504382228} jupiterHC :: HorizonCoordinates jupiterHC = ec1ToHC ro (lctUniversalTime dt) jupiterEC1 -- HC {hAltitude = DD (-30.67914598469227), hAzimuth = DD 52.29376845044007}
Calculate Distance
jupiterDistance :: AstronomicalUnits jupiterDistance = planetDistance1 jupiterDetails earthDetails (lctUniversalTime dt) -- AU 5.193435872521039
Calculate Angular Size
jupiterAngularSize :: DecimalDegrees jupiterAngularSize = planetAngularDiameter jupiterDetails jupiterDistance -- DD 1.052289877865987e-2 toDMS jupiterAngularSize -- (0,0,37.88243560317554)
Calculate Rise and Set
verticalShift :: DecimalDegrees verticalShift = refract (DD 0) 12 1012 -- DD 0.5660098245614035 jupiterRiseSet :: RiseSetMB jupiterRiseSet = riseAndSet2 0.000001 jupiterPosition ro verticalShift today -- RiseSet -- (Just (2017-06-25 13:53:27.3109 +1.0,DD 95.88943953535569)) -- (Just (2017-06-25 01:21:23.5835 +1.0,DD 264.1289033612776))
Synopsis
- data Planet
- data PlanetDetails = PlanetDetails {}
- j2010PlanetDetails :: Planet -> PlanetDetails
- planetTrueAnomaly1 :: PlanetDetails -> JulianDate -> DecimalDegrees
- planetTrueAnomaly2 :: PlanetDetails -> JulianDate -> DecimalDegrees
- planetPosition :: (PlanetDetails -> JulianDate -> DecimalDegrees) -> PlanetDetails -> PlanetDetails -> JulianDate -> EquatorialCoordinates1
- planetPosition1 :: PlanetDetails -> PlanetDetails -> JulianDate -> EquatorialCoordinates1
- planetDistance :: (PlanetDetails -> JulianDate -> DecimalDegrees) -> PlanetDetails -> PlanetDetails -> JulianDate -> AstronomicalUnits
- planetDistance1 :: PlanetDetails -> PlanetDetails -> JulianDate -> AstronomicalUnits
- planetAngularDiameter :: PlanetDetails -> AstronomicalUnits -> DecimalDegrees
- planetPhase1 :: PlanetDetails -> PlanetDetails -> JulianDate -> Double
- planetBrightLimbPositionAngle :: EquatorialCoordinates1 -> EquatorialCoordinates1 -> DecimalDegrees
Documentation
data PlanetDetails Source #
Details of the planetary orbit at the epoch
Constructors
PlanetDetails | |
Fields
|
Instances
Eq PlanetDetails Source # | |
Defined in Data.Astro.Planet.PlanetDetails Methods (==) :: PlanetDetails -> PlanetDetails -> Bool # (/=) :: PlanetDetails -> PlanetDetails -> Bool # | |
Show PlanetDetails Source # | |
Defined in Data.Astro.Planet.PlanetDetails Methods showsPrec :: Int -> PlanetDetails -> ShowS # show :: PlanetDetails -> String # showList :: [PlanetDetails] -> ShowS # |
j2010PlanetDetails :: Planet -> PlanetDetails Source #
PlanetDetails at the reference Epoch J2010.0
planetTrueAnomaly1 :: PlanetDetails -> JulianDate -> DecimalDegrees Source #
Calculate the planet true anomaly using approximate method
planetTrueAnomaly2 :: PlanetDetails -> JulianDate -> DecimalDegrees Source #
Calculate the planet true anomaly using the second 'more accurate' method
planetPosition :: (PlanetDetails -> JulianDate -> DecimalDegrees) -> PlanetDetails -> PlanetDetails -> JulianDate -> EquatorialCoordinates1 Source #
Calculate the planet's postion at the given date. It takes a function to calculate true anomaly, planet details of the planet, planet details of the Earth and JulianDate.
planetPosition1 :: PlanetDetails -> PlanetDetails -> JulianDate -> EquatorialCoordinates1 Source #
Calculate the planet's postion at the given date using the approximate algoruthm. It takes planet details of the planet, planet details of the Earth and JulianDate.
planetDistance :: (PlanetDetails -> JulianDate -> DecimalDegrees) -> PlanetDetails -> PlanetDetails -> JulianDate -> AstronomicalUnits Source #
Calculates the distance betweeth the planet and the Earth at the given date. It takes a function to calculate true anomaly, planet details of the planet, planet details of the Earth and JulianDate.
planetDistance1 :: PlanetDetails -> PlanetDetails -> JulianDate -> AstronomicalUnits Source #
Calculates the distance betweeth the planet and the Earth at the given date using the approximate algoruthm. It takes planet details of the planet, planet details of the Earth and JulianDate.
planetAngularDiameter :: PlanetDetails -> AstronomicalUnits -> DecimalDegrees Source #
Calculates the planet's angular diameter for the given distance.
planetPhase1 :: PlanetDetails -> PlanetDetails -> JulianDate -> Double Source #
Calculate the planet's phase at the given phase. Phase is a fraction of the visible disc that is illuminated. It takes the planet's details, the Earth's details and the julian date. Returns fraction values from 0 to 1.
planetBrightLimbPositionAngle :: EquatorialCoordinates1 -> EquatorialCoordinates1 -> DecimalDegrees Source #
Calculate the planet's position-angle of the bright limb. It takes the planet's coordinates and the Sun's coordinates. Position-angle is the angle of the midpoint of the illuminated limb measured eastwards from the north point of the disk.