Swiss Ephemeris for Clojure
This library is based on the Swiss Ephemeris port to Java by Thomas Mack. The source code of v2.01.00-01 is included, compiled and packaged. I guess any JVM-based language can use this ephemeris if there is interest.
To use it with just about any (other) programming language - take a look at ephemeris-api.
lein repl
There is a single calc
function in ephemeris.core
that does it all.
(calc) ;; give it a map of what you'd like to get - merged into the defaults
Here are the current defaults
as a template to override with what's wanted:
{:utc nil
:geo {:lat nil :lon nil}
:points [:Sun :Moon :Mercury :Venus :Mars :Jupiter :Saturn
:TrueNode :Uranus :Neptune :Pluto]
:angles [:Asc :MC]
:houses "O"
:meta true}
Without geo-location coordinates it returns the current (i.e. mundane) planet positions.
The time parameter :utc
can be a string in
ISO 8601 or
RFC 3339 format
which include ability to specify timezone.
This is just for testing purposes.
You can give it a 'string'
map, in edn
data format, see the defaults above.
It's full-featured, though also slow due to JVM startup time.
bin/ephemeris
bin/ephemeris '{}' # produces same result as the above
Run lein test
or better lein autotest
.
The following features are still missing. Some will be added soon and others later.
- Accept
:geo
location in more formats:- ISO 6709 string
- Vector of numbers
[43.22 27.92]
lat & lon -- are fixed in that order - Vector of strings
["43n13" "27e55"]
oldschool -- lat & lon in either order (parse & check: 'N', 'E', 'S', 'W')
- Error Handling
- Precision
:ephemeris
option:SWIEPH
or:JPLEPH
- Precession
:siderial true
or specify:ayanamsha
- Schema validation for
calc
parameter - House :System keywords would be better
- Fixed Stars
- Prenatal Lunation
- Testimonies
Anything else so far needed for practice of astrology, I believe could be derived without an ephemeris providing it.