Add opposing points: DESC, MC, ANTIVERTEX

Solves #4
This commit is contained in:
Gergely Polonkai 2016-09-29 08:36:38 +02:00
parent c0711d512d
commit 4e53c0c771
3 changed files with 58 additions and 0 deletions

View File

@ -805,14 +805,39 @@ gswe_moment_calculate_house_positions(GsweMoment *moment, GError **err)
err
);
}
if (gswe_moment_has_planet(moment, GSWE_PLANET_DESCENDANT)) {
calculate_data_by_position(
moment,
GSWE_PLANET_DESCENDANT,
fmod(ascmc[0] + 180.0, 180.0),
err
);
}
if (gswe_moment_has_planet(moment, GSWE_PLANET_MC)) {
calculate_data_by_position(moment, GSWE_PLANET_MC, ascmc[1], err);
}
if (gswe_moment_has_planet(moment, GSWE_PLANET_IC)) {
calculate_data_by_position(
moment,
GSWE_PLANET_IC,
fmod(ascmc[2] + 180.0, 180.0),
err
);
}
if (gswe_moment_has_planet(moment, GSWE_PLANET_VERTEX)) {
calculate_data_by_position(moment, GSWE_PLANET_VERTEX, ascmc[3], err);
}
if (gswe_moment_has_planet(moment, GSWE_PLANET_ANTIVERTEX)) {
calculate_data_by_position(
moment,
GSWE_PLANET_ANTIVERTEX,
fmod(ascmc[3] + 180.0, 180.0),
err
);
}
}
/**

View File

@ -35,9 +35,12 @@
* GswePlanet:
* @GSWE_PLANET_NONE: no planet
* @GSWE_PLANET_ASCENDANT: the ascendant
* @GSWE_PLANET_DESCENDANT: the descendant
* @GSWE_PLANET_MC: midheaven (Medium Coeli)
* @GSWE_PLANET_IC: Immum Coeli
* @GSWE_PLANET_VERTEX: the Vertex (the point where the ecliptic meats the
* primal vertical)
* @GSWE_PLANET_ANTIVERTEX: the Antivertex (the point opposing the Vertex)
* @GSWE_PLANET_MOON_NODE: the mean ascending (north) Moon node
* @GSWE_PLANET_MOON_SOUTH_NODE: the mean descending (south) Moon node
* @GSWE_PLANET_MOON_APOGEE: the mean Moon apogee (sometimes called Dark Moon,
@ -80,6 +83,9 @@ typedef enum {
GSWE_PLANET_MOON_NODE,
GSWE_PLANET_MOON_APOGEE,
GSWE_PLANET_MOON_SOUTH_NODE,
GSWE_PLANET_DESCENDANT,
GSWE_PLANET_IC,
GSWE_PLANET_ANTIVERTEX,
/* Actual astrological planets */
GSWE_PLANET_SUN = 11,

View File

@ -178,6 +178,14 @@ void gswe_init_with_dir(gchar *directory)
9.0,
2
);
ADD_PLANET(gswe_planet_info_table, planet_info,
GSWE_PLANET_DESCENDANT,
-1,
FALSE,
_("Descendant"),
0.0,
0
);
ADD_PLANET(gswe_planet_info_table, planet_info,
GSWE_PLANET_MC,
-1,
@ -186,6 +194,14 @@ void gswe_init_with_dir(gchar *directory)
5.0,
1
);
ADD_PLANET(gswe_planet_info_table, planet_info,
GSWE_PLANET_IC,
-1,
FALSE,
_("Immum Coeli"),
0.0,
0
);
ADD_PLANET(gswe_planet_info_table, planet_info,
GSWE_PLANET_VERTEX,
-1,
@ -194,6 +210,14 @@ void gswe_init_with_dir(gchar *directory)
2.0,
0
);
ADD_PLANET(gswe_planet_info_table, planet_info,
GSWE_PLANET_ANTIVERTEX,
-1,
FALSE,
_("Anti-vertex"),
0.0,
0
);
ADD_PLANET(gswe_planet_info_table, planet_info,
GSWE_PLANET_MOON_NODE,
SE_MEAN_NODE,
@ -204,6 +228,9 @@ void gswe_init_with_dir(gchar *directory)
);
ADD_PLANET(gswe_planet_info_table, planet_info,
GSWE_PLANET_MOON_SOUTH_NODE,
// As this is just the opposing point of the mean node,
// we actually calculate that, and simply add 180
// degrees when queried.
SE_MEAN_NODE,
TRUE,
_("Descending Moon Node"),