10.01.2015 Views

Programming interface to the Swiss Ephemeris - programmiastral.com

Programming interface to the Swiss Ephemeris - programmiastral.com

Programming interface to the Swiss Ephemeris - programmiastral.com

SHOW MORE
SHOW LESS

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> 28<br />

12. House cusp calculation<br />

12.1 swe_houses()<br />

/* house cusps, ascendant and MC */<br />

int swe_houses(<br />

double tjd_ut, /* Julian day number, UT */<br />

double geolat, /* geographic latitude, in degrees */<br />

double geolon,<br />

/* geographic longitude, in degrees<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 />

int hsys, /* house method, one of <strong>the</strong> letters PKRCAV */<br />

double *cusps, /* array for 13 doubles */<br />

double *ascmc); /* array for 10 doubles */<br />

12.2 swe_houses_armc()<br />

int swe_houses_armc(<br />

double armc, /* ARMC */<br />

double geolat, /* geographic latitude, in degrees */<br />

double eps, /* ecliptic obliquity, in degrees */<br />

int hsys, /* house method, one of <strong>the</strong> letters PKRCAV */<br />

double *cusps, /* array for 13 doubles */<br />

double *ascmc); /* array for 10 doubles */<br />

12.3 swe_houses_ex()<br />

/* extended function; <strong>to</strong> <strong>com</strong>pute tropical or sidereal positions */<br />

int swe_houses_ex(<br />

double tjd_ut, /* Julian day number, UT */<br />

int32 iflag, /* 0 or SEFLG_SIDEREAL or SEFLG_RADIANS */<br />

double geolat, /* geographic latitude, in degrees */<br />

double geolon,<br />

/* geographic longitude, in degrees<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 />

int hsys, /* house method, one of <strong>the</strong> letters PKRCAV */<br />

double *cusps, /* array for 13 doubles */<br />

double *ascmc); /* array for 10 doubles */<br />

The function swe_houses() is most <strong>com</strong>fortable, if you need <strong>the</strong> houses for a given date and geographic<br />

position. Sometimes, however, you will want <strong>to</strong> <strong>com</strong>pute houses from an ARMC, e.g. with <strong>the</strong> <strong>com</strong>posite<br />

horoscope which has no date, only <strong>the</strong> <strong>com</strong>posite ARMC of two natal ARMCs. In such cases, you can use <strong>the</strong><br />

function swe_houses_armc(). To <strong>com</strong>pute <strong>the</strong> <strong>com</strong>posite ecliptic obliquity eps, you will have <strong>to</strong> call<br />

sweph_calc() with ipl = SE_ECL_NUT for both birth dates and calculate <strong>the</strong> average of both eps.<br />

Note that tjd_ut must be Universal Time, whereas planets are <strong>com</strong>puted from <strong>Ephemeris</strong> Time<br />

tjd_et = tjd_ut + delta_t(tjd_ut).<br />

Also note that <strong>the</strong> array cusps must provide space for 13 doubles, o<strong>the</strong>rwise you risk a program crash.<br />

The extended house function swe_houses_ex() does exactly <strong>the</strong> same calculations as swe_houses(). The<br />

difference is that swe_houses_ex() has a parameter iflag, which can be set <strong>to</strong> SEFLG_SIDEREAL, if sidereal<br />

house positions are wanted. Before calling swe_houses_ex() for sidereal house positions, <strong>the</strong> sidereal mode<br />

can be set by <strong>the</strong> function swe_set_sid_mode(). If this is not done, <strong>the</strong> default sidereal mode, i.e. <strong>the</strong><br />

Fagan/Bradley, ayanamsha will be used.<br />

There is no extended function for swe_houses_armc(). Therefore, if you want <strong>to</strong> <strong>com</strong>pute such obscure things<br />

as sidereal <strong>com</strong>posite house cusps, <strong>the</strong> procedure will be more <strong>com</strong>plicated:<br />

/* sidereal <strong>com</strong>posite house <strong>com</strong>putation; with true epsilon, but without nutation in longitude */<br />

swe_calc(tjd_et1, SE_ECL_NUT, 0, x1, serr);<br />

swe_calc(tjd_et2, SE_ECL_NUT, 0, x2, serr);

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!