コード例 #1
0
static PyObject* astrology_swe_get_ayanamsa_ut(PyObject *self, PyObject *args)
{
	double tjd_ut;

	if (!PyArg_ParseTuple(args, "d", &tjd_ut))
		return NULL;

	double ret = swe_get_ayanamsa_ut(tjd_ut);

	return Py_BuildValue("d", ret);
}
コード例 #2
0
ファイル: swe4r.c プロジェクト: aakara/swe4r
/*
 * This function computes the ayanamsha, the distance of the tropical vernal point from the sidereal zero point of the zodiac.
 * The ayanamsha is used to compute sidereal planetary positions from tropical ones:
 * pos_sid = pos_trop – ayanamsha
 * Before calling swe_get_ayanamsha(), you have to set the sidereal mode with swe_set_sid_mode, unless you want the default sidereal mode, which is the Fagan/Bradley ayanamsha.
 * http://www.astro.com/swisseph/swephprg.htm#_Toc283735479
 * double swe_get_ayanamsa_ut(double tjd_ut);
 */
static VALUE t_swe_get_ayanamsa_ut(VALUE self, VALUE julian_ut) {
	double ayanamsa = swe_get_ayanamsa_ut(NUM2DBL(julian_ut));
	return rb_float_new(ayanamsa);
}