public class TCPlanetPlanet 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 TCPlanetPlanet( sw, SweConst.SE_MERCURY, SweConst.SE_VENUS, flags, 0); ... 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 |
---|
TCPlanetPlanet(SwissEph sw,
int pl1,
int pl2,
int flags,
double offset)
Creates a new TransitCalculator for relative transits of two different
planets to each other with the option for transits over longitudes,
latitudes, distance or the speed in any of these directions in the
geocentric or topocentric coordinate system, and in tropical or sidereal
zodiac system, both with the sum and difference of both planets positions
and speeds.
|
TCPlanetPlanet(SwissEph sw,
int pl1,
int pl2,
int flags,
double offset,
int precalcCount,
double precalcSafetyfactor)
Creates a new TransitCalculator for relative transits of two different
planets to each other with the option for transits over longitudes,
latitudes, distance or the speed in any of these directions in the
geocentric or topocentric coordinate system, and in tropical or sidereal
zodiac system, both with the sum and difference of both planets positions
and speeds.
|
Modifier and Type | Method and Description |
---|---|
protected double |
calc(double jdET) |
protected boolean |
checkIdenticalResult(double offset,
double val) |
protected boolean |
checkResult(double offset,
double lastVal,
double val,
boolean above,
boolean pxway) |
protected double |
getDegreePrecision(double jd) |
double |
getMaxOffset() |
protected double |
getMaxSpeed() |
double |
getMinOffset() |
protected double |
getMinSpeed() |
protected double |
getNextJD(double jdET,
double val,
double offset,
double min,
double max,
boolean back) |
java.lang.Object[] |
getObjectIdentifiers()
This returns the two planet numbers involved as Strings.
|
double |
getOffset()
This returns the transit degree or other transit value of the relative
position or speed of the two planets.
|
boolean |
getRollover() |
protected double |
getTimePrecision(double degPrec) |
boolean |
hasPartileAspect(double jdET,
int p1,
int p2,
int flgs,
double offset)
Checks if the two planets have a partile aspect.
|
void |
setOffset(double value)
This sets the transit degree or other transit value for the difference
or sum of the positions or speeds of both planets.
|
java.lang.String |
toString() |
getRolloverVal
public TCPlanetPlanet(SwissEph sw, int pl1, int pl2, int flags, double offset)
Calculation of partile transits is possible now, but it's still a rather slow calculation and not finally tested.
sw
- A SwissEph object, if you have one available. May be null,
if you don't use sidereal or topocentric mode.pl1
- The planet number of the first planet.pl2
- The second planet that will be transited by the first planet.flags
- The calculation type flags (SweConst.SEFLG_TRANSIT_LONGITUDE,
SweConst.SEFLG_TRANSIT_LATITUDE or SweConst.SEFLG_TRANSIT_DISTANCE in
conjunction with SweConst.SEFLG_TRANSIT_SPEED for transits over a speed
value).SEFLG_TRANSIT_LONGITUDE | SEFLG_EQUATORIAL
,
for declination SEFLG_TRANSIT_LATITUDE | SEFLG_EQUATORIAL
.offset
- This is the desired transit degree or distance in AU or transit speed
in deg/day.TCPlanetPlanet(SwissEph, int, int, int, double, int, double)
,
TCPlanet.TCPlanet(SwissEph, int, int, double)
,
TCPlanet.TCPlanet(SwissEph, int, int, double, int, double)
,
SweConst.SEFLG_TRANSIT_LONGITUDE
,
SweConst.SEFLG_TRANSIT_LATITUDE
,
SweConst.SEFLG_TRANSIT_DISTANCE
,
SweConst.SEFLG_TRANSIT_SPEED
,
SweConst.SE_AST_OFFSET
,
SweConst.SEFLG_PARTILE_TRANSIT
,
SweConst.SEFLG_PARTILE_TRANSIT_START
,
SweConst.SEFLG_PARTILE_TRANSIT_END
,
SweConst.SEFLG_YOGA_TRANSIT
,
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 TCPlanetPlanet(SwissEph sw, int pl1, int pl2, int flags, double offset, int precalcCount, double precalcSafetyfactor)
Calculation of partile transits is possible now, but it's still a rather slow calculation and not finally tested.
sw
- A SwissEph object, if you have one available. May be null,
if you don't use sidereal or topocentric mode.pl1
- The planet number of the first planet.pl2
- The second planet that will be transited by the first planet.flags
- The calculation type flags (SweConst.SEFLG_TRANSIT_LONGITUDE,
SweConst.SEFLG_TRANSIT_LATITUDE or SweConst.SEFLG_TRANSIT_DISTANCE in
conjunction with SweConst.SEFLG_TRANSIT_SPEED for transits over a speed
value, and SweConst.SEFLG_YOGA_TRANSIT to calculate for the SUM of the
two positions or speeds instead of the difference plus
SweConst.SEFLG_PARTILE_TRANSIT, SweConst.SEFLG_PARTILE_TRANSIT_START or
SweConst.SEFLG_PARTILE_TRANSIT_END to calculate partile aspects).SEFLG_TRANSIT_LONGITUDE | SEFLG_EQUATORIAL
,
for declination SEFLG_TRANSIT_LATITUDE | SEFLG_EQUATORIAL
.offset
- This is an offset to the exact conjunction transit point.
E.g., when the offset is 180 for longitude calculations, you will get the
dates, when the two planets are opposite to each other. Note: The offset
is related to the FIRST planet, so an offset value of 30 degree will find
the transit points, when the FIRST planet will be 30 degrees after the
position of the second planet.precalcCount
- Only used, when a planet without known minimum and
maximum speed (or acceleration on speed transit) has to be calculated (this
is the case with asteroids for example). This value determines, how many
random calculations will be done to get an idea of the speed or acceleration
range of the planet. Defaults to 200, minimum is 100.precalcSafetyfactor
- Only for objects without known range of possible speeds
(esp. asteroids or similar): increase the calculated random speed values
by multiplying them with this safety factor. Defaults to 1.4, minimum will be 1.1.TCPlanetPlanet(SwissEph, int, int, int, double)
,
TCPlanet.TCPlanet(SwissEph, int, int, double)
,
TCPlanet.TCPlanet(SwissEph, int, int, double, int, double)
,
SweConst.SEFLG_TRANSIT_LONGITUDE
,
SweConst.SEFLG_TRANSIT_LATITUDE
,
SweConst.SEFLG_TRANSIT_DISTANCE
,
SweConst.SEFLG_TRANSIT_SPEED
,
SweConst.SEFLG_PARTILE_TRANSIT
,
SweConst.SEFLG_PARTILE_TRANSIT_START
,
SweConst.SEFLG_PARTILE_TRANSIT_END
,
SweConst.SEFLG_YOGA_TRANSIT
,
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 double getMinOffset()
getMinOffset
in class TransitCalculator
public double getMaxOffset()
getMaxOffset
in class TransitCalculator
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
public boolean hasPartileAspect(double jdET, int p1, int p2, int flgs, double offset)
jdET
- Time to checkp1
- First planetp2
- Second planetflgs
- Calculation flags, see the swe_calc() methodoffset
- The wanted offset between the planetsprotected 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
protected boolean checkResult(double offset, double lastVal, double val, boolean above, boolean pxway)
checkResult
in class TransitCalculator
protected double getNextJD(double jdET, double val, double offset, double min, double max, boolean back)
getNextJD
in class TransitCalculator
public java.lang.String toString()
toString
in class java.lang.Object