public class SwissEph
extends java.lang.Object
implements java.io.Serializable
One important note: in all this package, negative longitudes are considered to be west of Greenwich, positive longitudes are seen as east of Greenwich. America seems to often use a different notation!
You will find the complete documentation for the original SwissEphemeris package at http://www.astro.ch/swisseph/sweph_g.htm. By far most of the information there is directly valid for this port to Java as well.
Constructor and Description |
---|
SwissEph()
Constructs a new SwissEph object with the default search path for the
Swiss Ephemeris data files.
|
SwissEph(java.lang.String path)
Constructs a new SwissEph object with the specified search path for
the Swiss Ephemeris data files.
|
Modifier and Type | Method and Description |
---|---|
int |
calc(double jdET,
int ipl,
int iflag,
double[] xx)
This method will probably be deprecated some time in future or change
parameters.
|
double[] |
getDatafileTimerange(java.lang.String fname)
Returns the range of dates for a data file as [start, end]
|
double |
getFixstarMagnitude(java.lang.String star)
Returns the magnitude (brightness) of a fixstar.
|
double |
getFixstarMagnitude(java.lang.StringBuffer star)
Returns the magnitude (brightness) of a fixstar.
|
static java.lang.String |
getHouseobjectname(int obj)
Returns the name of the house object.
|
double |
getTransitET(TransitCalculator tc,
double jdET,
boolean backwards)
Searches for the next or previous transit of a planet over a specified
longitude, latitude, distance or speed value with geocentric or topocentric
positions in a tropical or sidereal zodiac.
|
double |
getTransitET(TransitCalculator tc,
double jdET,
boolean backwards,
double jdLimit)
Searches for the next or previous transit of a planet over a specified
longitude, latitude, distance or speed value with geocentric or topocentric
positions in a tropical or sidereal zodiac.
|
double |
getTransitUT(TransitCalculator tc,
double jdUT,
boolean backwards)
Searches for the next or previous transit of a planet over a specified
longitude, latitude, distance or speed value with geocentric or topocentric
positions in a tropical or sidereal zodiac.
|
double |
getTransitUT(TransitCalculator tc,
double jdUT,
boolean backwards,
double jdLimit)
Searches for the next or previous transit of a planet over a specified
longitude, latitude, distance or speed value with geocentric or topocentric
positions in a tropical or sidereal zodiac.
|
protected java.lang.String[] |
readFixstarParameters(java.lang.StringBuffer star,
java.lang.StringBuffer serr) |
void |
setHttpBufSize(int size)
This sets the buffer size for access to Swiss Ephemeris
or JPL
data files, if you specify an http-URL in swe_set_ephe_path() or via
the SwissEph constructor.
|
void |
setTransitSpeedsfile(java.lang.String fname,
boolean writeable)
-- NOT YET IMPLEMENTED -- File to read from and write to the maximum and minimum speeds of planets
and other objects.
|
void |
swe_azalt_rev(double tjd_ut,
int calc_flag,
double[] geopos,
double[] xin,
double[] xout)
Computes either ecliptic or equatorial coordinates from azimuth and true
altitude.
|
void |
swe_azalt(double tjd_ut,
int calc_flag,
double[] geopos,
double atpress,
double attemp,
double[] xin,
double[] xaz)
Computes the azimut and height from either ecliptic or equatorial
coordinates.
|
int |
swe_calc_ut(double tjd_ut,
int ipl,
int iflag,
double[] xx,
java.lang.StringBuffer serr)
This is the main calculation routine for all planets, asteroids, lunar
nodes and apogees.
|
int |
swe_calc(double tjd,
int ipl,
int iflag,
double[] xx,
java.lang.StringBuffer serr)
This is the main calculation routine for all planets, asteroids, lunar
nodes and apogees.
|
void |
swe_close() |
protected int |
swe_fixstar_mag(java.lang.StringBuffer star,
double[] mag,
java.lang.StringBuffer serr)
Returns the magnitude (brightness) of a fixstar.
|
int |
swe_fixstar_ut(java.lang.StringBuffer star,
double tjd_ut,
int iflag,
double[] xx,
java.lang.StringBuffer serr)
Computes fixed stars.
|
int |
swe_fixstar(java.lang.StringBuffer star,
double tjd,
int iflag,
double[] xx,
java.lang.StringBuffer serr)
Computes fixed stars.
|
int |
swe_gauquelin_sector(double t_ut,
int ipl,
java.lang.StringBuffer starname,
int iflag,
int imeth,
double[] geopos,
double atpress,
double attemp,
DblObj dgsect,
java.lang.StringBuffer serr)
Finds the gauquelin sector position of a planet or fixed star.
|
java.lang.String |
swe_get_ayanamsa_name(int isidmode) |
double |
swe_get_ayanamsa_ut(double tjd_ut)
This calculates the ayanamsha for a given date.
|
double |
swe_get_ayanamsa(double tjd_et)
This calculates the ayanamsha for a given date.
|
java.lang.String |
swe_get_planet_name(int ipl)
This will return the planet name for the given planet number.
|
java.lang.String |
swe_house_name(char hsys)
The function returns the name of the house system.
|
double |
swe_house_pos(double armc,
double geolat,
double eps,
int hsys,
double[] xpin,
java.lang.StringBuffer serr)
The function returns a value between 1.0 and 12.999999, indicating in
which house a planet is and how far from its cusp it is.
|
int |
swe_houses_armc(double armc,
double geolat,
double eps,
int hsys,
double[] cusp,
double[] ascmc)
Calculates the house positions and other vital points.
|
int |
swe_houses(double tjd_ut,
int iflag,
double geolat,
double geolon,
int hsys,
double[] cusp,
double[] ascmc)
Calculates the house positions and other vital points.
|
int |
swe_houses(double tjd_ut,
int iflag,
double geolat,
double geolon,
int hsys,
double[] cusp,
double[] ascmc,
int aOffs) |
java.lang.String |
swe_java_version()
Returns the version information of this swisseph package
including the version of this java port.
|
int |
swe_lat_to_lmt(double tjd_lat,
double geolon,
double[] tjd_lmt,
java.lang.StringBuffer serr) |
int |
swe_lmt_to_lat(double tjd_lmt,
double geolon,
double[] tjd_lat,
java.lang.StringBuffer serr) |
int |
swe_lun_eclipse_how(double tjd_ut,
int ifl,
double[] geopos,
double[] attr,
java.lang.StringBuffer serr)
Computes the attributes of a lunar eclipse for a given Julian Day,
geographic longitude, latitude, and height.
|
int |
swe_lun_eclipse_when_loc(double tjd_start,
int ifl,
double[] geopos,
double[] tret,
double[] attr,
int backward,
java.lang.StringBuffer serr) |
int |
swe_lun_eclipse_when(double tjd_start,
int ifl,
int ifltype,
double[] tret,
int backward,
java.lang.StringBuffer serr)
Computes the next lunar eclipse anywhere on earth.
|
int |
swe_lun_occult_when_glob(double tjd_start,
int ipl,
java.lang.StringBuffer starname,
int ifl,
int ifltype,
double[] tret,
int backward,
java.lang.StringBuffer serr)
Computes the next lunar occultation anywhere on earth.
|
int |
swe_lun_occult_when_loc(double tjd_start,
int ipl,
java.lang.StringBuffer starname,
int ifl,
double[] geopos,
double[] tret,
double[] attr,
int backward,
java.lang.StringBuffer serr)
Computes the next eclipse of any planet or fixstar at a given geographical
position.
|
int |
swe_lun_occult_where(double tjd_ut,
int ipl,
java.lang.StringBuffer starname,
int ifl,
double[] geopos,
double[] attr,
java.lang.StringBuffer serr)
Computes the geographic location for a given time, where a planet
occultation by the moon is central or maximum for a non-central
occultation.
|
int |
swe_nod_aps_ut(double tjd_ut,
int ipl,
int iflag,
int method,
double[] xnasc,
double[] xndsc,
double[] xperi,
double[] xaphe,
java.lang.StringBuffer serr)
Computes planetary nodes and apsides (perihelia, aphelia, second focal
points of the orbital ellipses).
|
int |
swe_nod_aps(double tjd_et,
int ipl,
int iflag,
int method,
double[] xnasc,
double[] xndsc,
double[] xperi,
double[] xaphe,
java.lang.StringBuffer serr)
Computes planetary nodes and apsides (perihelia, aphelia, second focal
points of the orbital ellipses).
|
int |
swe_pheno_ut(double tjd_ut,
int ipl,
int iflag,
double[] attr,
java.lang.StringBuffer serr)
Computes phase, phase angel, elongation, apparent diameter and apparent
magnitude for sun, moon, all planets and asteroids.
|
int |
swe_pheno(double tjd,
int ipl,
int iflag,
double[] attr,
java.lang.StringBuffer serr)
Computes phase, phase angel, elongation, apparent diameter and apparent
magnitude for sun, moon, all planets and asteroids.
|
double |
swe_refrac_extended(double inalt,
double geoalt,
double atpress,
double lapse_rate,
double attemp,
int calc_flag,
double[] dret)
Calculates the true altitude from the apparent altitude or vice versa.
|
double |
swe_refrac(double inalt,
double atpress,
double attemp,
int calc_flag)
Calculates the true altitude from the apparent altitude or vice versa.
|
int |
swe_rise_trans_true_hor(double tjd_ut,
int ipl,
java.lang.StringBuffer starname,
int epheflag,
int rsmi,
double[] geopos,
double atpress,
double attemp,
double horhgt,
DblObj tret,
java.lang.StringBuffer serr)
Same as swe_rise_trans(), but allows to define the height of the horizon
at the point of the rising or setting (horhgt) in degree.
|
int |
swe_rise_trans(double tjd_ut,
int ipl,
java.lang.StringBuffer starname,
int epheflag,
int rsmi,
double[] geopos,
double atpress,
double attemp,
DblObj tret,
java.lang.StringBuffer serr)
Calculates the times of rising, setting and meridian transits for all
planets, asteroids, the moon, and the fixed stars.
|
void |
swe_set_ephe_path(java.lang.String path)
This sets the search path for the ephemeris data files.
|
void |
swe_set_jpl_file(java.lang.String fname)
This sets the name of the file that contains the ephemeris data
for the use with the JPL ephemeris.
|
void |
swe_set_sid_mode(int sid_mode)
This sets the ayanamsha mode for sidereal planet calculations.
|
void |
swe_set_sid_mode(int sid_mode,
double t0,
double ayan_t0)
This sets a custom ayanamsha mode for sidereal planet calculations.
|
void |
swe_set_topo(double geolon,
double geolat,
double geoalt)
If you want to do calculations relative to the observer on some place
on the earth rather than relative to the center of the earth, you will
want to set the geographic location with this method.
|
int |
swe_sol_eclipse_how(double tjd_ut,
int ifl,
double[] geopos,
double[] attr,
java.lang.StringBuffer serr)
Computes the attributes of a solar eclipse for a given Julian Day,
geographic longitude, latitude, and height.
|
int |
swe_sol_eclipse_when_glob(double tjd_start,
int ifl,
int ifltype,
double[] tret,
int backward,
java.lang.StringBuffer serr)
Computes the next solar eclipse anywhere on earth.
|
int |
swe_sol_eclipse_when_loc(double tjd_start,
int ifl,
double[] geopos,
double[] tret,
double[] attr,
int backward,
java.lang.StringBuffer serr)
Computes the next solar eclipse at a given geographical position.
|
int |
swe_sol_eclipse_where(double tjd_ut,
int ifl,
double[] geopos,
double[] attr,
java.lang.StringBuffer serr)
Computes the geographic location for a given time, where a solar
eclipse is central (or maximum for a non-central eclipse).
|
int |
swe_time_equ(double tjd_ut,
double[] E,
java.lang.StringBuffer serr)
Returns the difference between local apparent and local mean time in
days.
|
java.lang.String |
swe_version()
Returns the version information of this swisseph package.
|
public SwissEph()
SweConst.SE_EPHE_PATH
public SwissEph(java.lang.String path)
path
- The search path for the Swiss Ephemeris
and JPL
data files. If null or empty, a default path will be used.
Additionally to the '\' character, you will have to quote ':' and ';',
so a path like "C:\swiss\ephe"
has to be written
as "C\\:\\swiss\\ephe"
.
You can specify multiple path elements separated by the (unquoted) ':' or
';' character. See swe_set_ephe_path() for more information.SweConst.SE_EPHE_PATH
,
swe_set_ephe_path(java.lang.String)
public void setHttpBufSize(int size)
Some test numbers for the calculation of sun, and for calculation of
9 planets in a row:
buffer size | HTTP Requests for the sun | HTTP Requests for 9 planets |
---|---|---|
100 | 57 | 69 |
200 | 30 | 40 |
300 | 23 | 33 |
400 | 19 | 29 |
800 | 14 | 24 |
size
- The size of the buffer. It defaults to 300 bytes. Values less
than 100 bytes will be increased to 100 bytes, as you will only increase
the number of requests dramatically, but the amount of bytes transferred
will just be minimal less.swe_set_ephe_path(java.lang.String)
public java.lang.String swe_version()
swe_java_version()
public java.lang.String swe_java_version()
swe_version()
public int swe_calc_ut(double tjd_ut, int ipl, int iflag, double[] xx, java.lang.StringBuffer serr)
tjd_ut
- The Julian Day number in UT (Universal Time).ipl
- The body to be calculated. See
SweConst for a list of bodiesiflag
- A flag that contains detailed specification on how the body
is to be computed. See SweConst
for a list of valid flags (SEFLG_*).xx
- A double[6] in which the result is returned. See swe_calc() for
the description of this parameterserr
- A StringBuffer containing a warning or error message, if
something fails.swe_calc(double, int, int, double[], java.lang.StringBuffer)
,
SweDate.setGlobalTidalAcc(double)
public int swe_calc(double tjd, int ipl, int iflag, double[] xx, java.lang.StringBuffer serr)
tjd_et + SweDate.getDeltaT(tjd_et)
.
The parameter xx is used as an output parameter containing the following info:
xx[0]: longitude
xx[1]: latitude
xx[2]: distance in AU
xx[3]: speed in longitude (degree / day)
xx[4]: speed in latitude (degree / day)
xx[5]: speed in distance (AU / day)
The speed infos will be calculated only, if the appropriate SEFLG_* switch is set.
tjd
- The Julian Day number in ET (UT + deltaT).ipl
- The body to be calculated. See
SweConst for a list of bodiesiflag
- A flag that contains detailed specification on how the body
is to be computed. See SweConst
for a list of valid flags (SEFLG_*).xx
- A double[6] in which the result is returned. See above for more
details.serr
- A StringBuffer containing a warning or error message, if
something fails.swe_calc_ut(double, int, int, double[], java.lang.StringBuffer)
,
swe_fixstar_ut(java.lang.StringBuffer, double, int, double[], java.lang.StringBuffer)
,
swe_fixstar(java.lang.StringBuffer, double, int, double[], java.lang.StringBuffer)
public int calc(double jdET, int ipl, int iflag, double[] xx) throws SwissephException
jdET
- The Julian Day number in ET (UT + deltaT).ipl
- The body to be calculated. See
SweConst for a list of bodiesiflag
- A flag that contains detailed specification on how the body
is to be computed. See SweConst
for a list of valid flags (SEFLG_*).xx
- A double[6] in which the result is returned. See above for more
details.SwissephException
swe_calc_ut(double, int, int, double[], java.lang.StringBuffer)
,
swe_calc(double, int, int, double[], java.lang.StringBuffer)
public void swe_close()
public void swe_set_ephe_path(java.lang.String path)
"./ephe:C\\:\\ephe:http\\://th-mack.de/datafiles"
for a search path of: a) local subdirectory ephe, or, if something is
not found here, b) in C:\ephe, or as a last resort c)
http://th-mack.de/datafiles.Note: Opposed to the behaviour of
the C version, the Java version does not evaluate environment variables.
This is also true for the environment variable SE_EPHE_PATH!
ATTENTION: This method possibly (re-)sets a global parameter used
in calculation of delta T. See SweDate.setGlobalTidalAcc(double).
path
- The search path for the Swiss Ephemeris
and JPL
data files. If null or empty, a default path will be used.
Additionally to the '\' character, you will have to quote ':' and ';',
so a path like "C:\swiss\ephe"
has to be written
as "C\\:\\swiss\\ephe"
.
You can specify multiple path elements separated by the (unquoted) ':' or
';' character.SweDate.setGlobalTidalAcc(double)
public void swe_set_jpl_file(java.lang.String fname)
fname
- Name of the JPL data fileSweConst.SE_FNAME_DFT
,
swe_set_ephe_path(java.lang.String)
public void swe_set_sid_mode(int sid_mode)
SE_SIDM_FAGAN_BRADLEY
SE_SIDM_LAHIRI
SE_SIDM_DELUCE
SE_SIDM_RAMAN
SE_SIDM_USHASHASHI
SE_SIDM_KRISHNAMURTI
SE_SIDM_DJWHAL_KHUL
SE_SIDM_YUKTESHWAR
SE_SIDM_JN_BHASIN
SE_SIDM_BABYL_KUGLER1
SE_SIDM_BABYL_KUGLER2
SE_SIDM_BABYL_KUGLER3
SE_SIDM_BABYL_HUBER
SE_SIDM_BABYL_ETPSC
SE_SIDM_ALDEBARAN_15TAU
SE_SIDM_HIPPARCHOS
SE_SIDM_SASSANIAN
SE_SIDM_GALCENT_0SAG
SE_SIDM_J2000
SE_SIDM_J1900
SE_SIDM_B1950
sid_mode
- One of the above ayanamsha modes plus (optionally)
one of the non-standard sidereal calculation modes of
SE_SIDBIT_ECL_T0
or SE_SIDBIT_SSY_PLANE
.swe_set_sid_mode(int, double, double)
,
SweConst.SE_SIDM_FAGAN_BRADLEY
,
SweConst.SE_SIDM_LAHIRI
,
SweConst.SE_SIDM_DELUCE
,
SweConst.SE_SIDM_RAMAN
,
SweConst.SE_SIDM_USHASHASHI
,
SweConst.SE_SIDM_KRISHNAMURTI
,
SweConst.SE_SIDM_DJWHAL_KHUL
,
SweConst.SE_SIDM_YUKTESHWAR
,
SweConst.SE_SIDM_JN_BHASIN
,
SweConst.SE_SIDM_BABYL_KUGLER1
,
SweConst.SE_SIDM_BABYL_KUGLER2
,
SweConst.SE_SIDM_BABYL_KUGLER3
,
SweConst.SE_SIDM_BABYL_HUBER
,
SweConst.SE_SIDM_BABYL_ETPSC
,
SweConst.SE_SIDM_ALDEBARAN_15TAU
,
SweConst.SE_SIDM_HIPPARCHOS
,
SweConst.SE_SIDM_SASSANIAN
,
SweConst.SE_SIDM_GALCENT_0SAG
,
SweConst.SE_SIDM_J2000
,
SweConst.SE_SIDM_J1900
,
SweConst.SE_SIDM_B1950
,
SweConst.SE_SIDBIT_ECL_T0
,
SweConst.SE_SIDBIT_SSY_PLANE
public void swe_set_sid_mode(int sid_mode, double t0, double ayan_t0)
swe_set_sid_mode(SweConst.SE_SIDM_LAHIRI)Normally, you would use this method in the sense of:
swe_set_sid_mode(SweConst.SE_SIDM_LAHIRI, 0, 0)
swe_set_sid_mode(SweConst.SE_SIDM_USER, 2450789.5, 23.454578)If you don't set any ayanamsha mode via one of the swe_set_sid_mode() methods, it will default to Fagan/Bradley (SE_SIDM_FAGAN_BRADLEY).
sid_mode
- SweConst.SE_SIDM_USER plus (optionally)
one of the non-standard sidereal calculation modes of
SE_SIDBIT_ECL_T0
or SE_SIDBIT_SSY_PLANE
.
You may also use any of the SE_SIDM_* parameters of swe_set_sid_mode(int).
The parameters t0 and ayan_t0 will be irrelevant in that case.t0
- Reference date (Julian day), if sid_mode is SE_SIDM_USERayan_t0
- Initial ayanamsha at t0, if sid_mode is SE_SIDM_USER. This
is (tropical position - sidereal position) at date t0.swe_set_sid_mode(int)
,
SweConst.SE_SIDM_USER
,
SweConst.SE_SIDBIT_ECL_T0
,
SweConst.SE_SIDBIT_SSY_PLANE
public double swe_get_ayanamsa(double tjd_et)
tjd_et
- The date as Julian Day in ET (Ephemeris Time or Dynamic Time)swe_set_sid_mode(int, double, double)
,
swe_get_ayanamsa_ut(double)
public double swe_get_ayanamsa_ut(double tjd_ut)
tjd_ut
- The date as Julian Day in UT (Universal Time)swe_set_sid_mode(int, double, double)
,
swe_get_ayanamsa(double)
public int swe_fixstar(java.lang.StringBuffer star, double tjd, int iflag, double[] xx, java.lang.StringBuffer serr)
tjd_et + SweDate.getDeltaT(tjd_et)
.
The fixed stars are defined in the file sefstars.txt and the star
parameter must refer to any entry in that file. The entries in that file
start with traditional_name ,nomenclature_name,..., e.g.,
"Alpheratz ,alAnd,
"[...].
star
- Actually, it is an input and an output parameter at the same
time. So it is not possible to define it as a String, but rather as a
StringBuffer. On input it defines the star to be calculated and can be
in three forms:Alpheratz,alAnd
".tjd
- The Julian Day in ETiflag
- Any of the SweConst.SEFLG_* flagsxx
- A double[6] used as output parameter only. This returns
longitude, latitude and the distance (in AU) of the fixed stars, but
it does not return any speed values in xx[3] to xx[5] as it does
in swe_calc() / swe_calc_ut(), even if you specify SweConst.SEFLG_SPEED
in the flags parameter!serr
- A StringBuffer containing a warning or error message, if
something fails.swe_fixstar(java.lang.StringBuffer, double, int, double[], java.lang.StringBuffer)
,
SweDate.setGlobalTidalAcc(double)
protected java.lang.String[] readFixstarParameters(java.lang.StringBuffer star, java.lang.StringBuffer serr)
public int swe_fixstar_ut(java.lang.StringBuffer star, double tjd_ut, int iflag, double[] xx, java.lang.StringBuffer serr)
The fixed stars are defined in the file sefstars.txt and the star
parameter must refer to any entry in that file. The entries in that file
start with traditional_name ,nomenclature_name,..., e.g.,
"Alpheratz ,alAnd,
"[...].
star
- Actually, it is an input and an output parameter at the same
time. So it is not possible to define it as a String, but rather as a
StringBuffer. On input it defines the star to be calculated and can be
in three forms:Alpheratz,alAnd
".tjd_ut
- The Julian Day in UTiflag
- Any of the SweConst.SEFLG_* flagsxx
- A double[6] used as output parameter only. This returns
longitude, latitude and the distance (in AU) of the fixed stars, but
it does not return any speed values in xx[3] to xx[5] as it does
in swe_calc() / swe_calc_ut(), even if you specify SweConst.SEFLG_SPEED
in the flags parameter!serr
- A StringBuffer containing a warning or error message, if
something fails.swe_fixstar(java.lang.StringBuffer, double, int, double[], java.lang.StringBuffer)
,
SweDate.setGlobalTidalAcc(double)
public java.lang.String swe_get_planet_name(int ipl)
ipl
- The planet numberpublic java.lang.String swe_get_ayanamsa_name(int isidmode)
public static java.lang.String getHouseobjectname(int obj)
obj
- Constant for house objectSweConst.SE_HOUSE1
,
SweConst.SE_HOUSE1
,
SweConst.SE_HOUSE1
,
SweConst.SE_HOUSE1
,
SweConst.SE_HOUSE1
,
SweConst.SE_HOUSE1
,
SweConst.SE_HOUSE1
,
SweConst.SE_HOUSE1
,
SweConst.SE_HOUSE1
,
SweConst.SE_HOUSE10
,
SweConst.SE_HOUSE11
,
SweConst.SE_HOUSE12
,
SweConst.SE_ASC
,
SweConst.SE_MC
,
SweConst.SE_ARMC
,
SweConst.SE_VERTEX
,
SweConst.SE_EQUASC
,
SweConst.SE_COASC1
,
SweConst.SE_COASC2
,
SweConst.SE_POLASC
public void swe_set_topo(double geolon, double geolat, double geoalt)
geolon
- The Longitude in degreesgeolat
- The Latitude in degreesgeoalt
- The height above sea level in meterspublic double[] getDatafileTimerange(java.lang.String fname) throws SwissephException
fname
- filename of the JPL data file. Filenames are searched for
in the directories of SE_EPHE_PATH or set by SwissEph(String) or
swe_set_ephe_path().SwissephException
SweConst.SE_EPHE_PATH
,
SwissEph(java.lang.String)
,
swe_set_ephe_path(java.lang.String)
public void swe_azalt(double tjd_ut, int calc_flag, double[] geopos, double atpress, double attemp, double[] xin, double[] xaz)
xaz is an output parameter as follows:
xaz[0]: azimuth, i.e. position degree, measured from
the south point to west.
xaz[1]: true altitude above horizon in degrees.
xaz[2]: apparent (refracted) altitude above horizon
in degrees.
tjd_ut
- time and date in UTcalc_flag
- SweConst.SE_ECL2HOR (xin[0] contains ecliptic
longitude, xin[1] the ecliptic latitude) or SweConst.SE_EQU2HOR (xin[0] =
rectascension, xin[1] = declination)geopos
- A double[3] containing the longitude, latitude and
height of the geographic position. Eastern longitude and northern
latitude is given by positive values, western longitude and southern
latitude by negative values.atpress
- atmospheric pressure in mBar (hPa). If it is 0, the pressure
will be estimated from geopos[2] and attemp.attemp
- atmospheric temperature in degrees Celsius.xin
- double[3] with a content depending on parameter calc_flag.
See there. xin[3] does not need to be defined.xaz
- Output parameter: a double[3] returning values as specified
above.public void swe_azalt_rev(double tjd_ut, int calc_flag, double[] geopos, double[] xin, double[] xout)
xout is an output parameter containing the ecliptic or equatorial coordinates, depending on the value of the parameter calc_flag.
tjd_ut
- time and date in UTcalc_flag
- SweConst.SE_HOR2ECL or SweConst.SE_HOR2EQUgeopos
- A double[3] containing the longitude, latitude and
height of the geographic position. Eastern longitude and northern
latitude is given by positive values, western longitude and southern
latitude by negative values.xin
- double[2] with azimuth and true altitude of planetxout
- Output parameter: a double[2] returning either ecliptic or
equatorial coordinatespublic int swe_lun_eclipse_how(double tjd_ut, int ifl, double[] geopos, double[] attr, java.lang.StringBuffer serr)
attr[0]: umbral magnitude at tjd
attr[1]: penumbral magnitude
attr[4]: azimuth of moon at tjd. Not yet implemented.
attr[5]: true altitude of moon above horizon at tjd. Not yet implemented.
attr[6]: apparent altitude of moon above horizon at tjd. Not yet implemented.
attr[7]: distance of moon from opposition in degrees
Attention: attr must be a double[20]!
ATTENTION: This method possibly (re-)sets a global parameter used
in calculation of delta T. See SweDate.setGlobalTidalAcc(double).
tjd_ut
- The Julian Day number in UTifl
- To indicate, which ephemeris should be used (SEFLG_JPLEPH,
SEFLG_SWIEPH or SEFLG_MOSEPH)geopos
- A double[3] containing geographic longitude, latitude and
height in meters above sea level in this order. Eastern longitude and
northern latitude is given by positive values, western longitude and
southern latitude by negative values.attr
- A double[20], on return containing the attributes of the
eclipse as aboveserr
- A StringBuffer containing a warning or error message, if
something failsSweConst.SE_ECL_TOTAL
,
SweConst.SE_ECL_PENUMBRAL
,
SweConst.SE_ECL_PARTIAL
,
SweDate.setGlobalTidalAcc(double)
public int swe_lun_eclipse_when(double tjd_start, int ifl, int ifltype, double[] tret, int backward, java.lang.StringBuffer serr)
tret is an output parameter with the following meaning:
tret[0]: time of maximum eclipse.
tret[1]:
tret[2]: time of the begin of partial phase.
tret[3]: time of the end of partial phaseend.
tret[4]: time of the begin of totality.
tret[5]: time of the end of totality.
tret[6]: time of the begin of center line.
tret[7]: time of the end of center line
Attention: tret must be a double[10]!
ATTENTION: This method possibly (re-)sets a global parameter used
in calculation of delta T. See SweDate.setGlobalTidalAcc(double).
tjd_start
- The Julian Day number in UT, from when to start searchingifl
- To indicate, which ephemeris should be used (SEFLG_JPLEPH,
SEFLG_SWIEPH or SEFLG_MOSEPH)ifltype
- SweConst.SE_ECL_TOTAL for total eclipse or 0 for any eclipsetret
- A double[10], on return containing the times of different
occasions of the eclipse as abovebackward
- 1, if search should be done backwards.
If you want to have only one conjunction
of the moon with the body tested, add the following flag:
backward |= SE_ECL_ONE_TRY. If this flag is not set,
the function will search for an occultation until it
finds one. For bodies with ecliptical latitudes > 5,
the function may search successlessly until it reaches
the end of the ephemeris.
(Note: we do not add SE_ECL_ONE_TRY to ifl, because
ifl may contain SEFLG_TOPOCTR (=SE_ECL_ONE_TRY) from
the parameter iflag of swe_calc() etc. Although the
topocentric flag is irrelevant here, it might cause
confusion.)serr
- A StringBuffer containing a warning or error message, if
something fails.SweConst.SE_ECL_TOTAL
,
SweConst.SE_ECL_ANNULAR
,
SweConst.SE_ECL_PARTIAL
,
SweConst.SE_ECL_ANNULAR_TOTAL
,
SweConst.SE_ECL_CENTRAL
,
SweConst.SE_ECL_NONCENTRAL
,
SweDate.setGlobalTidalAcc(double)
public int swe_nod_aps(double tjd_et, int ipl, int iflag, int method, double[] xnasc, double[] xndsc, double[] xperi, double[] xaphe, java.lang.StringBuffer serr)
tjd_et + SweDate.getDeltaT(tjd_et)
.tjd_et
- The time in ETipl
- Planet numberiflag
- Any of the SEFLG_* flagsmethod
- Defines, what kind of calculation is wanted (SE_NODBIT_MEAN,
SE_NODBIT_OSCU, SE_NODBIT_OSCU_BAR, SE_NODBIT_FOPOINT)xnasc
- Output parameter of double[6]. On return it contains six
doubles for the ascending nodexndsc
- Output parameter of double[6]. On return it contains six
doubles for the descending nodexperi
- Output parameter of double[6]. On return it contains six
doubles for the perihelionxaphe
- Output parameter of double[6]. On return it contains six
doubles for the aphelionserr
- A StringBuffer containing a warning or error message, if
something fails.swe_nod_aps_ut(double, int, int, int, double[], double[], double[], double[], java.lang.StringBuffer)
,
SweConst.OK
,
SweConst.ERR
,
SweConst.SE_NODBIT_MEAN
,
SweConst.SE_NODBIT_OSCU
,
SweConst.SE_NODBIT_OSCU_BAR
,
SweConst.SE_NODBIT_FOPOINT
,
SweDate.setGlobalTidalAcc(double)
public int swe_nod_aps_ut(double tjd_ut, int ipl, int iflag, int method, double[] xnasc, double[] xndsc, double[] xperi, double[] xaphe, java.lang.StringBuffer serr)
tjd_ut
- The time in UTipl
- Planet numberiflag
- Any of the SEFLG_* flagsmethod
- Defines, what kind of calculation is wanted (SE_NODBIT_MEAN,
SE_NODBIT_OSCU, SE_NODBIT_OSCU_BAR, SE_NODBIT_FOPOINT)xnasc
- Output parameter of double[6]. On return it contains six
doubles for the ascending nodexndsc
- Output parameter of double[6]. On return it contains six
doubles for the descending nodexperi
- Output parameter of double[6]. On return it contains six
doubles for the perihelionxaphe
- Output parameter of double[6]. On return it contains six
doubles for the aphelionserr
- A StringBuffer containing a warning or error message, if
something fails.swe_nod_aps(double, int, int, int, double[], double[], double[], double[], java.lang.StringBuffer)
,
SweConst.OK
,
SweConst.ERR
,
SweConst.SE_NODBIT_MEAN
,
SweConst.SE_NODBIT_OSCU
,
SweConst.SE_NODBIT_OSCU_BAR
,
SweConst.SE_NODBIT_FOPOINT
,
SweDate.setGlobalTidalAcc(double)
public int swe_pheno(double tjd, int ipl, int iflag, double[] attr, java.lang.StringBuffer serr)
tjd_et + SweDate.getDeltaT(tjd_et)
.See swe_pheno_ut() for missing information. Computes phase, phase angel, elongation, apparent diameter and apparent magnitude for sun, moon, all planets and asteroids.
attr is an output parameter with the following meaning:
attr[0]: phase angle (earth-planet-sun).
attr[1]: phase (illumined fraction of disc).
attr[2]: elongation of planet.
attr[3]: apparent diameter of disc.
attr[4]: apparent magnitude.
Attention: attr must be a double[20]!
ATTENTION: This method possibly (re-)sets a global parameter used
in calculation of delta T. See SweDate.setGlobalTidalAcc(double).
tjd
- The Julian Day number in ET.ipl
- The body number to be calculated. See class
SweConst for a list of bodies (SE_*)iflag
- Which ephemeris is to be used (SEFLG_JPLEPH, SEFLG_SWIEPH,
SEFLG_MOSEPH). Other flags: SEFLG_TRUEPOS, SEFLG_HELCTR.attr
- A double[20] in which the result is returned. See above for more
details.serr
- A StringBuffer containing a warning or error message, if
something fails.swe_pheno_ut(double, int, int, double[], java.lang.StringBuffer)
,
SweConst.OK
,
SweConst.ERR
,
SweConst.SEFLG_JPLEPH
,
SweConst.SEFLG_SWIEPH
,
SweConst.SEFLG_MOSEPH
,
SweConst.SEFLG_TRUEPOS
,
SweConst.SEFLG_HELCTR
,
SweDate.setGlobalTidalAcc(double)
public int swe_pheno_ut(double tjd_ut, int ipl, int iflag, double[] attr, java.lang.StringBuffer serr)
attr is an output parameter with the following meaning:
attr[0]: phase angle (earth-planet-sun).
attr[1]: phase (illumined fraction of disc).
attr[2]: elongation of planet.
attr[3]: apparent diameter of disc.
attr[4]: apparent magnitude.
Attention: attr must be a double[20]!
ATTENTION: This method possibly (re-)sets a global parameter used
in calculation of delta T. See SweDate.setGlobalTidalAcc(double).
tjd_ut
- The Julian Day number in UT (Universal Time).ipl
- The body number to be calculated. See class
SweConst for a list of bodies (SE_*)iflag
- Which ephemeris is to be used (SEFLG_JPLEPH, SEFLG_SWIEPH,
SEFLG_MOSEPH). Other flags: SEFLG_TRUEPOS, SEFLG_HELCTR.attr
- A double[20] in which the result is returned. See above for more
details.serr
- A StringBuffer containing a warning or error message, if
something fails.SweConst.OK
,
SweConst.ERR
,
SweConst.SEFLG_JPLEPH
,
SweConst.SEFLG_SWIEPH
,
SweConst.SEFLG_MOSEPH
,
SweConst.SEFLG_TRUEPOS
,
SweConst.SEFLG_HELCTR
,
SweDate.setGlobalTidalAcc(double)
public double swe_refrac(double inalt, double atpress, double attemp, int calc_flag)
inalt
- The true or apparent altitude to be convertedatpress
- Atmospheric pressure in mBar (hPa). If it is 0, the pressure
will be estimated from attemp on sea level.attemp
- Atmospheric temperature in degrees Celsius.calc_flag
- SweConst.SE_TRUE_TO_APP or SweConst.SE_APP_TO_TRUEpublic double swe_refrac_extended(double inalt, double geoalt, double atpress, double lapse_rate, double attemp, int calc_flag, double[] dret)
inalt
- The true or apparent altitude to be convertedgeoalt
- altitude of observer above sea level in metersatpress
- Atmospheric pressure in mBar (hPa). If it is 0, the pressure
will be estimated from attemp on sea level.attemp
- Atmospheric temperature in degrees Celsius.lapse_rate
- (dattemp/dgeoalt) = [°K/m]calc_flag
- SweConst.SE_TRUE_TO_APP or SweConst.SE_APP_TO_TRUEdret
- output parameter, use a double[4] as input.
- dret[0] true altitude, if possible; otherwise input value - dret[1] apparent altitude, if possible; otherwise input value - dret[2] refraction - dret[3] dip of the horizon
public int swe_rise_trans(double tjd_ut, int ipl, java.lang.StringBuffer starname, int epheflag, int rsmi, double[] geopos, double atpress, double attemp, DblObj tret, java.lang.StringBuffer serr)
tjd_ut
- The Julian Day number in UT, from when to start searchingipl
- Planet number, if times for planet or moon are to be calculated.starname
- The name of the star, if times for a star should be
calculated. It has to be null or the empty string otherwise!epheflag
- To indicate, which ephemeris should be used (SEFLG_JPLEPH,
SEFLG_SWIEPH or SEFLG_MOSEPH)rsmi
- Specification, what type of calculation is wanted
(SE_CALC_RISE, SE_CALC_SET, SE_CALC_MTRANSIT, SE_CALC_ITRANSIT). For
SE_CALC_RISE or SE_CALC_SET you may add SE_BIT_DISC_CENTER for rise
or set of the center of the body, SE_BIT_DISC_BOTTOM for the completely
visible object. Add SE_BIT_NO_REFRACTION for calculation without refraction
effects. Add SE_BIT_CIVIL_TWILIGHT or SE_BIT_NAUTIC_TWILIGHT or
SE_BIT_ASTRO_TWILIGHT for civil, nautical, or astronomical twilight.
Use SE_BIT_FIXED_DISC_SIZE to neglect the effect of distance on disc size.
The calculation method defaults to SE_CALC_RISE.geopos
- A double[3] containing the longitude, latitude and
height of the observer. Eastern longitude and northern
latitude is given by positive values, western longitude and southern
latitude by negative values.atpress
- atmospheric pressure in mBar (hPa). If it is 0, the pressure
will be estimated from geopos[2] and attemp (1013.25 mbar for sea level).
When calculating MTRANSIT or ITRANSIT, this parameter is not used.attemp
- atmospheric temperature in degrees Celsius. When
calculating MTRANSIT or ITRANSIT, this parameter is not used.tret
- Return value containing the time of rise or whatever was
requested. This is UT.serr
- A StringBuffer containing a warning or error message, if
something failsSweConst.OK
,
SweConst.ERR
,
SweConst.SEFLG_JPLEPH
,
SweConst.SEFLG_MOSEPH
,
SweConst.SE_CALC_RISE
,
SweConst.SE_CALC_SET
,
SweConst.SE_CALC_MTRANSIT
,
SweConst.SE_CALC_ITRANSIT
,
SweConst.SE_BIT_DISC_CENTER
,
SweConst.SE_BIT_DISC_BOTTOM
,
SweConst.SE_BIT_NO_REFRACTION
,
SweConst.SE_BIT_CIVIL_TWILIGHT
,
SweConst.SE_BIT_NAUTIC_TWILIGHT
,
SweConst.SE_BIT_ASTRO_TWILIGHT
,
SweConst.SE_BIT_FIXED_DISC_SIZE
,
DblObj
public int swe_rise_trans_true_hor(double tjd_ut, int ipl, java.lang.StringBuffer starname, int epheflag, int rsmi, double[] geopos, double atpress, double attemp, double horhgt, DblObj tret, java.lang.StringBuffer serr)
tjd_ut
- The Julian Day number in UT, from when to start searchingipl
- Planet number, if times for planet or moon are to be calculated.starname
- The name of the star, if times for a star should be
calculated. It has to be null or the empty string otherwise!epheflag
- To indicate, which ephemeris should be used (SEFLG_JPLEPH,
SEFLG_SWIEPH or SEFLG_MOSEPH)rsmi
- Specification, what type of calculation is wanted
(SE_CALC_RISE, SE_CALC_SET, SE_CALC_MTRANSIT, SE_CALC_ITRANSIT) plus
optionally SE_BIT_DISC_CENTER, when the rise time of the disc center
of the body is requested and / or SE_BIT_NO_REFRACTION for calculation
without refraction effects. The calculation method defaults to
SE_CALC_RISE.geopos
- A double[3] containing the longitude, latitude and
height of the observer. Eastern longitude and northern
latitude is given by positive values, western longitude and southern
latitude by negative values.atpress
- atmospheric pressure in mBar (hPa). If it is 0, the pressure
will be estimated from geopos[2] and attemp (1013.25 mbar for sea level).
When calculating MTRANSIT or ITRANSIT, this parameter is not used.attemp
- atmospheric temperature in degrees Celsius. When
calculating MTRANSIT or ITRANSIT, this parameter is not used.horhgt
- Height of horizon in degree.tret
- Return value containing the time of rise or whatever was
requested. This is UT.serr
- A StringBuffer containing a warning or error message, if
something failsswe_rise_trans(double, int, StringBuffer, int, int, double[], double, double, DblObj, StringBuffer)
,
SweConst.OK
,
SweConst.ERR
,
SweConst.SEFLG_JPLEPH
,
SweConst.SEFLG_MOSEPH
,
SweConst.SE_CALC_RISE
,
SweConst.SE_CALC_SET
,
SweConst.SE_CALC_MTRANSIT
,
SweConst.SE_CALC_ITRANSIT
,
SweConst.SE_BIT_DISC_CENTER
,
SweConst.SE_BIT_NO_REFRACTION
,
DblObj
,
SweDate.setGlobalTidalAcc(double)
public int swe_sol_eclipse_how(double tjd_ut, int ifl, double[] geopos, double[] attr, java.lang.StringBuffer serr)
attr[0]: fraction of solar diameter covered by moon
(magnitude)
attr[1]: ratio of lunar diameter to solar one
attr[2]: fraction of solar disc covered by moon
(obscuration)
attr[3]: diameter of core shadow in km
attr[4]: azimuth of sun at tjd
attr[5]: true altitude of sun above horizon at tjd
attr[6]: apparent altitude of sun above horizon at tjd
attr[7]: angular distance of moon from sun in degrees
Attention: attr must be a double[20]!
ATTENTION: This method possibly (re-)sets a global parameter used
in calculation of delta T. See SweDate.setGlobalTidalAcc(double).
tjd_ut
- The Julian Day number in UTifl
- To indicate, which ephemeris should be used (SEFLG_JPLEPH,
SEFLG_SWIEPH or SEFLG_MOSEPH)geopos
- A double[3] containing geographic longitude, latitude and
height in meters above sea level in this order. Eastern longitude and
northern latitude is given by positive values, western longitude and
southern latitude by negative values.attr
- A double[20], on return containing the attributes of the
eclipse as aboveserr
- A StringBuffer containing a warning or error message, if
something failsSweConst.SE_ECL_TOTAL
,
SweConst.SE_ECL_ANNULAR
,
SweConst.SE_ECL_PARTIAL
,
SweConst.SEFLG_JPLEPH
,
SweConst.SEFLG_MOSEPH
,
SweDate.setGlobalTidalAcc(double)
public int swe_sol_eclipse_when_glob(double tjd_start, int ifl, int ifltype, double[] tret, int backward, java.lang.StringBuffer serr)
tret is an output parameter with the following meaning:
tret[0]: time of maximum eclipse.
tret[1]: time, when the eclipse takes place at local
apparent noon.
tret[2]: time of the begin of the eclipse.
tret[3]: time of the end of the eclipse.
tret[4]: time of the begin of totality.
tret[5]: time of the end of totality.
tret[6]: time of the begin of center line.
tret[7]: time of the end of center line
tret[8]: time, when annular-total eclipse becomes total --
Not yet implemented.
tret[9]: time, when annular-total eclipse becomes annular
again -- Not yet implemented.
Attention: tret must be a double[10]!
ATTENTION: This method possibly (re-)sets a global parameter used
in calculation of delta T. See SweDate.setGlobalTidalAcc(double).
tjd_start
- The Julian Day number in UT, from when to start searchingifl
- To indicate, which ephemeris should be used (SEFLG_JPLEPH,
SEFLG_SWIEPH or SEFLG_MOSEPH)ifltype
- SweConst.SE_ECL_TOTAL or any other SE_ECL_* constant
or 0 for any type of eclipse:
SweConst.SE_ECL_TOTAL
SweConst.SE_ECL_ANNULAR
SweConst.SE_ECL_PARTIAL
SweConst.SE_ECL_ANNULAR_TOTAL
in combination with:
SweConst.SE_ECL_CENTRAL
SweConst.SE_ECL_NONCENTRAL
tret
- A double[10], on return containing the times of different
occasions of the eclipse as abovebackward
- !=0, if search should be done backwardsserr
- A StringBuffer containing a warning or error message, if
something fails.SweConst.SE_ECL_TOTAL
,
SweConst.SE_ECL_ANNULAR
,
SweConst.SE_ECL_PARTIAL
,
SweConst.SE_ECL_ANNULAR_TOTAL
,
SweConst.SE_ECL_CENTRAL
,
SweConst.SEFLG_JPLEPH
,
SweConst.SEFLG_MOSEPH
,
SweDate.setGlobalTidalAcc(double)
public int swe_sol_eclipse_when_loc(double tjd_start, int ifl, double[] geopos, double[] tret, double[] attr, int backward, java.lang.StringBuffer serr)
tret is an output parameter with the following meaning:
tret[0]: time of maximum eclipse.
tret[1]: time of first contact.
tret[2]: time of second contact.
tret[3]: time of third contact.
tret[4]: time of forth contact.
tret[5]: time of sun rise between first and forth contact
-- Not yet implemented.
tret[6]: time of sun set between first and forth contact
-- Not yet implemented.
attr is an output parameter with the following meaning:
attr[0]: fraction of solar diameter covered by moon
(magnitude).
attr[1]: ratio of lunar diameter to solar one.
attr[2]: fraction of solar disc covered by moon
(obscuration).
attr[3]: diameter of core shadow in km.
attr[4]: azimuth of sun at tjd.
attr[5]: true altitude of sun above horizon at tjd.
attr[6]: apparent altitude of sun above horizon at tjd.
attr[7]: elongation of moon in degrees.
Attention: attr must be a double[20]!
ATTENTION: This method possibly (re-)sets a global parameter used
in calculation of delta T. See SweDate.setGlobalTidalAcc(double).
tjd_start
- The Julian Day number in UT, from when to start searchingifl
- To indicate, which ephemeris should be used (SEFLG_JPLEPH,
SEFLG_SWIEPH or SEFLG_MOSEPH)geopos
- A double[3] containing the longitude, latitude and
height of the geographic position. Eastern longitude and northern
latitude is given by positive values, western longitude and southern
latitude by negative values.tret
- A double[7], on return containing the times of different
occasions of the eclipse as specified aboveattr
- A double[20], on return containing different attributes of
the eclipse. See above.backward
- true, if search should be done backwardsserr
- A StringBuffer containing a warning or error message, if
something fails.SweConst.SE_ECL_TOTAL
,
SweConst.SE_ECL_ANNULAR
,
SweConst.SE_ECL_PARTIAL
,
SweConst.SE_ECL_VISIBLE
,
SweConst.SE_ECL_MAX_VISIBLE
,
SweConst.SE_ECL_1ST_VISIBLE
,
SweConst.SE_ECL_2ND_VISIBLE
,
SweConst.SE_ECL_3RD_VISIBLE
,
SweConst.SE_ECL_4TH_VISIBLE
,
SweConst.SEFLG_JPLEPH
,
SweConst.SEFLG_MOSEPH
,
SweDate.setGlobalTidalAcc(double)
public int swe_sol_eclipse_where(double tjd_ut, int ifl, double[] geopos, double[] attr, java.lang.StringBuffer serr)
Computes the geographic location for a given time, where a solar eclipse is central (or maximum for a non-central eclipse).
Output parameters:
geopos[0]: geographic longitude of central line, positive values mean east of Greenwich, negative values west of Greenwich
geopos[1]: geographic latitude of central line, positive values mean north of equator, negative values south
attr[0]: fraction of solar diameter covered by moon (magnitude)
attr[1]: ratio of lunar diameter to solar one
attr[2]: fraction of solar disc covered by moon (obscuration)
attr[3]: diameter of core shadow in km
attr[4]: azimuth of sun at tjd
attr[5]: true altitude of sun above horizon at tjd
attr[6]: apparent altitude of sun above horizon at tjd
attr[7]: angular distance of moon from sun in degrees
ATTENTION: geopos must be a double[10], attr
a double[20]!
ATTENTION: This method possibly (re-)sets a global parameter used
in calculation of delta T. See SweDate.setGlobalTidalAcc(double).
tjd_ut
- The Julian Day number in UTifl
- To indicate, which ephemeris should be used (SEFLG_JPLEPH,
SEFLG_SWIEPH or SEFLG_MOSEPH)geopos
- A double[10], on return containing the geographic positions.attr
- A double[20], on return containing the attributes of the
eclipse as above.serr
- A StringBuffer containing a warning or error message, if
something fails.SweConst.SE_ECL_TOTAL
,
SweConst.SE_ECL_ANNULAR
,
SweConst.SE_ECL_CENTRAL
,
SweConst.SE_ECL_NONCENTRAL
,
SweConst.SE_ECL_PARTIAL
,
SweConst.SEFLG_JPLEPH
,
SweConst.SEFLG_MOSEPH
,
SweDate.setGlobalTidalAcc(double)
public int swe_lun_occult_when_loc(double tjd_start, int ipl, java.lang.StringBuffer starname, int ifl, double[] geopos, double[] tret, double[] attr, int backward, java.lang.StringBuffer serr)
tret is an output parameter with the following meaning:
tret[0]: time of maximum eclipse.
tret[1]: time of first contact.
tret[2]: time of second contact.
tret[3]: time of third contact.
tret[4]: time of forth contact.
tret[5]: time of sun rise between first and forth contact
-- Not yet implemented.
tret[6]: time of sun set between first and forth contact
-- Not yet implemented.
attr is an output parameter with the following meaning:
attr[0]: fraction of solar diameter covered by moon
(magnitude).
attr[1]: ratio of lunar diameter to solar one.
attr[2]: fraction of solar disc covered by moon
(obscuration).
attr[3]: diameter of core shadow in km.
attr[4]: azimuth of sun at tjd.
attr[5]: true altitude of sun above horizon at tjd.
attr[6]: apparent altitude of sun above horizon at tjd.
attr[7]: elongation of moon in degrees.
Attention: attr must be a double[20]!
ATTENTION: This method possibly (re-)sets a global parameter used
in calculation of delta T. See SweDate.setGlobalTidalAcc(double).
tjd_start
- The Julian Day number in UT, from when to start searchingipl
- Planet number of the occulted planet. See SE_SUN etc. for the
planet numbers.starname
- The name of the fixstar, if looking for an occulted
fixstar. This has to be null or an empty StringBuffer, if you are looking
for a planet specified in parameter ipl. See routine swe_fixstar() for this
parameter.ifl
- To indicate, which ephemeris should be used (SEFLG_JPLEPH,
SEFLG_SWIEPH or SEFLG_MOSEPH)
Additionally, you can specify SE_ECL_ONE_TRY,
to only search for one conjunction of the moon with the planetary body.
If this flag is not set, the function will search for an occultation until
it finds one. For bodies with ecliptical latitudes > 5, the function may
search successlessly until it reaches the end of the ephemeris.geopos
- A double[3] containing the longitude, latitude and
height of the geographic position. Eastern longitude and northern
latitude is given by positive values, western longitude and southern
latitude by negative values.tret
- A double[7], on return containing the times of different
occasions of the eclipse as specified aboveattr
- A double[20], on return containing different attributes of
the eclipse. See above.backward
- any value != 0 means, search should be done backwardsserr
- A StringBuffer containing a warning or error message, if
something fails.swe_fixstar_ut(StringBuffer, double, int, double[], StringBuffer)
,
SweConst.SE_ECL_ONE_TRY
,
SweConst.SE_ECL_TOTAL
,
SweConst.SE_ECL_ANNULAR
,
SweConst.SE_ECL_PARTIAL
,
SweConst.SE_ECL_VISIBLE
,
SweConst.SE_ECL_MAX_VISIBLE
,
SweConst.SE_ECL_1ST_VISIBLE
,
SweConst.SE_ECL_2ND_VISIBLE
,
SweConst.SE_ECL_3RD_VISIBLE
,
SweConst.SE_ECL_4TH_VISIBLE
,
SweConst.SE_ECL_ONE_TRY
,
SweConst.SEFLG_JPLEPH
,
SweConst.SEFLG_MOSEPH
,
SweDate.setGlobalTidalAcc(double)
public int swe_lun_eclipse_when_loc(double tjd_start, int ifl, double[] geopos, double[] tret, double[] attr, int backward, java.lang.StringBuffer serr)
public int swe_lun_occult_where(double tjd_ut, int ipl, java.lang.StringBuffer starname, int ifl, double[] geopos, double[] attr, java.lang.StringBuffer serr)
tjd_ut
- The Julian Day number in UTipl
- The planet, whose occultation by the moon should be searched.starname
- The fixstar, whose occultation by the moon should be
searched. See swe_fixstar() for details. It has to be null or the empty
string, if a planet (see parameter ipl) is to be searched.ifl
- To indicate, which ephemeris should be used (SEFLG_JPLEPH,
SEFLG_SWIEPH or SEFLG_MOSEPH)geopos
- A double[10], on return containing the geographic positions.attr
- A double[20], on return containing the attributes of the
eclipse as above.serr
- A StringBuffer containing a warning or error message, if
something fails.swe_sol_eclipse_where(double, int, double[], double[], java.lang.StringBuffer)
,
swe_fixstar_ut(StringBuffer, double, int, double[], StringBuffer)
,
SweDate.setGlobalTidalAcc(double)
public int swe_lun_occult_when_glob(double tjd_start, int ipl, java.lang.StringBuffer starname, int ifl, int ifltype, double[] tret, int backward, java.lang.StringBuffer serr)
tret is an output parameter with the following meaning:
tret[0]: time of maximum eclipse.
tret[1]: time, when the eclipse takes place at local
apparent noon.
tret[2]: time of the begin of the eclipse.
tret[3]: time of the end of the eclipse.
tret[4]: time of the begin of totality.
tret[5]: time of the end of totality.
tret[6]: time of the begin of center line.
tret[7]: time of the end of center line
tret[8]: time, when annular-total eclipse becomes total --
Not yet implemented.
tret[9]: time, when annular-total eclipse becomes annular
again -- Not yet implemented.
Attention: tret must be a double[10]!
ATTENTION: This method possibly (re-)sets a global parameter used
in calculation of delta T. See SweDate.setGlobalTidalAcc(double).
tjd_start
- The Julian Day number in UT, from when to start searchingipl
- planet number of occulted bodystarname
- name of occulted star. Must be null or "", if
a planetary occultation is to be calculated. For the use of this
field, also see swe_fixstar().ifl
- To indicate, which ephemeris should be used (SEFLG_JPLEPH,
SEFLG_SWIEPH or SEFLG_MOSEPH)
If you like to have only one conjunction
of the moon with the body tested, add flag SE_ECL_ONE_TRY. If this flag
is not set, the function will search for an occultation until it
finds one. For bodies with ecliptical latitudes > 5, the function may
search successlessly until it reaches the end of the ephemeris.ifltype
- eclipse type to be searched (SE_ECL_TOTAL, etc.).
0, if any type of eclipse is wanted. This functionality also works
with occultations.tret
- A double[10], on return containing the times of different
occasions of the eclipse as abovebackward
- if != 0, search is done backwardsserr
- A StringBuffer containing a warning or error message, if
something fails.swe_sol_eclipse_when_glob(double, int, int, double[], int, java.lang.StringBuffer)
,
swe_fixstar_ut(StringBuffer, double, int, double[], StringBuffer)
,
SweConst.SE_ECL_ONE_TRY
,
SweConst.SE_ECL_TOTAL
,
SweConst.SE_ECL_ANNULAR
,
SweConst.SE_ECL_PARTIAL
,
SweConst.SE_ECL_ANNULAR_TOTAL
,
SweConst.SE_ECL_CENTRAL
,
SweConst.SE_ECL_NONCENTRAL
,
SweConst.SEFLG_JPLEPH
,
SweConst.SEFLG_MOSEPH
,
SweDate.setGlobalTidalAcc(double)
public int swe_gauquelin_sector(double t_ut, int ipl, java.lang.StringBuffer starname, int iflag, int imeth, double[] geopos, double atpress, double attemp, DblObj dgsect, java.lang.StringBuffer serr)
t_ut
- Time in UT.ipl
- Planet number.starname
- If starname != null and not an empty string, then a
fixstar is computed and not a planet specified in ipl. See swe_fixstar()
method on this.iflag
- Use the flags SE_SWIEPH, SE_JPLEPH, SE_MOSEPH, SEFLG_TOPOCTR.imeth
- defines the method.imeth = 0: sector from longitude and latitudeRise and set are defined as appearance and disappearance of disc center.
imeth = 1: sector from longitude, with lat = 0
imeth = 2: sector from rise and set
imeth = 3: sector from rise and set with refraction
geopos
- An array of 3 doubles for geo. longitude, geo. latitude, elevation in meter.atpress
- Only needed for imeth = 3.
If imeth=3 and atpress not given (= 0), the programm assumes 1013.25 mbar;
if a non-zero height above sea is given in geopos, atpress is estimated.attemp
- Temperature. Only needed for imeth = 3.dgsect
- Return value.serr
- Pointer to error string, may be null.swe_fixstar_ut(StringBuffer, double, int, double[], StringBuffer)
,
SweConst.SEFLG_TOPOCTR
,
SweConst.SEFLG_JPLEPH
,
SweConst.SEFLG_MOSEPH
public java.lang.String swe_house_name(char hsys)
hsys
- House system character
house systems are:
A equal
E equal
B Alcabitius
C Campanus
G 36 Gauquelin sectors
H horizon / azimut
K Koch
M Morinus
O Porphyry
P Placidus
R Regiomontanus
T Polich/Page ("topocentric")
U Krusinski-Pisa-Goelzer
V equal Vehlow
W equal, whole sign
X axial rotation system/ Meridian houses
Y APC houses
public double swe_house_pos(double armc, double geolat, double eps, int hsys, double[] xpin, java.lang.StringBuffer serr)
armc
- The ARMC (= sidereal time)geolat
- The latitudeeps
- The ecliptic obliquity (e.g. xx[0] of swe_calc(...))hsys
- The house system. See swe_houses(...) for a list of all
houses.xpin
- A double[2] containing the ecliptic longitude (xpin[0]) and
latitude (xpin[1]) of the planet in degrees. It is an input parameter,
describing tropical positions. Indeed, it needs a double[6] as parameter
with any value in the other doubles, but the methods now accepts both a
double[2] and a double[6].serr
- StringBuffer to contain any error messages or warningsswe_houses(double, int, double, double, int, double[], double[])
public int swe_houses_armc(double armc, double geolat, double eps, int hsys, double[] cusp, double[] ascmc)
armc
- The ARMC (= sidereal time)geolat
- The latitude on earth, for which the calculation has to be
done.eps
- The ecliptic obliquity (e.g. xx[0] of swe_calc(...))hsys
- The house system as a character given as an integer. See
swe_houses(...) for a list of all houses.cusp
- The house cusps are returned here in cusp[1...12] for
the house 1 to 12.ascmc
- The special points like ascendant etc. are returned here.
See swe_houses(...) for further info on this parameter.swe_houses(double, int, double, double, int, double[], double[])
,
swe_calc(double, int, int, double[], java.lang.StringBuffer)
public int swe_houses(double tjd_ut, int iflag, double geolat, double geolon, int hsys, double[] cusp, double[] ascmc)
(int)'A' equal
(int)'E' equal
(int)'B' Alcabitius
(int)'C' Campanus
(int)'G' 36 Gauquelin sectors
(int)'H' horizon / azimut
(int)'K' Koch
(int)'M' Morinus
(int)'O' Porphyry
(int)'P' Placidus
(int)'R' Regiomontanus
(int)'T' Polich/Page ("topocentric")
(int)'U' Krusinski-Pisa-Goelzer
(int)'V' equal Vehlow
(int)'W' equal, whole sign
(int)'X' axial rotation system/ Meridian houses
(int)'Y' APC houses
The parameter ascmc is defined as double[10] and will return the following points:
ascmc[0] = ascendant
ascmc[1] = mc
ascmc[2] = armc (= sidereal time)
ascmc[3] = vertex
ascmc[4] = equatorial ascendant
ascmc[5] = co-ascendant (Walter Koch)
ascmc[6] = co-ascendant (Michael Munkasey)
ascmc[7] = polar ascendant (Michael Munkasey)
ascmc[8] = reserved for future use
ascmc[9] = reserved for future use
You can use the SE_ constants below from SweConst.java to access
these values in ascmc[].tjd_ut
- The Julian Day number in UTiflag
- An additional flag for calculation. It must be 0 or
SEFLG_SIDEREAL and / or SEFLG_RADIANS.geolat
- The latitude on earth, for which the calculation has to be
done.geolon
- The longitude on earth, for which the calculation has to be
done. Eastern longitude and northern latitude is given by positive values,
western longitude and southern latitude by negative values.hsys
- The house system as a character given as an integer.cusp
- (double[13]) The house cusps are returned here in
cusp[1...12] for the houses 1 to 12.ascmc
- (double[10]) The special points like ascendant etc. are
returned here. See the list above.swe_set_sid_mode(int, double, double)
,
SweConst.SEFLG_RADIANS
,
SweConst.SEFLG_SIDEREAL
,
SweConst.SE_ASC
,
SweConst.SE_MC
,
SweConst.SE_ARMC
,
SweConst.SE_VERTEX
,
SweConst.SE_EQUASC
,
SweConst.SE_COASC1
,
SweConst.SE_COASC2
,
SweConst.SE_POLASC
public int swe_houses(double tjd_ut, int iflag, double geolat, double geolon, int hsys, double[] cusp, double[] ascmc, int aOffs)
public void setTransitSpeedsfile(java.lang.String fname, boolean writeable)
writeable
is true.fname
- The filename to be used. It should be writable, so the
extreme speed values can be further improved.writeable
- Say true here, if the file should be improved by newly
calculated values, false otherwise. It will be a good idea to keep it
writeable.public double getTransitET(TransitCalculator tc, double jdET, boolean backwards) throws java.lang.IllegalArgumentException, SwissephException
See swisseph.TCPlanet or swisseph.TCPlanetPlanet below for examples on how to use this method.
tc
- The TransitCalculator that should be used here.jdET
- The date (and time) in ET, from where to start searching.backwards
- If backward search should be performed.java.lang.IllegalArgumentException
SwissephException
TCPlanet
,
TCPlanetPlanet
public double getTransitET(TransitCalculator tc, double jdET, boolean backwards, double jdLimit) throws java.lang.IllegalArgumentException, SwissephException
See swisseph.TCPlanet or swisseph.TCPlanetPlanet below for examples on how to use this method.
tc
- The TransitCalculator that should be used here.jdET
- The date (and time) in ET, from where to start searching.backwards
- If backward search should be performed.jdLimit
- This is the date, when the search for transits should be
stopped, even if no transit point had been found up to then.java.lang.IllegalArgumentException
SwissephException
TCPlanet
,
TCPlanetPlanet
public double getTransitUT(TransitCalculator tc, double jdUT, boolean backwards) throws java.lang.IllegalArgumentException, SwissephException
See swisseph.TCPlanet or swisseph.TCPlanetPlanet below for examples on how to use this method.
tc
- The TransitCalculator that should be used here.jdUT
- The date (and time) in UT, from where to start searching.backwards
- If backward search should be performed.java.lang.IllegalArgumentException
SwissephException
TCPlanet
,
TCPlanetPlanet
public double getTransitUT(TransitCalculator tc, double jdUT, boolean backwards, double jdLimit) throws java.lang.IllegalArgumentException, SwissephException
See swisseph.TCPlanet or swisseph.TCPlanetPlanet below for examples on how to use this method.
tc
- The TransitCalculator that should be used here.jdUT
- The date (and time) in UT, from where to start searching.backwards
- If backward search should be performed.jdLimit
- This is the date, when the search for transits should be
stopped, even if no transit point had been found up to then. It is
interpreted as UT time as well.java.lang.IllegalArgumentException
SwissephException
TCPlanet
,
TCPlanetPlanet
public double getFixstarMagnitude(java.lang.String star) throws SwissephException
swe_fixstar_mag(...)
method in the original.star
- Name of star or line number in star file (start from 1,
don't count comment lines).SwissephException
getFixstarMagnitude(StringBuffer)
public double getFixstarMagnitude(java.lang.StringBuffer star) throws SwissephException
swe_fixstar_mag(...)
method in the original.star
- (Both input and output parameter.) Name of star
or line number in star file (start from 1, don't
count comment lines).The name of the star is returned in the format trad_name, nomeclat_name in this parameter.
SwissephException
getFixstarMagnitude(String)
protected int swe_fixstar_mag(java.lang.StringBuffer star, double[] mag, java.lang.StringBuffer serr) throws SwissephException
star
- (Both input and output parameter.) Name of star
or line number in star file (start from 1, don't
count comment lines).If no error occurs, the name of the star is returned in the format trad_name, nomeclat_name in this parameter.
mag
- (Output parameter.) The magnitude of the star. The
parameter has to be a double[1].serr
- Buffer for error message on outputSwissephException
public int swe_time_equ(double tjd_ut, double[] E, java.lang.StringBuffer serr)
tjd_ut
- input date in julian days (UT)E
- double[1], output value: the difference between the timesserr
- buffer for error message on outputSweDate.setGlobalTidalAcc(double)
public int swe_lmt_to_lat(double tjd_lmt, double geolon, double[] tjd_lat, java.lang.StringBuffer serr)
public int swe_lat_to_lmt(double tjd_lat, double geolon, double[] tjd_lmt, java.lang.StringBuffer serr)