The AstroAPI is a simple API allowing consumers to get planets and cusps positions. The AstroAPI uses Swiss Ephemeris library port to Java by Thomas Mack. AstroAPI is clear and tested API over this library.
Planets:
Sun, Moon, Mercury, Venus, Mars, Jupiter, Saturn, Uranus, Neptune, Pluto, Chiron, Lilith, NNode.
House systems:
Placidus, Koch, Porphyrius, Regiomontanus, Campanus, Equal, Vehlow Equal, Whole, Axial Rotation, Horizontal, Polich/Page, Alcabitius, Gauquelin sectors, Morinus.
Coordinate systems
Geocentric, Topocentric.
Zodiac type
Tropical, Sidereal
- High precision ephemeris developed by Astrodienst
- Thomas Mack - a port of the SwissEphemeris package to Java
- set path to ephemeris
- mvn clean package
- mvn javadoc:javadoc
// Topocentric, tropical, all planets.
Planet planetEphemeris = new PlanetBuilder(event)
.planets()
.topo(48.8555, 18.0488, 0)
.build();
planetEphemeris.toJSON();
// Geocentric, sidereal, Sun and Moon only.
Planet planetEphemeris = new PlanetBuilder(event)
.planet('Sun, Moon')
.zodiac("Fagan Bradley")
.build();
planetEphemeris.toJSON();
// Tropical, Campanus.
Cusp cuspEphemeris = new CuspBuilder(event)
.houses("Campanus")
.topo(48.8555, 18.0488, 0)
.build();
cuspEphemeris.toJSON();
// Sidereal, Placidus
Cusp cuspEphemeris = new CuspBuilder(event)
.houses("Palcidus")
.topo(48.8555, 18.0488, 0)
.zodiac("Fagan Bradley")
.build();
cuspEphemeris.toJSON();
// Tropical, the Moon in opposition with the Sun.
Transit transit = new TransitBuilder(event)
.planet("Moon")
.toPlanet("Sun")
.aspect(180.0)
.build();
System.out.println( transit.getDate() );
// Sidereal, the Moon in trine with the point 36.3° in zodiac.
Planet transit = new PlanetBuilder(event)
.planet('Moon')
.toPoint(36.3)
.aspect(120.0)
.zodiac("Fagan Bradley")
.build();
System.out.println( transit.getDate() );
GNU public version 3