Safe Haskell | None |
---|---|
Language | Haskell2010 |
Exposes very low-level FFI bindings to the C library. Use the SwissEphemeris
module and its more
Haskell-friendly exports.
Synopsis
- newtype PlanetNumber = PlanetNumber {}
- newtype GregFlag = GregFlag {
- unGregFlag :: CInt
- newtype CalcFlag = CalcFlag {
- unCalcFlag :: CInt
- newtype SplitDegFlag = SplitDegFlag {}
- sun :: PlanetNumber
- moon :: PlanetNumber
- mercury :: PlanetNumber
- venus :: PlanetNumber
- mars :: PlanetNumber
- jupiter :: PlanetNumber
- saturn :: PlanetNumber
- uranus :: PlanetNumber
- neptune :: PlanetNumber
- pluto :: PlanetNumber
- julian :: GregFlag
- meanNode :: PlanetNumber
- gregorian :: GregFlag
- trueNode :: PlanetNumber
- meanApog :: PlanetNumber
- speed :: CalcFlag
- oscuApog :: PlanetNumber
- swissEph :: CalcFlag
- earth :: PlanetNumber
- chiron :: PlanetNumber
- equatorialPositions :: CalcFlag
- splitRoundSec :: SplitDegFlag
- specialEclNut :: PlanetNumber
- splitRoundMin :: SplitDegFlag
- splitRoundDeg :: SplitDegFlag
- splitZodiacal :: SplitDegFlag
- splitNakshatra :: SplitDegFlag
- splitKeepSign :: SplitDegFlag
- c_swe_set_ephe_path :: CString -> IO ()
- splitKeepDeg :: SplitDegFlag
- c_swe_close :: IO ()
- c_swe_julday :: CInt -> CInt -> CInt -> CDouble -> GregFlag -> CDouble
- c_swe_calc_ut :: CDouble -> PlanetNumber -> CalcFlag -> Ptr CDouble -> CString -> IO CalcFlag
- c_swe_houses :: CDouble -> CDouble -> CDouble -> CInt -> Ptr CDouble -> Ptr CDouble -> IO CInt
- c_swe_house_pos :: CDouble -> CDouble -> CDouble -> CInt -> Ptr CDouble -> CString -> IO CDouble
- c_swe_cotrans_sp :: Ptr CDouble -> Ptr CDouble -> CDouble -> IO ()
- c_swe_split_deg :: CDouble -> SplitDegFlag -> Ptr CInt -> Ptr CInt -> Ptr CInt -> Ptr CDouble -> Ptr CInt -> IO ()
- c_swe_deltat :: CDouble -> IO CDouble
- c_swe_sidtime :: CDouble -> IO CDouble
- c_swe_sidtime0 :: CDouble -> CDouble -> CDouble -> IO CDouble
Documentation
newtype PlanetNumber Source #
Instances
Eq PlanetNumber Source # | |
Defined in Foreign.SwissEphemeris (==) :: PlanetNumber -> PlanetNumber -> Bool # (/=) :: PlanetNumber -> PlanetNumber -> Bool # | |
Show PlanetNumber Source # | |
Defined in Foreign.SwissEphemeris showsPrec :: Int -> PlanetNumber -> ShowS # show :: PlanetNumber -> String # showList :: [PlanetNumber] -> ShowS # |
newtype SplitDegFlag Source #
Instances
Eq SplitDegFlag Source # | |
Defined in Foreign.SwissEphemeris (==) :: SplitDegFlag -> SplitDegFlag -> Bool # (/=) :: SplitDegFlag -> SplitDegFlag -> Bool # | |
Show SplitDegFlag Source # | |
Defined in Foreign.SwissEphemeris showsPrec :: Int -> SplitDegFlag -> ShowS # show :: SplitDegFlag -> String # showList :: [SplitDegFlag] -> ShowS # |
sun :: PlanetNumber Source #
moon :: PlanetNumber Source #
venus :: PlanetNumber Source #
mars :: PlanetNumber Source #
pluto :: PlanetNumber Source #
earth :: PlanetNumber Source #
c_swe_set_ephe_path :: CString -> IO () Source #
c_swe_close :: IO () Source #
c_swe_calc_ut :: CDouble -> PlanetNumber -> CalcFlag -> Ptr CDouble -> CString -> IO CalcFlag Source #
Calculate the position of a body, given a time in
Universal Time. Note that this is marginally more expensive than
swe_calc
, but I use this one to keep consistency with swe_houses
.
c_swe_houses :: CDouble -> CDouble -> CDouble -> CInt -> Ptr CDouble -> Ptr CDouble -> IO CInt Source #
Get the house cusps and other relevant angles for
a given time and place. Note that there's also a
swe_houses_armc
if one happens to have the ARMC
and the ecliptic obliquity handy from other calculations.
c_swe_house_pos :: CDouble -> CDouble -> CDouble -> CInt -> Ptr CDouble -> CString -> IO CDouble Source #
Calculate the house a planet is in. Takes into account obliquity of the ecliptic. Works for all house systems, except Koch.
c_swe_cotrans_sp :: Ptr CDouble -> Ptr CDouble -> CDouble -> IO () Source #
Low-level function to translate between coordinate systems, with speed position included.
c_swe_split_deg :: CDouble -> SplitDegFlag -> Ptr CInt -> Ptr CInt -> Ptr CInt -> Ptr CDouble -> Ptr CInt -> IO () Source #
Split a given ecliptic longitude into sign (number) degrees, minutes and seconds.
c_swe_deltat :: CDouble -> IO CDouble Source #
Calculate the delta time for a given julian time,
delta time + julian time = ephemeris time
NOTE: there's also swe_deltat_ex
which takes an ephemeris
flag explicitly, vs. the current global value.
my calculations work in one ephemeris, so this one is suitable.