1 /*******************************************************
2 module swehouse.h
3 house and (simple) aspect calculation
4 
5 *******************************************************/
6 
7 /* Copyright (C) 1997 - 2021 Astrodienst AG, Switzerland.  All rights reserved.
8 
9   License conditions
10   ------------------
11 
12   This file is part of Swiss Ephemeris.
13 
14   Swiss Ephemeris is distributed with NO WARRANTY OF ANY KIND.  No author
15   or distributor accepts any responsibility for the consequences of using it,
16   or for whether it serves any particular purpose or works at all, unless he
17   or she says so in writing.
18 
19   Swiss Ephemeris is made available by its authors under a dual licensing
20   system. The software developer, who uses any part of Swiss Ephemeris
21   in his or her software, must choose between one of the two license models,
22   which are
23   a) GNU Affero General Public License (AGPL)
24   b) Swiss Ephemeris Professional License
25 
26   The choice must be made before the software developer distributes software
27   containing parts of Swiss Ephemeris to others, and before any public
28   service using the developed software is activated.
29 
30   If the developer choses the AGPL software license, he or she must fulfill
31   the conditions of that license, which includes the obligation to place his
32   or her whole software project under the AGPL or a compatible license.
33   See https://www.gnu.org/licenses/agpl-3.0.html
34 
35   If the developer choses the Swiss Ephemeris Professional license,
36   he must follow the instructions as found in http://www.astro.com/swisseph/
37   and purchase the Swiss Ephemeris Professional Edition from Astrodienst
38   and sign the corresponding license contract.
39 
40   The License grants you the right to use, copy, modify and redistribute
41   Swiss Ephemeris, but only under certain conditions described in the License.
42   Among other things, the License requires that the copyright notices and
43   this notice be preserved on all copies.
44 
45   Authors of the Swiss Ephemeris: Dieter Koch and Alois Treindl
46 
47   The authors of Swiss Ephemeris have no control or influence over any of
48   the derived works, i.e. over software or services created by other
49   programmers which use Swiss Ephemeris functions.
50 
51   The names of the authors or of the copyright holder (Astrodienst) must not
52   be used for promoting any software, product or service which uses or contains
53   the Swiss Ephemeris. This copyright notice is the ONLY place where the
54   names of the authors can legally appear, except in cases where they have
55   given special permission in writing.
56 
57   The trademarks 'Swiss Ephemeris' and 'Swiss Ephemeris inside' may be used
58   for promoting such software, products or services.
59 */
60 
61 struct houses {
62 	  double cusp[37];
63 	  double cusp_speed[37];
64 	  double ac;
65 	  double ac_speed;	// speed of ac
66 	  double mc;
67 	  double mc_speed;	// speed of mc
68 	  double armc_speed;	// speed of armc
69 	  double vertex;
70 	  double vertex_speed;	// speed of vertex
71 	  double equasc;
72 	  double equasc_speed;	// speed
73 	  double coasc1;
74 	  double coasc1_speed;	// speed
75 	  double coasc2;
76 	  double coasc2_speed;	// speed
77 	  double polasc;
78 	  double polasc_speed;	// speed
79 	  double sundec;	// declination of Sun for Sunshine houses
80 	  AS_BOOL do_speed;
81 	  AS_BOOL do_hspeed;
82 	  AS_BOOL do_interpol;
83 	  char serr[AS_MAXCH];
84 	};
85 
86 #define HOUSES 	struct houses
87 #define VERY_SMALL	1E-10
88 
89 #define degtocs(x)    (d2l((x) * DEG))
90 #define cstodeg(x)    (double)((x) * CS2DEG)
91 
92 #define sind(x) sin((x) * DEGTORAD)
93 #define cosd(x) cos((x) * DEGTORAD)
94 #define tand(x) tan((x) * DEGTORAD)
95 #define asind(x) (asin(x) * RADTODEG)
96 #define acosd(x) (acos(x) * RADTODEG)
97 #define atand(x) (atan(x) * RADTODEG)
98 #define atan2d(y, x) (atan2(y, x) * RADTODEG)
99