Programming interface to the Swiss Ephemeris - programmiastral.com
Programming interface to the Swiss Ephemeris - programmiastral.com
Programming interface to the Swiss Ephemeris - programmiastral.com
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>Swiss</strong> <strong>Ephemeris</strong> 20<br />
int32 ifl, /* ephemeris flag */<br />
int32 ifltype, /* eclipse type wanted: SE_ECL_TOTAL etc. or 0, if any eclipse type */<br />
double *tret, /* return array, 10 doubles, see below */<br />
AS_BOOL backward, /* TRUE, if backward search */<br />
char *serr); /* return error string */<br />
The function returns:<br />
/* retflag -1 (ERR) on error (e.g. if swe_calc() for sun or moon fails)<br />
SE_ECL_TOTAL or SE_ECL_PENUMBRAL or SE_ECL_PARTIAL<br />
tret[0]<br />
time of maximum eclipse<br />
tret[1]<br />
tret[2]<br />
time of partial phase begin (indices consistent with solar eclipses)<br />
tret[3]<br />
time of partial phase end<br />
tret[4]<br />
time of <strong>to</strong>tality begin<br />
tret[5]<br />
time of <strong>to</strong>tality end<br />
tret[6]<br />
time of penumbral phase begin<br />
tret[7]<br />
time of penumbral phase end<br />
*/<br />
6.6. swe_lun_eclipse_how ()<br />
This function <strong>com</strong>putes <strong>the</strong> attributes of a lunar eclipse at a given time:<br />
int32 swe_lun_eclipse_how(<br />
double tjd_ut, /* time, Jul. day UT */<br />
int32 ifl, /* ephemeris flag */<br />
double *geopos,<br />
/* input array, geopos, geolon, geoheight<br />
eastern longitude is positive,<br />
western longitude is negative,<br />
nor<strong>the</strong>rn latitude is positive,<br />
sou<strong>the</strong>rn latitude is negative */<br />
double *attr, /* return array, 20 doubles, see below */<br />
char *serr); /* return error string */<br />
The function returns:<br />
/* retflag -1 (ERR) on error (e.g. if swe_calc() for sun or moon fails)<br />
SE_ECL_TOTAL or SE_ECL_PENUMBRAL or SE_ECL_PARTIAL<br />
0 if <strong>the</strong>re is no eclipse<br />
attr[0]<br />
attr[1]<br />
attr[4]<br />
attr[5]<br />
attr[6]<br />
attr[7]<br />
*/<br />
declare as attr[20] at least !<br />
umbral magnitude at tjd<br />
penumbral magnitude<br />
azimuth of moon at tjd. Not implemented so far<br />
true altitude of moon above horizon at tjd. Not implemented so far<br />
apparent altitude of moon above horizon at tjd. Not implemented so far<br />
distance of moon from opposition in degrees<br />
6.7. swe_rise_trans(), risings, settings, meridian transits<br />
This function <strong>com</strong>putes <strong>the</strong> times of rising, setting and meridian transits for all planets, asteroids, <strong>the</strong> moon, and<br />
<strong>the</strong> fixed stars. Its definition is as follows:<br />
int32 swe_rise_trans(<br />
double tjd_ut, /* search after this time (UT) */<br />
int32 ipl, /* planet number, if planet or moon */<br />
char *starname, /* star name, if star */<br />
int32 epheflag, /* ephemeris flag */<br />
int32 rsmi,<br />
/* integer specifying that rise, set, orone of <strong>the</strong> two meridian transits is<br />
wanted. see definition below */