public class TCPlanetHouse extends TransitCalculator implements java.io.Serializable
You would create a TransitCalculator from this class and use the SwissEph.getTransit() methods to actually calculate a transit, e.g.:
SwissEph sw = new SwissEph(...); ... int flags = SweConst.SEFLG_SWIEPH | SweConst.SEFLG_TRANSIT_LONGITUDE; boolean backwards = true; TransitCalculator tc = new TCPlanetHouse( sw, SweConst.SE_MERCURY, SweConst.SEFLG_SWIEPH | SweConst.SEFLG_SIDEREAL, SweConst.SE_ASC, SweConst.SE_HSYS_PLACIDUS, SweConst.SEFLG_SWIEPH | SweConst.SEFLG_SIDEREAL, 52.22, 11.0, 0 flags, 30); ... double nextTransitUT = sw.getTransitUT(tc, jdUT, backwards);This would calculate the last (UT-) date, when Mercury and Venus had the same longitudinal position.
rollover, rolloverVal
Constructor and Description |
---|
TCPlanetHouse(SwissEph sw,
int planet,
int planetFlags,
int houseObject,
int houseSystem,
int houseFlags,
double houseGeolon,
double houseGeolat,
double offset)
Creates a new TransitCalculator for relative transits of a planet
over a house object.
|
TCPlanetHouse(SwissEph sw,
int planet,
int planetFlags,
int houseObject,
int houseSystem,
int houseFlags,
double houseGeolon,
double houseGeolat,
double offset,
int precalcCount,
double precalcSafetyfactor)
Creates a new TransitCalculator for relative transits of a planet
over a house object.
|
Modifier and Type | Method and Description |
---|---|
protected double |
calc(double jdET) |
protected boolean |
checkIdenticalResult(double offset,
double val) |
protected double |
getDegreePrecision(double jd) |
protected double |
getMaxSpeed() |
protected double |
getMinSpeed() |
java.lang.Object[] |
getObjectIdentifiers()
This returns the planet number, the house object, and the house system
as Strings.
|
double |
getOffset()
This returns the transit degree of the relative position of the planets
and the house object.
|
boolean |
getRollover() |
protected double |
getTimePrecision(double degPrec) |
void |
setOffset(double value)
This sets the transit degree for the difference of the positions of the
house object minus planet.
|
java.lang.String |
toString() |
checkResult, getMaxOffset, getMinOffset, getNextJD, getRolloverVal
public TCPlanetHouse(SwissEph sw, int planet, int planetFlags, int houseObject, int houseSystem, int houseFlags, double houseGeolon, double houseGeolat, double offset)
When calculating topocentric planet positions, be sure to call sw.swe_set_topo(...), when calculating in sidereal mode call sw.swe_set_sid_mode(...) prior to using this TransitCalculator.
Be sure to understand that planet and house calculations use distinct flags with one exception: if both use sidereal mode, both use the same sidereal mode.
sw
- A SwissEph object, if you have one available. May be null,
if you don't use topocentric or sidereal mode.planet
- The planet number of the transiting planet.planetFlags
- The flags for calculation of the planet.These are SweConst.SEFLG_TRANSIT_LONGITUDE and flags modifying the basic planet calculations: SweConst.SEFLG_TOPOCTR, SweConst.SEFLG_EQUATORIAL, SweConst.SEFLG_HELCTR, SweConst.SEFLG_TRUEPOS, and SweConst.SEFLG_SIDEREAL (also effects house object calculation), plus the ephemeris flags SweConst.SEFLG_MOSEPH, SweConst.SEFLG_SWIEPH, or SweConst.SEFLG_JPLEPH optionally.
houseObject
- The house object to be transited. One of:
SweConst.SE_HOUSE1
...
SweConst.SE_HOUSE12
SweConst.SE_ASC
SweConst.SE_MC
SweConst.SE_ARMC (sidereal time)
SweConst.SE_VERTEX,
SweConst.SE_EQUASC
SweConst.SE_COASC1
SweConst.SE_COASC2
SweConst.SE_POLASC
houseSystem
- The house system to use. Choose one from:
SweConst.SE_HSYS_PLACIDUS
SweConst.SE_HSYS_KOCH
SweConst.SE_HSYS_PORPHYRIUS
SweConst.SE_HSYS_REGIOMONTANUS
SweConst.SE_HSYS_CAMPANUS
SweConst.SE_HSYS_EQUAL (cusp 1 is ascendant)
SweConst.SE_HSYS_VEHLOW (asc. in middle of house 1)
SweConst.SE_HSYS_MERIDIAN (axial rotation system/ Meridian houses)
SweConst.SE_HSYS_HORIZONTAL (azimuthal or horizontal system)
SweConst.SE_HSYS_POLICH_PAGE ('topocentric' system)
SweConst.SE_HSYS_ALCABITIUS
// * SweConst.SE_HSYS_GAUQUELIN_SECTORS
SweConst.SE_HSYS_MORINUS
SweConst.SE_HSYS_KRUSINSKI
SweConst.SE_HSYS_WHOLE_SIGN
houseFlags
- The flags for house calculation (0 or SweConst.SEFLG_SIDEREAL)
and optionally SweConst.SEFLG_TRANSIT_LONGITUDE if not yet used in
planetFlagshouseGeolon
- Longitude for house calculation onlyhouseGeolat
- Latitude for house calculation onlyoffset
- This is the desired transit degree =
"position_of_planet - position_of_house_object"
.TCPlanetPlanet.TCPlanetPlanet(SwissEph, int, int, int, double, int, double)
,
TCPlanet.TCPlanet(SwissEph, int, int, double)
,
TCHouses.TCHouses(SwissEph, int, int, double, double, int, double)
,
SweConst.SEFLG_TRANSIT_LONGITUDE
,
SweConst.SE_AST_OFFSET
,
SweConst.SEFLG_TOPOCTR
,
SweConst.SEFLG_EQUATORIAL
,
SweConst.SEFLG_HELCTR
,
SweConst.SEFLG_TRUEPOS
,
SweConst.SEFLG_SIDEREAL
,
SweConst.SEFLG_MOSEPH
,
SweConst.SEFLG_SWIEPH
,
SweConst.SEFLG_JPLEPH
public TCPlanetHouse(SwissEph sw, int planet, int planetFlags, int houseObject, int houseSystem, int houseFlags, double houseGeolon, double houseGeolat, double offset, int precalcCount, double precalcSafetyfactor)
When calculating topocentric planet positions, be sure to call sw.swe_set_topo(...), when calculating in sidereal mode call sw.swe_set_sid_mode(...) prior to using this TransitCalculator.
Be sure to understand that planet and house calculations use distinct flags with one exception: if both use sidereal mode, both use the same sidereal mode.
sw
- A SwissEph object, if you have one available. May be null,
if you don't use topocentric or sidereal mode.planet
- The planet number of the transiting planet.planetFlags
- The flags for calculation of the planet.These are SweConst.SEFLG_TRANSIT_LONGITUDE and flags modifying the basic planet calculations: SweConst.SEFLG_TOPOCTR, SweConst.SEFLG_EQUATORIAL, SweConst.SEFLG_HELCTR, SweConst.SEFLG_TRUEPOS, and SweConst.SEFLG_SIDEREAL (also effects house object calculation), plus the ephemeris flags SweConst.SEFLG_MOSEPH, SweConst.SEFLG_SWIEPH, or SweConst.SEFLG_JPLEPH optionally.
houseObject
- The house object to be transited. One of:
SweConst.SE_HOUSE1
...
SweConst.SE_HOUSE12
SweConst.SE_ASC
SweConst.SE_MC
SweConst.SE_ARMC (sidereal time)
SweConst.SE_VERTEX,
SweConst.SE_EQUASC
SweConst.SE_COASC1
SweConst.SE_COASC2
SweConst.SE_POLASC
houseSystem
- The house system to use. Choose one from:
SweConst.SE_HSYS_PLACIDUS
SweConst.SE_HSYS_KOCH
SweConst.SE_HSYS_PORPHYRIUS
SweConst.SE_HSYS_REGIOMONTANUS
SweConst.SE_HSYS_CAMPANUS
SweConst.SE_HSYS_EQUAL (cusp 1 is ascendant)
SweConst.SE_HSYS_VEHLOW (asc. in middle of house 1)
SweConst.SE_HSYS_MERIDIAN (axial rotation system/ Meridian houses)
SweConst.SE_HSYS_HORIZONTAL (azimuthal or horizontal system)
SweConst.SE_HSYS_POLICH_PAGE ('topocentric' system)
SweConst.SE_HSYS_ALCABITIUS
// * SweConst.SE_HSYS_GAUQUELIN_SECTORS
SweConst.SE_HSYS_MORINUS
SweConst.SE_HSYS_KRUSINSKI
SweConst.SE_HSYS_WHOLE_SIGN
houseFlags
- The flags for house calculation (0 or SweConst.SEFLG_SIDEREAL)
and optionally SweConst.SEFLG_TRANSIT_LONGITUDE if not yet used in
planetFlagshouseGeolon
- Longitude for house calculation onlyhouseGeolat
- Latitude for house calculation onlyoffset
- This is the desired transit degree =
"position_of_planet - position_of_house_object"
.precalcCount
- Only for objects without known extreme speeds
(esp. asteroids or similar): count of random calculations to determine
the maximum and minimum speed of the planet or house system. Defaults
to 200 calculations, minimum will be 100 calculations.precalcSafetyfactor
- Only for objects without known extreme speeds
(esp. asteroids or similar): increase the calculated random speeds
by multiplying them with this safety factor. Defaults to 1.4, minimum will be 1.1.TCPlanetPlanet.TCPlanetPlanet(SwissEph, int, int, int, double, int, double)
,
TCPlanet.TCPlanet(SwissEph, int, int, double)
,
TCHouses.TCHouses(SwissEph, int, int, double, double, int, double)
,
SweConst.SEFLG_TRANSIT_LONGITUDE
,
SweConst.SE_AST_OFFSET
,
SweConst.SEFLG_TOPOCTR
,
SweConst.SEFLG_EQUATORIAL
,
SweConst.SEFLG_HELCTR
,
SweConst.SEFLG_TRUEPOS
,
SweConst.SEFLG_SIDEREAL
,
SweConst.SEFLG_MOSEPH
,
SweConst.SEFLG_SWIEPH
,
SweConst.SEFLG_JPLEPH
public boolean getRollover()
getRollover
in class TransitCalculator
TransitCalculator.rolloverVal
public void setOffset(double value)
setOffset
in class TransitCalculator
value
- The offset value.getOffset()
public double getOffset()
getOffset
in class TransitCalculator
setOffset(double)
public java.lang.Object[] getObjectIdentifiers()
getObjectIdentifiers
in class TransitCalculator
protected double getMaxSpeed()
getMaxSpeed
in class TransitCalculator
protected double getMinSpeed()
getMinSpeed
in class TransitCalculator
protected double calc(double jdET)
calc
in class TransitCalculator
protected double getTimePrecision(double degPrec)
getTimePrecision
in class TransitCalculator
protected double getDegreePrecision(double jd)
getDegreePrecision
in class TransitCalculator
protected boolean checkIdenticalResult(double offset, double val)
checkIdenticalResult
in class TransitCalculator
public java.lang.String toString()
toString
in class java.lang.Object