public class TCPlanet 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 | SweConst.SEFLG_TRANSIT_SPEED; boolean backwards = false; TransitCalculator tc = new TCPlanet( sw, SweConst.SE_SATURN, flags, 0); ... double nextTransitET = sw.getTransitET(tc, jdET, backwards);This would calculate the (ET-) date, when the Saturn will change from retrograde to direct movement or vice versa.
rollover, rolloverVal
Constructor and Description |
---|
TCPlanet(SwissEph sw,
int planet,
int flags,
double offset)
Creates a new TransitCalculator for transits of any of the planet's
positions (longitudinal / latitudinal and distance) or speeds, be
it in the geocentric or topocentric coordinate system, or in tropical
or sidereal zodiac.
|
TCPlanet(SwissEph sw,
int planet,
int flags,
double offset,
int precalcCount,
double precalcSafetyfactor)
Creates a new TransitCalculator for transits of any of the planets
positions (longitudinal / latitudinal and distance) or speeds, be
it in the geocentric or topocentric coordinate system, or in tropical
or sidereal zodiac.
|
Modifier and Type | Method and Description |
---|---|
protected double |
calc(double jdET) |
protected double |
getDegreePrecision(double jd) |
double |
getMaxOffset() |
protected double |
getMaxSpeed() |
double |
getMinOffset() |
protected double |
getMinSpeed() |
java.lang.Object[] |
getObjectIdentifiers()
This returns the planet number as an Integer object.
|
double |
getOffset()
This returns the degree or other value of the position or speed of
the planet to transit.
|
boolean |
getRollover() |
protected double |
getTimePrecision(double degPrec) |
void |
setOffset(double value)
This sets the degree or other value for the position or speed of
the planet to transit.
|
java.lang.String |
toString() |
checkIdenticalResult, checkResult, getNextJD, getRolloverVal
public TCPlanet(SwissEph sw, int planet, int flags, double offset)
sw
- A SwissEph object, if you have one available. May be null,
if you don't use sidereal or topocentric mode.planet
- The transiting planet or object number.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.TCPlanetPlanet(SwissEph, int, int, int, double)
,
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_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 TCPlanet(SwissEph sw, int planet, int flags, double offset, int precalcCount, double precalcSafetyfactor)
sw
- A SwissEph object, if you have one available. May be null,
if you don't use sidereal or topocentric mode.planet
- The transiting planet or object number.new TCPlanet(...)
, changing the 1.4 safety factor will
change each single calculation time.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 or AU/day).precalcCount
- When calculating planets without saved extreme speeds,
you may change the default value of 200 random calculations to search for the
extreme speeds here.precalcSafetyfactor
- When calculating planets without saved extreme speeds,
you may change the default value of 1.4 as a safety factor to be multiplied with
the found extreme speeds here.TCPlanetPlanet.TCPlanetPlanet(SwissEph, int, int, int, double)
,
SweConst.SEFLG_TRANSIT_LONGITUDE
,
SweConst.SEFLG_TRANSIT_LATITUDE
,
SweConst.SEFLG_TRANSIT_DISTANCE
,
SweConst.SEFLG_TRANSIT_SPEED
,
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 desired offset value.getOffset()
public double getOffset()
getOffset
in class TransitCalculator
setOffset(double)
public java.lang.Object[] getObjectIdentifiers()
getObjectIdentifiers
in class TransitCalculator
protected double calc(double jdET)
calc
in class TransitCalculator
protected double getMaxSpeed()
getMaxSpeed
in class TransitCalculator
protected double getMinSpeed()
getMinSpeed
in class TransitCalculator
protected double getTimePrecision(double degPrec)
getTimePrecision
in class TransitCalculator
protected double getDegreePrecision(double jd)
getDegreePrecision
in class TransitCalculator
public java.lang.String toString()
toString
in class java.lang.Object