swiss-ephemeris-1.4.0.0: Haskell bindings for the Swiss Ephemeris C library
LicenseAGPL-3
Maintainerswiss-ephemeris@lfborjas.com
PortabilityPOSIX
Safe HaskellSafe-Inferred
LanguageHaskell2010

Foreign.SwissEphemerisExtras

Description

Declarations of bindings to the underlying C library's non-essential functionality.

Import at your own risk!

Exposes very low-level FFI bindings to the C library. Use the SwissEphemeris.* modules and their more Haskell-friendly exports.

Synopsis

Documentation

data GravityObject a Source #

Equivalent to GROB in gravgroup.h

Constructors

GravityObject 

Fields

  • pos :: CDouble

    position of object in centiseconds.

  • lsize :: CDouble

    glyph size in your chosen graphics env, left side.

  • rsize :: CDouble

    glyph size in your chosen graphics env, right side.

  • ppos :: CDouble

    corrected ("placed") position after we're done; can set as zero.

  • sector_no :: CInt

    assigned sector number, will be set as objects are rearranged.

  • sequence_no :: CInt

    number in the sequence of objects, won't be re-assigned, but setting it is optional

  • level_no :: CInt

    when allowing for multi-level arrangement, the level an object ends up.

  • scale :: CDouble

    if any resizing is done, percentage of full size.

  • dp :: Ptr a

    pointer to additional data.

Instances

Instances details
Storable a => Storable (GravityObject a) Source # 
Instance details

Defined in Foreign.SwissEphemerisExtras

c_grav_group Source #

Arguments

:: Ptr (GravityObject a)

array of GROBs (GravityObjects)

-> CInt

nob

-> Ptr CDouble

sectors; must include an extra, final sector.

-> CInt

nsectors

-> CString

char* err

-> IO CInt 

Simple helper to recalculate positions for planets/bodies for drawing in a circular chart without collisions/ overlaps, keeping them inside their assigned "sectors" (e.g. houses.) See GravityObject.

c_grav_group2 Source #

Arguments

:: Ptr (GravityObject a)

array of GROBs (GravityObjects)

-> CInt

nob

-> Ptr CDouble

sectors; must include an extra, final sector.

-> CInt

nsectors

-> CBool

allow planets to "shift" levels?

-> CString

char* err

-> IO CInt 

More advanced version of grav_group that also allows:

  • Sending in zero sectors (i.e. just drawing in a circle)
  • Shifting between "levels" (closer to the center) as a way of resolving collisions in glyphs.