swisseph
クラス SwissEph

java.lang.Object
  上位を拡張 swisseph.SwissEph
すべての実装されたインタフェース:
java.io.Serializable

public class SwissEph
extends java.lang.Object
implements java.io.Serializable

This class is the basic class for planetary calculations.

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.

関連項目:
直列化された形式

コンストラクタの概要
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.
 
メソッドの概要
 int calc(double jdET, int ipl, int iflag, double[] xx)
           
 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.
 double[] getJPLRange(java.lang.String fname)
           
 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 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()
          This method closes all open data files and sets planetary data objects to null for a hint to the garbage collector that those objects can be freed.
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.
 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_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(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(double inalt, double atpress, double attemp, int calc_flag)
          Calculates the true altitude from the apparent altitude or vice versa.
 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, double t0, double ayan_t0)
          This sets the 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, DblObj 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.
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

SwissEph

public SwissEph()
Constructs a new SwissEph object with the default search path for the Swiss Ephemeris data files.

関連項目:
SweConst.SE_EPHE_PATH

SwissEph

public SwissEph(java.lang.String path)
Constructs a new SwissEph object with the specified search path for the Swiss Ephemeris data files. If you want to use this class in applets, you would have to specify the path as a valid http URL on the same www server from where your applet gets served, if the normal security restrictions apply.

パラメータ:
path - The search path for the Swiss Ephemeris and JPL data files. If null or empty, a default path will be used. You will have to quote ':', ';' and '\' characters, so a path like "C:\swiss\ephe" has to be written as "C\\:\\\\swiss\\\\ephe", as any '\' will be evaluated twice: the first time by the Java compiler, and the second time by the program itself. 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)
メソッドの詳細

setHttpBufSize

public 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. The buffer size determines, how many bytes will get read on one single HTTP request. Increased buffer size will result in a reduced number of HTTP-requests, but it will increase the amount of data to be transferred. As the access to the data is somehow random, it does not make so much sense to increase the size arbitrarily.

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
1005769
2003040
3002333
4001929
8001424

パラメータ:
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)

swe_version

public java.lang.String swe_version()
Returns the version information of this swisseph package.

戻り値:
package information in the form x.yy.zz
関連項目:
swe_java_version()

swe_java_version

public java.lang.String swe_java_version()
Returns the version information of this swisseph package including the version of this java port.

戻り値:
package information in the form x.yy.zz_jj
関連項目:
swe_version()

swe_calc_ut

public 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. See swe_calc(...) for more information.

パラメータ:
tjd_ut - The Julian Day number in UT (Universal Time).
ipl - The body to be calculated. See SweConst for a list of bodies
iflag - 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.
戻り値:
iflag or SweConst.ERR (-1); iflag MAY have changed from input parameter!
関連項目:
swe_calc(double, int, int, double[], java.lang.StringBuffer)

swe_calc

public 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. It is equal to swe_calc_ut() with the exception that the time has to be given in ET (Ephemeris Time or Dynamical Time). You would get ET by adding deltaT to the UT, e.g., 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 bodies
iflag - 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.
戻り値:
iflag or SweConst.ERR (-1); iflag MAY have changed from input parameter!
関連項目:
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)

calc

public int calc(double jdET,
                int ipl,
                int iflag,
                double[] xx)
         throws SwissephException
例外:
SwissephException

swe_close

public void swe_close()
This method closes all open data files and sets planetary data objects to null for a hint to the garbage collector that those objects can be freed.


swe_set_ephe_path

public void swe_set_ephe_path(java.lang.String path)
This sets the search path for the ephemeris data files. Asteroid files are searched in the subdirectories ast0 to ast9 first. Multiple path elements are separated by a semikolon (;) or colon (:). Ephemeris path elements can be normal file system paths or http-URLs. If your elements contain colons or semikolons or spaces or backslashes, you have to escape them with a backslash (\), e.g. "./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!

パラメータ:
path - The search path for the Swiss Ephemeris and JPL data files. If null or empty, a default path will be used. You will have to quote ':', ';' and '\' characters, so a path like "C:\swiss\ephe" has to be written as "C\\:\\\\swiss\\\\ephe", as any '\' will be evaluated twice: the first time by the Java compiler, and the second time by the program itself.

swe_set_jpl_file

public 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. It defaults to the string "de406.eph" defined in SweConst.SE_FNAME_DFT. If a path is given in fname, the path will be cut off, as the path is given by swe_set_ephe_path(...).

パラメータ:
fname - Name of the JPL data file
関連項目:
SweConst.SE_FNAME_DFT, swe_set_ephe_path(java.lang.String)

swe_set_sid_mode

public void swe_set_sid_mode(int sid_mode,
                             double t0,
                             double ayan_t0)
This sets the ayanamsha mode for sidereal planet calculations. If you don't set the ayanamsha mode, it will default to Fagan/Bradley (SE_SIDM_FAGAN_BRADLEY). The predefined ayanamsha modes are as follows:

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
SE_SIDM_USER

You do not consider the parameters ayan_t0 and t0 if you use a predefined ayanamsha as above. If you specify SE_SIDM_USER, you have to give the value of a reference date t0, and the value of of the ayanamsha at that date in ayan_t0.

パラメータ:
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.
t0 - Reference date (Julian day), if sid_mode is SE_SIDM_USER
ayan_t0 - Initial ayanamsha at t0, if sid_mode is SE_SIDM_USER. This is (tropical position - sidereal position) at date t0.
関連項目:
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_SIDM_USER, SweConst.SE_SIDBIT_ECL_T0, SweConst.SE_SIDBIT_SSY_PLANE

swe_get_ayanamsa

public double swe_get_ayanamsa(double tjd_et)
This calculates the ayanamsha for a given date. You should call swe_set_sid_mode(...) before, where you will set the mode of ayanamsha, as many different ayanamshas are used in the world today.

パラメータ:
tjd_et - The date as Julian Day in ET (Ephemeris Time or Dynamic Time)
戻り値:
The value of the ayanamsha
関連項目:
swe_set_sid_mode(int, double, double), swe_get_ayanamsa_ut(double)

swe_get_ayanamsa_ut

public double swe_get_ayanamsa_ut(double tjd_ut)
This calculates the ayanamsha for a given date. You should call swe_set_sid_mode(...) before, where you will set the mode of ayanamsha, as many different ayanamshas are used in the world today.

パラメータ:
tjd_ut - The date as Julian Day in UT (Universal Time)
戻り値:
The value of the ayanamsha
関連項目:
swe_set_sid_mode(int, double, double), swe_get_ayanamsa(double)

swe_fixstar

public int swe_fixstar(java.lang.StringBuffer star,
                       double tjd,
                       int iflag,
                       double[] xx,
                       java.lang.StringBuffer serr)
Computes fixed stars. This method is identical to swe_fixstar_ut() with the one exception that the time has to be given in ET (Ephemeris Time or Dynamical Time instead of Universal Time UT). You would get ET by adding deltaT to the UT, e.g., tjd_et + SweDate.getDeltaT(tjd_et).

See swe_fixstar_ut(...) for missing information.

関連項目:
swe_fixstar_ut(java.lang.StringBuffer, double, int, double[], java.lang.StringBuffer)

readFixstarParameters

protected java.lang.String[] readFixstarParameters(java.lang.StringBuffer star,
                                                   java.lang.StringBuffer serr)

swe_fixstar_ut

public int swe_fixstar_ut(java.lang.StringBuffer star,
                          double tjd_ut,
                          int iflag,
                          double[] xx,
                          java.lang.StringBuffer serr)
Computes fixed stars. This method is identical to swe_fixstar() with the one exception that the time has to be given in UT (Universal Time instead of Ephemeris Time or Dynamical Time ET).

The fixed stars are defined in the file fixstars.cat 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:
- as a positive integer number meaning the star in the file fixstars.cat that is given on the line number of the given number, without counting any comment lines beginning with #.
- as a traditional name case insensitively compared to the first name on every line in fixstars.cat.
- as a nomenclature prefixed by a comma. This name is compared in a case preserving manner to the nomenclature name on every line in fixstars.cat.
On Output it returns the complete name (traditional plus nomenclature name), e.g. "Alpheratz,alAnd".
tjd_ut - The Julian Day in UT
iflag - Any of the SweConst.SEFLG_* flags
xx - 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.
戻り値:
iflag or SweConst.ERR (-1); iflag MAY have changed from input parameter!
関連項目:
swe_fixstar(java.lang.StringBuffer, double, int, double[], java.lang.StringBuffer)

swe_get_planet_name

public java.lang.String swe_get_planet_name(int ipl)
This will return the planet name for the given planet number. If you are looking for names of asteroids, it may be possible that no name is available so far. The names should be found in the asteroids data file, but if nothing is found there, the name will be looked up in the file seasnam.txt that should be more up to date and can be updated by the user. You can get a list of names from http://cfa-www.harvard.edu/iau/lists/MPNames.html, which you would like to rename to seasnam.txt and move to your ephemeris directory.

パラメータ:
ipl - The planet number
戻り値:
The name of the planet

swe_get_ayanamsa_name

public java.lang.String swe_get_ayanamsa_name(int isidmode)

swe_set_topo

public 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.

パラメータ:
geolon - The Longitude in degrees
geolat - The Latitude in degrees
geoalt - The height above sea level in meters

getJPLRange

public double[] getJPLRange(java.lang.String fname)

swe_azalt

public 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.

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 UT
calc_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.

swe_azalt_rev

public 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. The true altitude might be gained from an apparent altitude by calling swe_refrac.

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 UT
calc_flag - SweConst.SE_HOR2ECL or SweConst.SE_HOR2EQU
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.
xin - double[2] with azimuth and true altitude of planet
xout - Output parameter: a double[2] returning either ecliptic or equatorial coordinates

swe_lun_eclipse_how

public 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.

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]!

パラメータ:
tjd_ut - The Julian Day number in UT
ifl - 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 above
serr - A StringBuffer containing a warning or error message, if something fails
戻り値:
-1 (SweConst.ERR), if the calculation failed
0, if there is no lunar eclipse at that time and location
otherwise:
SweConst.SE_ECL_TOTAL
SweConst.SE_ECL_PENUMBRAL
SweConst.SE_ECL_PARTIAL
関連項目:
SweConst.SE_ECL_TOTAL, SweConst.SE_ECL_PENUMBRAL, SweConst.SE_ECL_PARTIAL

swe_lun_eclipse_when

public 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.

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]!

パラメータ:
tjd_start - The Julian Day number in UT, from when to start searching
ifl - 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 eclipse
tret - A double[10], on return containing the times of different occasions of the eclipse as above
backward - 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.
戻り値:
-1 (SweConst.ERR), if the calculation failed
otherwise:
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
関連項目:
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

swe_nod_aps

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)
Computes planetary nodes and apsides (perihelia, aphelia, second focal points of the orbital ellipses). This method is identical to swe_nod_aps_ut() with the one exception that the time has to be given in ET (Ephemeris Time or Dynamical Time). You would get ET by adding deltaT to the UT, e.g., tjd_et + SweDate.getDeltaT(tjd_et).

See swe_nod_aps_ut(...) for missing information.


swe_nod_aps_ut

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)
Computes planetary nodes and apsides (perihelia, aphelia, second focal points of the orbital ellipses). This method is identical to swe_nod_aps_ut() with the one exception that the time has to be given in UT (Universal Time) and not in ET (Ephemeris Time or Dynamical Time).

パラメータ:
tjd_ut - The time in UT
ipl - Planet number
iflag - Any of the SEFLG_* flags
method - 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 node
xndsc - Output parameter of double[6]. On return it contains six doubles for the descending node
xperi - Output parameter of double[6]. On return it contains six doubles for the perihelion
xaphe - Output parameter of double[6]. On return it contains six doubles for the aphelion
serr - A StringBuffer containing a warning or error message, if something fails.
戻り値:
SweConst.OK (0) or SweConst.ERR (-1)
関連項目:
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

swe_pheno

public 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. This method is identical to swe_pheno_ut() with the one exception that the time has to be given in ET (Ephemeris Time or Dynamical Time). You would get ET by adding deltaT to the UT, e.g., tjd_et + SweDate.getDeltaT(tjd_et).

See swe_pheno_ut(...) for missing information.


swe_pheno_ut

public 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.

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]!

パラメータ:
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). Also allowable 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 (0) or SweConst.ERR (-1)
関連項目:
SweConst.OK, SweConst.ERR, SweConst.SEFLG_JPLEPH, SweConst.SEFLG_MOSEPH, SweConst.SEFLG_TRUEPOS, SweConst.SEFLG_HELCTR

swe_refrac

public double swe_refrac(double inalt,
                         double atpress,
                         double attemp,
                         int calc_flag)
Calculates the true altitude from the apparent altitude or vice versa.

パラメータ:
inalt - The true or apparent altitude to be converted
atpress - 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_TRUE
戻り値:
The converted altitude

swe_rise_trans

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)
Calculates the times of rising, setting and meridian transits for all planets, asteroids, the moon, and the fixed stars.

パラメータ:
tjd_ut - The Julian Day number in UT, from when to start searching
ipl - 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, SE_BIT_DISC_CENTER, SE_BIT_NO_REFRACTION). If it is 0, SE_CALC_RISE is calculated
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 fails
戻り値:
SweConst.OK (0) or SweConst.ERR (-1)
関連項目:
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

swe_sol_eclipse_how

public 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.

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]!

パラメータ:
tjd_ut - The Julian Day number in UT
ifl - 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 above
serr - A StringBuffer containing a warning or error message, if something fails
戻り値:
-1 (SweConst.ERR), if the calculation failed
0, if there is no solar eclipse at that time and location
SweConst.SE_ECL_TOTAL
SweConst.SE_ECL_ANNULAR
SweConst.SE_ECL_PARTIAL
関連項目:
SweConst.SE_ECL_TOTAL, SweConst.SE_ECL_ANNULAR, SweConst.SE_ECL_PARTIAL, SweConst.SEFLG_JPLEPH, SweConst.SEFLG_MOSEPH

swe_sol_eclipse_when_glob

public 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.

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]!

パラメータ:
tjd_start - The Julian Day number in UT, from when to start searching
ifl - 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 eclipse
tret - A double[10], on return containing the times of different occasions of the eclipse as above
backward - !=0, if search should be done backwards
serr - A StringBuffer containing a warning or error message, if something fails.
戻り値:
-1 (SweConst.ERR), if the calculation failed
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
関連項目:
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

swe_sol_eclipse_when_loc

public 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. Note the uncertainty of Delta T for the remote past and the future.

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]!

パラメータ:
tjd_start - The Julian Day number in UT, from when to start searching
ifl - 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 above
attr - A double[20], on return containing different attributes of the eclipse. See above.
backward - true, if search should be done backwards
serr - A StringBuffer containing a warning or error message, if something fails.
戻り値:
-1 (SweConst.ERR), if the calculation failed
SweConst.SE_ECL_TOTAL
SweConst.SE_ECL_ANNULAR
SweConst.SE_ECL_PARTIAL
in combination with:
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_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

swe_sol_eclipse_where

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]!

パラメータ:
tjd_ut - The Julian Day number in UT
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.
戻り値:
-1 (SweConst.ERR), if the calculation failed
0, if there is no solar eclipse at that time
SweConst.SE_ECL_TOTAL
SweConst.SE_ECL_ANNULAR
SweConst.SE_ECL_TOTAL | SweConst.SE_ECL_CENTRAL
SweConst.SE_ECL_TOTAL | SweConst.SE_ECL_NONCENTRAL
SweConst.SE_ECL_ANNULAR | SweConst.SE_ECL_CENTRAL
SweConst.SE_ECL_ANNULAR | SweConst.SE_ECL_NONCENTRAL
SweConst.SE_ECL_PARTIAL
関連項目:
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

swe_lun_occult_when_loc

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)
Computes the next eclipse of any planet or fixstar at a given geographical position. Note the uncertainty of Delta T for the remote past and the future.

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]!

パラメータ:
tjd_start - The Julian Day number in UT, from when to start searching
ipl - 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 above
attr - A double[20], on return containing different attributes of the eclipse. See above.
backward - any value != 0 means, search should be done backwards
serr - A StringBuffer containing a warning or error message, if something fails.
戻り値:
-1 (SweConst.ERR), if the calculation failed
SweConst.SE_ECL_TOTAL
SweConst.SE_ECL_ANNULAR
SweConst.SE_ECL_PARTIAL
in combination with:
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
関連項目:
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

swe_lun_occult_where

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)
Computes the geographic location for a given time, where a planet occultation by the moon is central or maximum for a non-central occultation.

パラメータ:
tjd_ut - The Julian Day number in UT
ipl - 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.
戻り値:
-1 (SweConst.ERR), if the calculation failed
0, if there is no solar eclipse at that time
関連項目:
swe_sol_eclipse_where(double, int, double[], double[], java.lang.StringBuffer), swe_fixstar_ut(StringBuffer, double, int, double[], StringBuffer)

swe_lun_occult_when_glob

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)
Computes the next lunar occultation anywhere on earth. This method also finds solar eclipses, but is less efficient than swe_sol_eclipse_when_glob().

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]!

パラメータ:
tjd_start - The Julian Day number in UT, from when to start searching
ipl - planet number of occulted body
starname - 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 above
backward - if != 0, search is done backwards
serr - A StringBuffer containing a warning or error message, if something fails.
戻り値:
-1 (SweConst.ERR), if the calculation failed
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
関連項目:
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

swe_gauquelin_sector

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)
Finds the gauquelin sector position of a planet or fixed star.

パラメータ:
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 latitude
imeth = 1: sector from longitude, with lat = 0
imeth = 2: sector from rise and set
imeth = 3: sector from rise and set with refraction
Rise and set are defined as appearance and disappearance of disc center.
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.
戻り値:
SweConst.OK (0) or SweConst.ERR (-1) on error.
関連項目:
swe_fixstar_ut(StringBuffer, double, int, double[], StringBuffer), SweConst.SEFLG_TOPOCTR, SweConst.SEFLG_JPLEPH, SweConst.SEFLG_MOSEPH

swe_house_pos

public 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. With Koch houses, the function sometimes returns 0, if the computation was not possible.

パラメータ:
armc - The ARMC (= sidereal time)
geolat - The latitude
eps - 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 warnings
戻り値:
A value between 1.0 and 12.999999, indicating in which house a planet is and how far from its cusp it is. Koch may return 0, if the calculation was not possible.
関連項目:
swe_houses(double, int, double, double, int, double[], double[])

swe_houses_armc

public int swe_houses_armc(double armc,
                           double geolat,
                           double eps,
                           int hsys,
                           double[] cusp,
                           double[] ascmc)
Calculates the house positions and other vital points. You would use this method instead of swe_houses, if you do not have a date available, but just the ARMC (sidereal time).

パラメータ:
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 ascendent etc. are returned here. See swe_houses(...) for further info on this parameter.
戻り値:
SweConst.OK (==0) or SweConst.ERR (==-1), if calculation was not possible due to nearness to the polar circle in Koch or Placidus house system or when requesting Gauquelin sectors. Calculation automatically switched to Porphyry house calculation method in this case, so that valid houses will be returned anyway, just in a different house system than requested.
関連項目:
swe_houses(double, int, double, double, int, double[], double[]), swe_calc(double, int, int, double[], java.lang.StringBuffer)

swe_houses

public 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. The possible house systems are:

(int)'P'  Placidus
(int)'K'  Koch
(int)'O'  Porphyrius
(int)'R'  Regiomontanus
(int)'C'  Campanus
(int)'A'  equal (cusp 1 is ascendent)
(int)'E'  equal (cusp 1 is ascendent)
(int)'V'  Vehlow equal (asc. in middle of house 1)
(int)'X'  axial rotation system/ Meridian houses
(int)'H'  azimuthal or horizontal system
(int)'T'  Polich/Page ('topocentric' system)
(int)'B'  Alcabitius

As Koch and Placidus don't work in the polar circle, the calculation is done in that case by swapping MC/IC so that MC is always before AC in the zodiac. Then the quadrants are divided into 3 equal parts.

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 UT
iflag - 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 ascendent etc. are returned here. See the list above.
戻り値:
SweConst.OK (==0) or SweConst.ERR (==-1), if calculation was not possible due to nearness to the polar circle in Koch or Placidus house system or when requesting Gauquelin sectors. Calculation automatically switched to Porphyry house calculation method in this case, so that valid houses will be returned anyway, just in a different house system than requested.
関連項目:
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

swe_houses

public int swe_houses(double tjd_ut,
                      int iflag,
                      double geolat,
                      double geolon,
                      int hsys,
                      double[] cusp,
                      double[] ascmc,
                      int aOffs)

getTransitET

public double getTransitET(TransitCalculator tc,
                           double jdET,
                           boolean backwards)
                    throws java.lang.IllegalArgumentException,
                           SwissephException
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. Dates are interpreted as ET (=UT + deltaT).

パラメータ:
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.
戻り値:
return A double containing the julian day number for the next / previous transit as ET.
例外:
java.lang.IllegalArgumentException
SwissephException
関連項目:
TCPlanet.TCPlanet(SwissEph, int, int, double), TCPlanetPlanet.TCPlanetPlanet(SwissEph, int, int, int, double)

getTransitET

public double getTransitET(TransitCalculator tc,
                           double jdET,
                           boolean backwards,
                           double jdLimit)
                    throws java.lang.IllegalArgumentException,
                           SwissephException
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. Dates are interpreted as ET (=UT + deltaT).

パラメータ:
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.
戻り値:
return A double containing the julian day number for the next / previous transit as ET.
例外:
java.lang.IllegalArgumentException
SwissephException
関連項目:
TCPlanet.TCPlanet(SwissEph, int, int, double), TCPlanetPlanet.TCPlanetPlanet(SwissEph, int, int, int, double)

getTransitUT

public double getTransitUT(TransitCalculator tc,
                           double jdUT,
                           boolean backwards)
                    throws java.lang.IllegalArgumentException,
                           SwissephException
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. Dates are interpreted as UT (=ET - deltaT).

パラメータ:
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.
戻り値:
return A double containing the julian day number for the next / previous transit as UT.
例外:
java.lang.IllegalArgumentException
SwissephException
関連項目:
TCPlanet.TCPlanet(SwissEph, int, int, double), TCPlanetPlanet.TCPlanetPlanet(SwissEph, int, int, int, double)

getTransitUT

public double getTransitUT(TransitCalculator tc,
                           double jdUT,
                           boolean backwards,
                           double jdLimit)
                    throws java.lang.IllegalArgumentException,
                           SwissephException
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. Dates are interpreted as UT (=ET - deltaT).

パラメータ:
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.
戻り値:
return A double containing the julian day number for the next / previous transit as UT.
例外:
java.lang.IllegalArgumentException
SwissephException
関連項目:
TCPlanet.TCPlanet(SwissEph, int, int, double), TCPlanetPlanet.TCPlanetPlanet(SwissEph, int, int, int, double)

getFixstarMagnitude

public double getFixstarMagnitude(java.lang.String star)
                           throws SwissephException
Returns the magnitude (brightness) of a fixstar. Use this version, if you just need the magnitude of the star.

パラメータ:
star - Name of star or line number in star file (start from 1, don't count comment lines).

戻り値:
magnitude of the star.
例外:
SwissephException
関連項目:
getFixstarMagnitude(StringBuffer)

getFixstarMagnitude

public double getFixstarMagnitude(java.lang.StringBuffer star)
                           throws SwissephException
Returns the magnitude (brightness) of a fixstar. Use this version, if you also need the star name on output.

パラメータ:
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.

戻り値:
magnitude of the star.
例外:
SwissephException
関連項目:
getFixstarMagnitude(String)

swe_fixstar_mag

protected int swe_fixstar_mag(java.lang.StringBuffer star,
                              double[] mag,
                              java.lang.StringBuffer serr)
                       throws SwissephException
Returns the magnitude (brightness) of a fixstar.

パラメータ:
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 output
戻り値:
SweConst.OK. All errors will throw a SwissephException.
例外:
SwissephException

swe_time_equ

public int swe_time_equ(double tjd,
                        DblObj E,
                        java.lang.StringBuffer serr)
Returns the difference between local apparent and local mean time in days. E = LAT - LMT

パラメータ:
tjd - input date in julian days (ET)
E - output value: the difference between the times
serr - buffer for error message on output
戻り値:
SweConst.ERR on error, SweConst.OK else