1 /************************************************************
2   SWISSEPH: exported definitions and constants
3 
4   This file represents the standard application interface (API)
5   to the Swiss Ephemeris.
6 
7   A C programmer needs only to include this file, and link his code
8   with the SwissEph library.
9 
10   The function calls are documented in the Programmer's documentation,
11   which is online in HTML format.
12 
13   Structure of this file:
14     Public API definitions
15     Internal developer's definitions
16     Public API functions.
17 
18   Authors: Dieter Koch and Alois Treindl, Astrodienst Zurich
19 
20 ************************************************************/
21 /* Copyright (C) 1997 - 2021 Astrodienst AG, Switzerland.  All rights reserved.
22 
23   License conditions
24   ------------------
25 
26   This file is part of Swiss Ephemeris.
27 
28   Swiss Ephemeris is distributed with NO WARRANTY OF ANY KIND.  No author
29   or distributor accepts any responsibility for the consequences of using it,
30   or for whether it serves any particular purpose or works at all, unless he
31   or she says so in writing.
32 
33   Swiss Ephemeris is made available by its authors under a dual licensing
34   system. The software developer, who uses any part of Swiss Ephemeris
35   in his or her software, must choose between one of the two license models,
36   which are
37   a) GNU Affero General Public License (AGPL)
38   b) Swiss Ephemeris Professional License
39 
40   The choice must be made before the software developer distributes software
41   containing parts of Swiss Ephemeris to others, and before any public
42   service using the developed software is activated.
43 
44   If the developer choses the AGPL software license, he or she must fulfill
45   the conditions of that license, which includes the obligation to place his
46   or her whole software project under the AGPL or a compatible license.
47   See https://www.gnu.org/licenses/agpl-3.0.html
48 
49   If the developer choses the Swiss Ephemeris Professional license,
50   he must follow the instructions as found in http://www.astro.com/swisseph/
51   and purchase the Swiss Ephemeris Professional Edition from Astrodienst
52   and sign the corresponding license contract.
53 
54   The License grants you the right to use, copy, modify and redistribute
55   Swiss Ephemeris, but only under certain conditions described in the License.
56   Among other things, the License requires that the copyright notices and
57   this notice be preserved on all copies.
58 
59   Authors of the Swiss Ephemeris: Dieter Koch and Alois Treindl
60 
61   The authors of Swiss Ephemeris have no control or influence over any of
62   the derived works, i.e. over software or services created by other
63   programmers which use Swiss Ephemeris functions.
64 
65   The names of the authors or of the copyright holder (Astrodienst) must not
66   be used for promoting any software, product or service which uses or contains
67   the Swiss Ephemeris. This copyright notice is the ONLY place where the
68   names of the authors can legally appear, except in cases where they have
69   given special permission in writing.
70 
71   The trademarks 'Swiss Ephemeris' and 'Swiss Ephemeris inside' may be used
72   for promoting such software, products or services.
73 */
74 
75 #ifdef __cplusplus
76 extern "C" {
77 #endif
78 
79 #ifndef _SWEPHEXP_INCLUDED      /* allow multiple #includes of swephexp.h */
80 #define _SWEPHEXP_INCLUDED
81 
82 #include "sweodef.h"
83 
84 /***********************************************************
85  * definitions for use also by non-C programmers
86  ***********************************************************/
87 
88 #define SE_AUNIT_TO_KM        (149597870.700)
89 #define SE_AUNIT_TO_LIGHTYEAR (1.0/63241.07708427)
90 #define SE_AUNIT_TO_PARSEC    (1.0/206264.8062471)
91 
92 /* values for gregflag in swe_julday() and swe_revjul() */
93 # define SE_JUL_CAL	0
94 # define SE_GREG_CAL	1
95 
96 /*
97  * planet numbers for the ipl parameter in swe_calc()
98  */
99 #define SE_ECL_NUT      -1
100 
101 #define SE_SUN          0
102 #define SE_MOON         1
103 #define SE_MERCURY      2
104 #define SE_VENUS        3
105 #define SE_MARS         4
106 #define SE_JUPITER      5
107 #define SE_SATURN       6
108 #define SE_URANUS       7
109 #define SE_NEPTUNE      8
110 #define SE_PLUTO        9
111 #define SE_MEAN_NODE    10
112 #define SE_TRUE_NODE    11
113 #define SE_MEAN_APOG    12
114 #define SE_OSCU_APOG    13
115 #define SE_EARTH        14
116 #define SE_CHIRON       15
117 #define SE_PHOLUS       16
118 #define SE_CERES        17
119 #define SE_PALLAS       18
120 #define SE_JUNO         19
121 #define SE_VESTA        20
122 #define SE_INTP_APOG    21
123 #define SE_INTP_PERG    22
124 
125 #define SE_NPLANETS     23
126 
127 #define SE_PLMOON_OFFSET   9000
128 #define SE_AST_OFFSET   10000
129 #define SE_VARUNA   (SE_AST_OFFSET + 20000)
130 
131 #define SE_FICT_OFFSET  	40
132 #define SE_FICT_OFFSET_1  	39
133 #define SE_FICT_MAX  	       999
134 #define SE_NFICT_ELEM           15
135 
136 #define SE_COMET_OFFSET 1000
137 
138 #define SE_NALL_NAT_POINTS      (SE_NPLANETS + SE_NFICT_ELEM)
139 
140 /* Hamburger or Uranian "planets" */
141 #define SE_CUPIDO       	40
142 #define SE_HADES        	41
143 #define SE_ZEUS         	42
144 #define SE_KRONOS       	43
145 #define SE_APOLLON      	44
146 #define SE_ADMETOS      	45
147 #define SE_VULKANUS     	46
148 #define SE_POSEIDON     	47
149 /* other fictitious bodies */
150 #define SE_ISIS         	48
151 #define SE_NIBIRU       	49
152 #define SE_HARRINGTON           50
153 #define SE_NEPTUNE_LEVERRIER    51
154 #define SE_NEPTUNE_ADAMS        52
155 #define SE_PLUTO_LOWELL         53
156 #define SE_PLUTO_PICKERING      54
157 #define SE_VULCAN      		55
158 #define SE_WHITE_MOON  		56
159 #define SE_PROSERPINA  		57
160 #define SE_WALDEMATH  		58
161 
162 #define SE_FIXSTAR      -10
163 
164 #define SE_ASC			0
165 #define SE_MC			1
166 #define SE_ARMC			2
167 #define SE_VERTEX		3
168 #define SE_EQUASC  		4	/* "equatorial ascendant" */
169 #define SE_COASC1		5	/* "co-ascendant" (W. Koch) */
170 #define SE_COASC2		6	/* "co-ascendant" (M. Munkasey) */
171 #define SE_POLASC		7	/* "polar ascendant" (M. Munkasey) */
172 #define SE_NASCMC		8
173 
174 /*
175  * flag bits for parameter iflag in function swe_calc()
176  * The flag bits are defined in such a way that iflag = 0 delivers what one
177  * usually wants:
178  *    - the default ephemeris (SWISS EPHEMERIS) is used,
179  *    - apparent geocentric positions referring to the true equinox of date
180  *      are returned.
181  * If not only coordinates, but also speed values are required, use
182  * flag = SEFLG_SPEED.
183  *
184  * The 'L' behind the number indicates that 32-bit integers (Long) are used.
185  */
186 #define SEFLG_JPLEPH    1       /* use JPL ephemeris */
187 #define SEFLG_SWIEPH    2       /* use SWISSEPH ephemeris */
188 #define SEFLG_MOSEPH    4       /* use Moshier ephemeris */
189 
190 #define SEFLG_HELCTR	8      /* heliocentric position */
191 #define SEFLG_TRUEPOS	16     /* true/geometric position, not apparent position */
192 #define SEFLG_J2000	32     /* no precession, i.e. give J2000 equinox */
193 #define SEFLG_NONUT	64     /* no nutation, i.e. mean equinox of date */
194 #define SEFLG_SPEED3	128    /* speed from 3 positions (do not use it,
195                                 * SEFLG_SPEED is faster and more precise.) */
196 #define SEFLG_SPEED	256    /* high precision speed  */
197 #define SEFLG_NOGDEFL	512    /* turn off gravitational deflection */
198 #define SEFLG_NOABERR	1024   /* turn off 'annual' aberration of light */
199 #define SEFLG_ASTROMETRIC (SEFLG_NOABERR|SEFLG_NOGDEFL) /* astrometric position,
200                                 * i.e. with light-time, but without aberration and
201 			        * light deflection */
202 #define SEFLG_EQUATORIAL (2*1024)    /* equatorial positions are wanted */
203 #define SEFLG_XYZ	(4*1024)     /* cartesian, not polar, coordinates */
204 #define SEFLG_RADIANS	(8*1024)     /* coordinates in radians, not degrees */
205 #define SEFLG_BARYCTR	(16*1024)    /* barycentric position */
206 #define SEFLG_TOPOCTR	(32*1024)    /* topocentric position */
207 #define SEFLG_ORBEL_AA SEFLG_TOPOCTR /* used for Astronomical Almanac mode in
208                                       * calculation of Kepler elipses */
209 #define SEFLG_TROPICAL	(0)          /* tropical position (default) */
210 #define SEFLG_SIDEREAL	(64*1024)    /* sidereal position */
211 #define SEFLG_ICRS	(128*1024)   /* ICRS (DE406 reference frame) */
212 #define SEFLG_DPSIDEPS_1980	(256*1024) /* reproduce JPL Horizons
213                                       * 1962 - today to 0.002 arcsec. */
214 #define SEFLG_JPLHOR	SEFLG_DPSIDEPS_1980
215 #define SEFLG_JPLHOR_APPROX	(512*1024)   /* approximate JPL Horizons 1962 - today */
216 #define SEFLG_CENTER_BODY	(1024*1024)  /* calculate position of center of body (COB)
217                                                 of planet, not barycenter of its system */
218 #define SEFLG_TEST_PLMOON	(2*1024*1024 | SEFLG_J2000 | SEFLG_ICRS | SEFLG_HELCTR | SEFLG_TRUEPOS)  /* test raw data in files sepm9* */
219 
220 
221 #define SE_SIDBITS		256
222 /* for projection onto ecliptic of t0 */
223 #define SE_SIDBIT_ECL_T0        256
224 /* for projection onto solar system plane */
225 #define SE_SIDBIT_SSY_PLANE     512
226 /* with user-defined ayanamsha, t0 is UT */
227 #define SE_SIDBIT_USER_UT       1024
228 /* ayanamsha measured on ecliptic of date;
229  * see commentaries in sweph.c:swi_get_ayanamsa_ex(). */
230 #define SE_SIDBIT_ECL_DATE      2048
231 /* test feature: don't apply constant offset to ayanamsha
232  * see commentary above sweph.c:get_aya_correction() */
233 #define SE_SIDBIT_NO_PREC_OFFSET       4096
234 /* test feature: calculate ayanamsha using its original precession model */
235 #define SE_SIDBIT_PREC_ORIG     8192
236 
237 /* sidereal modes (ayanamsas) */
238 #define SE_SIDM_FAGAN_BRADLEY    0
239 #define SE_SIDM_LAHIRI           1
240 #define SE_SIDM_DELUCE           2
241 #define SE_SIDM_RAMAN            3
242 #define SE_SIDM_USHASHASHI       4
243 #define SE_SIDM_KRISHNAMURTI     5
244 #define SE_SIDM_DJWHAL_KHUL      6
245 #define SE_SIDM_YUKTESHWAR       7
246 #define SE_SIDM_JN_BHASIN        8
247 #define SE_SIDM_BABYL_KUGLER1    9
248 #define SE_SIDM_BABYL_KUGLER2   10
249 #define SE_SIDM_BABYL_KUGLER3   11
250 #define SE_SIDM_BABYL_HUBER    	12
251 #define SE_SIDM_BABYL_ETPSC    	13
252 #define SE_SIDM_ALDEBARAN_15TAU 14
253 #define SE_SIDM_HIPPARCHOS      15
254 #define SE_SIDM_SASSANIAN       16
255 #define SE_SIDM_GALCENT_0SAG    17
256 #define SE_SIDM_J2000           18
257 #define SE_SIDM_J1900           19
258 #define SE_SIDM_B1950           20
259 #define SE_SIDM_SURYASIDDHANTA  21
260 #define SE_SIDM_SURYASIDDHANTA_MSUN  22
261 #define SE_SIDM_ARYABHATA       23
262 #define SE_SIDM_ARYABHATA_MSUN  24
263 #define SE_SIDM_SS_REVATI       25
264 #define SE_SIDM_SS_CITRA        26
265 #define SE_SIDM_TRUE_CITRA      27
266 #define SE_SIDM_TRUE_REVATI     28
267 #define SE_SIDM_TRUE_PUSHYA     29
268 #define SE_SIDM_GALCENT_RGILBRAND 30
269 #define SE_SIDM_GALEQU_IAU1958  31
270 #define SE_SIDM_GALEQU_TRUE     32
271 #define SE_SIDM_GALEQU_MULA     33
272 #define SE_SIDM_GALALIGN_MARDYKS 34
273 #define SE_SIDM_TRUE_MULA       35
274 #define SE_SIDM_GALCENT_MULA_WILHELM       36
275 #define SE_SIDM_ARYABHATA_522   37
276 #define SE_SIDM_BABYL_BRITTON   38
277 #define SE_SIDM_TRUE_SHEORAN  	39
278 #define SE_SIDM_GALCENT_COCHRANE   	40
279 #define SE_SIDM_GALEQU_FIORENZA 41
280 #define SE_SIDM_VALENS_MOON     42
281 #define SE_SIDM_LAHIRI_1940     43
282 #define SE_SIDM_LAHIRI_VP285    44
283 #define SE_SIDM_KRISHNAMURTI_VP291    45
284 #define SE_SIDM_LAHIRI_ICRC     46
285 //#define SE_SIDM_MANJULA         43
286 #define SE_SIDM_USER            255 /* user-defined ayanamsha, t0 is TT */
287 
288 #define SE_NSIDM_PREDEF	        47
289 
290 /* used for swe_nod_aps(): */
291 #define SE_NODBIT_MEAN		1   /* mean nodes/apsides */
292 #define SE_NODBIT_OSCU		2   /* osculating nodes/apsides */
293 #define SE_NODBIT_OSCU_BAR	4   /* same, but motion about solar system barycenter is considered */
294 #define SE_NODBIT_FOPOINT	256   /* focal point of orbit instead of aphelion */
295 
296 /* default ephemeris used when no ephemeris flagbit is set */
297 #define SEFLG_DEFAULTEPH SEFLG_SWIEPH
298 
299 #define SE_MAX_STNAME		256	/* maximum size of fixstar name;
300                                          * the parameter star in swe_fixstar
301 					 * must allow twice this space for
302 				         * the returned star name.
303 					 */
304 
305 /* defines for eclipse computations */
306 
307 #define SE_ECL_CENTRAL		1
308 #define SE_ECL_NONCENTRAL	2
309 #define SE_ECL_TOTAL		4
310 #define SE_ECL_ANNULAR		8
311 #define SE_ECL_PARTIAL		16
312 #define SE_ECL_ANNULAR_TOTAL	32
313 #define SE_ECL_HYBRID   	32  // = annular-total
314 #define SE_ECL_PENUMBRAL	64
315 #define SE_ECL_ALLTYPES_SOLAR   (SE_ECL_CENTRAL|SE_ECL_NONCENTRAL|SE_ECL_TOTAL|SE_ECL_ANNULAR|SE_ECL_PARTIAL|SE_ECL_ANNULAR_TOTAL)
316 #define SE_ECL_ALLTYPES_LUNAR   (SE_ECL_TOTAL|SE_ECL_PARTIAL|SE_ECL_PENUMBRAL)
317 #define SE_ECL_VISIBLE			128
318 #define SE_ECL_MAX_VISIBLE		256
319 #define SE_ECL_1ST_VISIBLE		512	/* begin of partial eclipse */
320 #define SE_ECL_PARTBEG_VISIBLE		512	/* begin of partial eclipse */
321 #define SE_ECL_2ND_VISIBLE		1024	/* begin of total eclipse */
322 #define SE_ECL_TOTBEG_VISIBLE		1024	/* begin of total eclipse */
323 #define SE_ECL_3RD_VISIBLE		2048    /* end of total eclipse */
324 #define SE_ECL_TOTEND_VISIBLE		2048    /* end of total eclipse */
325 #define SE_ECL_4TH_VISIBLE		4096    /* end of partial eclipse */
326 #define SE_ECL_PARTEND_VISIBLE		4096    /* end of partial eclipse */
327 #define SE_ECL_PENUMBBEG_VISIBLE	8192    /* begin of penumbral eclipse */
328 #define SE_ECL_PENUMBEND_VISIBLE	16384   /* end of penumbral eclipse */
329 #define SE_ECL_OCC_BEG_DAYLIGHT		8192    /* occultation begins during the day */
330 #define SE_ECL_OCC_END_DAYLIGHT		16384   /* occultation ends during the day */
331 #define SE_ECL_ONE_TRY          (32*1024)
332 		/* check if the next conjunction of the moon with
333 		 * a planet is an occultation; don't search further */
334 
335 /* for swe_rise_transit() */
336 #define SE_CALC_RISE		1
337 #define SE_CALC_SET		2
338 #define SE_CALC_MTRANSIT	4
339 #define SE_CALC_ITRANSIT	8
340 #define SE_BIT_DISC_CENTER      256 /* to be or'ed to SE_CALC_RISE/SET,
341 				     * if rise or set of disc center is
342 				     * required */
343 #define SE_BIT_DISC_BOTTOM      8192 /* to be or'ed to SE_CALC_RISE/SET,
344                                       * if rise or set of lower limb of
345 				      * disc is requried */
346 #define SE_BIT_GEOCTR_NO_ECL_LAT 128 /* use geocentric rather than topocentric
347                                         position of object and
348 					ignore its ecliptic latitude */
349 #define SE_BIT_NO_REFRACTION    512 /* to be or'ed to SE_CALC_RISE/SET,
350 				     * if refraction is to be ignored */
351 #define SE_BIT_CIVIL_TWILIGHT    1024 /* to be or'ed to SE_CALC_RISE/SET */
352 #define SE_BIT_NAUTIC_TWILIGHT   2048 /* to be or'ed to SE_CALC_RISE/SET */
353 #define SE_BIT_ASTRO_TWILIGHT    4096 /* to be or'ed to SE_CALC_RISE/SET */
354 #define SE_BIT_FIXED_DISC_SIZE  16384 /* or'ed to SE_CALC_RISE/SET:
355                                      * neglect the effect of distance on
356 				     * disc size */
357 #define SE_BIT_FORCE_SLOW_METHOD 32768 /* This is only an Astrodienst in-house
358                                         * test flag. It forces the usage
359 					* of the old, slow calculation of
360 					* risings and settings. */
361 #define SE_BIT_HINDU_RISING  (SE_BIT_DISC_CENTER|SE_BIT_NO_REFRACTION|SE_BIT_GEOCTR_NO_ECL_LAT)
362 
363 /* for swe_azalt() and swe_azalt_rev() */
364 #define SE_ECL2HOR		0
365 #define SE_EQU2HOR		1
366 #define SE_HOR2ECL		0
367 #define SE_HOR2EQU		1
368 
369 /* for swe_refrac() */
370 #define SE_TRUE_TO_APP	0
371 #define SE_APP_TO_TRUE	1
372 
373 /*
374  * only used for experimenting with various JPL ephemeris files
375  * which are available at Astrodienst's internal network
376  */
377 #define SE_DE_NUMBER    431
378 #define SE_FNAME_DE200  "de200.eph"
379 #define SE_FNAME_DE403  "de403.eph"
380 #define SE_FNAME_DE404  "de404.eph"
381 #define SE_FNAME_DE405  "de405.eph"
382 #define SE_FNAME_DE406  "de406.eph"
383 #define SE_FNAME_DE431  "de431.eph"
384 #define SE_FNAME_DFT    SE_FNAME_DE431
385 #define SE_FNAME_DFT2   SE_FNAME_DE406
386 #define SE_STARFILE_OLD "fixstars.cat"
387 #define SE_STARFILE     "sefstars.txt"
388 #define SE_ASTNAMFILE   "seasnam.txt"
389 #define SE_FICTFILE     "seorbel.txt"
390 
391 /*
392  * ephemeris path
393  * this defines where ephemeris files are expected if the function
394  * swe_set_ephe_path() is not called by the application.
395  * Normally, every application should make this call to define its
396  * own place for the ephemeris files.
397  */
398 
399 #ifndef SE_EPHE_PATH
400 #if MSDOS
401 #  define SE_EPHE_PATH    "\\sweph\\ephe\\"
402 #else
403 # ifdef MACOS
404 #  define SE_EPHE_PATH	":ephe:"
405 # else
406 #  define SE_EPHE_PATH    ".:/users/ephe2/:/users/ephe/"
407 			/* At Astrodienst, we maintain two ephemeris areas for
408 			   the thousands of asteroid files:
409 			   the short files in /users/ephe/ast*,
410 			   the long file in /users/ephe2/ast*. */
411 # endif
412 #endif
413 #endif  /* SE_EPHE_PATH */
414 
415 /* defines for function swe_split_deg() (in swephlib.c) */
416 # define SE_SPLIT_DEG_ROUND_SEC    1
417 # define SE_SPLIT_DEG_ROUND_MIN    2
418 # define SE_SPLIT_DEG_ROUND_DEG    4
419 # define SE_SPLIT_DEG_ZODIACAL     8
420 # define SE_SPLIT_DEG_NAKSHATRA 1024
421 # define SE_SPLIT_DEG_KEEP_SIGN   16	/* don't round to next sign,
422 					 * e.g. 29.9999999 will be rounded
423 					 * to 29d59'59" (or 29d59' or 29d) */
424 # define SE_SPLIT_DEG_KEEP_DEG    32	/* don't round to next degree
425 					 * e.g. 13.9999999 will be rounded
426 					 * to 13d59'59" (or 13d59' or 13d) */
427 
428 /* for heliacal functions */
429 #define SE_HELIACAL_RISING		1
430 #define SE_HELIACAL_SETTING		2
431 #define SE_MORNING_FIRST		SE_HELIACAL_RISING
432 #define SE_EVENING_LAST			SE_HELIACAL_SETTING
433 #define SE_EVENING_FIRST		3
434 #define SE_MORNING_LAST			4
435 #define SE_ACRONYCHAL_RISING		5  /* still not implemented */
436 #define SE_ACRONYCHAL_SETTING		6  /* still not implemented */
437 #define SE_COSMICAL_SETTING		SE_ACRONYCHAL_SETTING
438 
439 #define SE_HELFLAG_LONG_SEARCH 		128
440 #define SE_HELFLAG_HIGH_PRECISION 	256
441 #define SE_HELFLAG_OPTICAL_PARAMS	512
442 #define SE_HELFLAG_NO_DETAILS		1024
443 #define SE_HELFLAG_SEARCH_1_PERIOD	(1 << 11)  /*  2048 */
444 #define SE_HELFLAG_VISLIM_DARK		(1 << 12)  /*  4096 */
445 #define SE_HELFLAG_VISLIM_NOMOON	(1 << 13)  /*  8192 */
446 /* the following undocumented defines are for test reasons only */
447 #define SE_HELFLAG_VISLIM_PHOTOPIC	(1 << 14)  /* 16384 */
448 #define SE_HELFLAG_VISLIM_SCOTOPIC	(1 << 15)  /* 32768 */
449 #define SE_HELFLAG_AV	 		(1 << 16)  /* 65536 */
450 #define SE_HELFLAG_AVKIND_VR 		(1 << 16)  /* 65536 */
451 #define SE_HELFLAG_AVKIND_PTO 		(1 << 17)
452 #define SE_HELFLAG_AVKIND_MIN7 		(1 << 18)
453 #define SE_HELFLAG_AVKIND_MIN9 		(1 << 19)
454 #define SE_HELFLAG_AVKIND (SE_HELFLAG_AVKIND_VR|SE_HELFLAG_AVKIND_PTO|SE_HELFLAG_AVKIND_MIN7|SE_HELFLAG_AVKIND_MIN9)
455 #define TJD_INVALID		 	99999999.0
456 #define SIMULATE_VICTORVB               1
457 
458 #if 0  // unused and redundant
459 #define SE_HELIACAL_LONG_SEARCH 	128
460 #define SE_HELIACAL_HIGH_PRECISION 	256
461 #define SE_HELIACAL_OPTICAL_PARAMS	512
462 #define SE_HELIACAL_NO_DETAILS		1024
463 #define SE_HELIACAL_SEARCH_1_PERIOD	(1 << 11)  /*  2048 */
464 #define SE_HELIACAL_VISLIM_DARK		(1 << 12)  /*  4096 */
465 #define SE_HELIACAL_VISLIM_NOMOON	(1 << 13)  /*  8192 */
466 #define SE_HELIACAL_VISLIM_PHOTOPIC	(1 << 14)  /* 16384 */
467 #define SE_HELIACAL_AVKIND_VR 		(1 << 15)  /* 32768 */
468 #define SE_HELIACAL_AVKIND_PTO 		(1 << 16)
469 #define SE_HELIACAL_AVKIND_MIN7 		(1 << 17)
470 #define SE_HELIACAL_AVKIND_MIN9 		(1 << 18)
471 #define SE_HELIACAL_AVKIND (SE_HELFLAG_AVKIND_VR|SE_HELFLAG_AVKIND_PTO|SE_HELFLAG_AVKIND_MIN7|SE_HELFLAG_AVKIND_MIN9)
472 #endif
473 
474 #define SE_PHOTOPIC_FLAG		0
475 #define SE_SCOTOPIC_FLAG		1
476 #define SE_MIXEDOPIC_FLAG		2
477 
478 /* for swe_set_tid_acc() and ephemeris-dependent delta t:
479  * intrinsic tidal acceleration in the mean motion of the moon,
480  * not given in the parameters list of the ephemeris files but computed
481  * by Chapront/Chapront-Touzé/Francou A&A 387 (2002), p. 705.
482  */
483 #define SE_TIDAL_DE200          (-23.8946)
484 #define SE_TIDAL_DE403          (-25.580)  /* was (-25.8) until V. 1.76.2 */
485 #define SE_TIDAL_DE404          (-25.580)  /* was (-25.8) until V. 1.76.2 */
486 #define SE_TIDAL_DE405          (-25.826)  /* was (-25.7376) until V. 1.76.2 */
487 #define SE_TIDAL_DE406          (-25.826)  /* was (-25.7376) until V. 1.76.2 */
488 #define SE_TIDAL_DE421          (-25.85)   /* JPL Interoffice Memorandum 14-mar-2008 on DE421 Lunar Orbit */
489 #define SE_TIDAL_DE422          (-25.85)   /* JPL Interoffice Memorandum 14-mar-2008 on DE421 (sic!) Lunar Orbit */
490 #define SE_TIDAL_DE430          (-25.82)   /* JPL Interoffice Memorandum 9-jul-2013 on DE430 Lunar Orbit */
491 #define SE_TIDAL_DE431          (-25.80)   /* IPN Progress Report 42-196 • February 15, 2014, p. 15; was (-25.82) in V. 2.00.00 */
492 #define SE_TIDAL_DE441          (-25.936)   /* unpublished value, from email by Jon Giorgini to DK on 11 Apr 2021 */
493 #define SE_TIDAL_26             (-26.0)
494 #define SE_TIDAL_STEPHENSON_2016             (-25.85)
495 #define SE_TIDAL_DEFAULT        SE_TIDAL_DE431
496 #define SE_TIDAL_AUTOMATIC             999999
497 #define SE_TIDAL_MOSEPH                SE_TIDAL_DE404
498 #define SE_TIDAL_SWIEPH                SE_TIDAL_DEFAULT
499 #define SE_TIDAL_JPLEPH                SE_TIDAL_DEFAULT
500 
501 /* for function swe_set_delta_t_userdef() */
502 #define SE_DELTAT_AUTOMATIC             (-1E-10)
503 
504 #define SE_MODEL_DELTAT         0
505 #define SE_MODEL_PREC_LONGTERM  1
506 #define SE_MODEL_PREC_SHORTTERM 2
507 #define SE_MODEL_NUT            3
508 #define SE_MODEL_BIAS           4
509 #define SE_MODEL_JPLHOR_MODE    5
510 #define SE_MODEL_JPLHORA_MODE   6
511 #define SE_MODEL_SIDT           7
512 #define NSE_MODELS              8
513 
514 /* precession models */
515 #define SEMOD_NPREC		11
516 #define SEMOD_PREC_IAU_1976      1
517 #define SEMOD_PREC_LASKAR_1986   2
518 #define SEMOD_PREC_WILL_EPS_LASK 3
519 #define SEMOD_PREC_WILLIAMS_1994 4
520 #define SEMOD_PREC_SIMON_1994    5
521 #define SEMOD_PREC_IAU_2000      6
522 #define SEMOD_PREC_BRETAGNON_2003      7
523 #define SEMOD_PREC_IAU_2006      8
524 #define SEMOD_PREC_VONDRAK_2011  9
525 #define SEMOD_PREC_OWEN_1990     10
526 #define SEMOD_PREC_NEWCOMB       11
527 #define SEMOD_PREC_DEFAULT       SEMOD_PREC_VONDRAK_2011
528 /* SE versions before 1.70 used IAU 1976 precession for
529  * a limited time range of 2 centuries in combination with
530  * the long-term precession Simon 1994.
531  */
532 #define SEMOD_PREC_DEFAULT_SHORT SEMOD_PREC_VONDRAK_2011
533 
534 /* nutation models */
535 #define SEMOD_NNUT		5
536 #define SEMOD_NUT_IAU_1980          1
537 #define SEMOD_NUT_IAU_CORR_1987     2 /* Herring's (1987) corrections to IAU 1980
538 				    * nutation series. AA (1996) neglects them.*/
539 #define SEMOD_NUT_IAU_2000A         3 /* very time consuming ! */
540 #define SEMOD_NUT_IAU_2000B         4 /* fast, but precision of milli-arcsec */
541 #define SEMOD_NUT_WOOLARD           5
542 #define SEMOD_NUT_DEFAULT           SEMOD_NUT_IAU_2000B  /* fast, but precision of milli-arcsec */
543 
544 /* methods for sidereal time */
545 #define SEMOD_NSIDT		4
546 #define SEMOD_SIDT_IAU_1976         1
547 #define SEMOD_SIDT_IAU_2006         2
548 #define SEMOD_SIDT_IERS_CONV_2010   3
549 #define SEMOD_SIDT_LONGTERM         4
550 #define SEMOD_SIDT_DEFAULT          SEMOD_SIDT_LONGTERM
551 //#define SEMOD_SIDT_DEFAULT          SEMOD_SIDT_IERS_CONV_2010
552 
553 /* frame bias methods */
554 #define SEMOD_NBIAS		3
555 #define SEMOD_BIAS_NONE             1  /* ignore frame bias */
556 #define SEMOD_BIAS_IAU2000          2  /* use frame bias matrix IAU 2000 */
557 #define SEMOD_BIAS_IAU2006          3  /* use frame bias matrix IAU 2006 */
558 #define SEMOD_BIAS_DEFAULT          SEMOD_BIAS_IAU2006
559 
560 /* methods of JPL Horizons (iflag & SEFLG_JPLHOR),
561  * using daily dpsi, deps;  see explanations below */
562 #define SEMOD_NJPLHOR		2
563 #define SEMOD_JPLHOR_LONG_AGREEMENT  1  /* daily dpsi and deps from file are
564                                      * limited to 1962 - today. JPL uses the
565 				     * first and last value for all  dates
566 				     * beyond this time range. */
567 #define SEMOD_JPLHOR_DEFAULT        SEMOD_JPLHOR_LONG_AGREEMENT
568 /* Note, currently this is the only option for SEMOD_JPLHOR..*/
569 /* SEMOD_JPLHOR_LONG_AGREEMENT, if combined with SEFLG_JPLHOR provides good
570  * agreement with JPL Horizons for 9998 BC (-9997) until 9999 CE.
571  * - After 20-jan-1962 until today, Horizons uses correct dpsi and deps.
572  * - For dates before that, it uses dpsi and deps of 20-jan-1962, which
573  *   provides a continuous ephemeris, but does not make sense otherwise.
574  * - Before 1.1.1799 and after 1.1.2202, the precession model Owen 1990
575  *   is used, as in Horizons.
576  * An agreement with Horizons to a couple of milli arc seconds is achieved
577  * for the whole time range of Horizons. (BC 9998-Mar-20 to AD 9999-Dec-31 TT.)
578  */
579 
580 /* methods of approximation of JPL Horizons (iflag & SEFLG_JPLHORA),
581  * without dpsi, deps; see explanations below */
582 #define SEMOD_NJPLHORA		3
583 #define SEMOD_JPLHORA_1     1
584 #define SEMOD_JPLHORA_2     2
585 #define SEMOD_JPLHORA_3     3
586 #define SEMOD_JPLHORA_DEFAULT     SEMOD_JPLHORA_3
587 /* With SEMOD_JPLHORA_1, planetary positions are always calculated
588  * using a recent precession/nutation model. Frame bias matrix is applied
589  * with some correction to RA and another correction added to epsilon.
590  * This provides a very good approximation of JPL Horizons positions.
591  *
592  * With SEMOD_JPLHORA_2, frame bias as recommended by IERS Conventions 2003
593  * and 2010 is *not* applied. Instead, dpsi_bias and deps_bias are added to
594  * nutation. This procedure is found in some older astronomical software.
595  * Equatorial apparent positions will be close to JPL Horizons
596  * (within a few mas) between 1962 and current years. Ecl. longitude
597  * will be good, latitude bad.
598  *
599  * With SEMOD_JPLHORA_3 works like SEMOD_JPLHORA_3 after 1962, but like
600  * SEFLG_JPLHOR before that. This allows EXTREMELY good agreement with JPL
601  * Horizons over its whole time range.
602  */
603 
604 #define SEMOD_NDELTAT		5
605 #define SEMOD_DELTAT_STEPHENSON_MORRISON_1984   1
606 #define SEMOD_DELTAT_STEPHENSON_1997   2
607 #define SEMOD_DELTAT_STEPHENSON_MORRISON_2004   3
608 #define SEMOD_DELTAT_ESPENAK_MEEUS_2006   4
609 #define SEMOD_DELTAT_STEPHENSON_ETC_2016   5
610 //#define SEMOD_DELTAT_DEFAULT   SEMOD_DELTAT_ESPENAK_MEEUS_2006
611 #define SEMOD_DELTAT_DEFAULT   SEMOD_DELTAT_STEPHENSON_ETC_2016
612 
613 /**************************************************************
614  * here follow some ugly definitions which are only required
615  * if SwissEphemeris is compiled on Windows, either to use a DLL
616  * or to create a DLL.
617  * Unix users can savely ignore his section
618  * and skip to the export function decarations below.
619  ************************************************************/
620 #if defined(MAKE_DLL) || defined(USE_DLL) || defined(_WINDOWS)
621 #  include <windows.h>
622 extern HANDLE dllhandle;        // set by swedllst::DllMain,
623 				// defined in sweph.c
624 				// used by GetModuleFilename in sweph.c
625 #endif
626 
627 #ifdef USE_DLL
628 #  include "swedll.h"
629 #endif
630 
631 #if defined(DOS32) || !MSDOS || defined(WIN32)
632 			/* use compiler switch to define DOS32 */
633 #  define MALLOC malloc
634 #  define CALLOC calloc
635 #  define FREE free
636 #else
637 #  ifdef __BORLANDC__
638 #    include <alloc.h>
639 #    define MALLOC farmalloc
640 #    define CALLOC farcalloc
641 #    define FREE farfree
642 #  else
643 #    define MALLOC _fmalloc
644 #    define CALLOC _fcalloc
645 #    define FREE _ffree
646 #  endif
647 #endif
648 
649 /* DLL defines
650   Define UNDECO_DLL for un-decorated dll
651   verify compiler option __cdecl for un-decorated and __stdcall for decorated */
652 /*#define UNDECO_DLL*/
653 #ifdef MAKE_DLL
654   #if defined (PASCAL) || defined(__stdcall)
655    #if defined UNDECO_DLL
656     #define CALL_CONV __cdecl
657    #else
658     #define CALL_CONV __stdcall
659    #endif
660   #else
661     #define CALL_CONV
662   #endif
663   /* To export symbols in the new DLL model of Win32, Microsoft
664      recommends the following approach */
665   #define EXP32  __declspec( dllexport )
666 #else
667   #define CALL_CONV
668   #define EXP32
669 #endif
670 
671 
672 #ifndef _SWEDLL_H
673 
674 /***********************************************************
675  * exported functions
676  ***********************************************************/
677 
678 #define ext_def(x)	extern EXP32 x CALL_CONV
679 			/* ext_def(x) evaluates to x on Unix */
680 
681 ext_def(int32) swe_heliacal_ut(double tjdstart_ut, double *geopos, double *datm, double *dobs, char *ObjectName, int32 TypeEvent, int32 iflag, double *dret, char *serr);
682 ext_def(int32) swe_heliacal_pheno_ut(double tjd_ut, double *geopos, double *datm, double *dobs, char *ObjectName, int32 TypeEvent, int32 helflag, double *darr, char *serr);
683 ext_def(int32) swe_vis_limit_mag(double tjdut, double *geopos, double *datm, double *dobs, char *ObjectName, int32 helflag, double *dret, char *serr);
684 
685 /* the following are secret, for Victor Reijs' */
686 ext_def(int32) swe_heliacal_angle(double tjdut, double *dgeo, double *datm, double *dobs, int32 helflag, double mag, double azi_obj, double azi_sun, double azi_moon, double alt_moon, double *dret, char *serr);
687 ext_def(int32) swe_topo_arcus_visionis(double tjdut, double *dgeo, double *datm, double *dobs, int32 helflag, double mag, double azi_obj, double alt_obj, double azi_sun, double azi_moon, double alt_moon, double *dret, char *serr);
688 
689 /* the following is secret, for Dieter, allows to test old models of
690  * precession, nutation, etc. Search for SE_MODEL_... in this file */
691 ext_def(void) swe_set_astro_models(char *samod, int32 iflag);
692 ext_def(void) swe_get_astro_models(char *samod, char *sdet, int32 iflag);
693 
694 /****************************
695  * exports from sweph.c
696  ****************************/
697 
698 ext_def(char *) swe_version(char *);
699 ext_def(char *) swe_get_library_path(char *);
700 
701 /* planets, moon, nodes etc. */
702 ext_def( int32 ) swe_calc(
703         double tjd, int ipl, int32 iflag,
704         double *xx,
705         char *serr);
706 
707 ext_def(int32) swe_calc_ut(double tjd_ut, int32 ipl, int32 iflag,
708 	double *xx, char *serr);
709 
710 ext_def(int32) swe_calc_pctr(double tjd, int32 ipl, int32 iplctr, int32 iflag, double *xxret, char *serr);
711 
712 /* fixed stars */
713 ext_def( int32 ) swe_fixstar(
714         char *star, double tjd, int32 iflag,
715         double *xx,
716         char *serr);
717 
718 ext_def(int32) swe_fixstar_ut(char *star, double tjd_ut, int32 iflag,
719 	double *xx, char *serr);
720 
721 ext_def(int32) swe_fixstar_mag(char *star, double *mag, char *serr);
722 
723 ext_def( int32 ) swe_fixstar2(
724         char *star, double tjd, int32 iflag,
725         double *xx,
726         char *serr);
727 
728 ext_def(int32) swe_fixstar2_ut(char *star, double tjd_ut, int32 iflag,
729 	double *xx, char *serr);
730 
731 ext_def(int32) swe_fixstar2_mag(char *star, double *mag, char *serr);
732 
733 /* close Swiss Ephemeris */
734 ext_def( void ) swe_close(void);
735 
736 /* set directory path of ephemeris files */
737 ext_def( void ) swe_set_ephe_path(char *path);
738 
739 /* set file name of JPL file */
740 ext_def( void ) swe_set_jpl_file(char *fname);
741 
742 /* get planet name */
743 ext_def( char *) swe_get_planet_name(int ipl, char *spname);
744 
745 /* set geographic position of observer */
746 ext_def (void) swe_set_topo(double geolon, double geolat, double geoalt);
747 
748 /* set sidereal mode */
749 ext_def(void) swe_set_sid_mode(int32 sid_mode, double t0, double ayan_t0);
750 
751 /* get ayanamsa */
752 ext_def(int32) swe_get_ayanamsa_ex(double tjd_et, int32 iflag, double *daya, char *serr);
753 ext_def(int32) swe_get_ayanamsa_ex_ut(double tjd_ut, int32 iflag, double *daya, char *serr);
754 ext_def(double) swe_get_ayanamsa(double tjd_et);
755 ext_def(double) swe_get_ayanamsa_ut(double tjd_ut);
756 
757 
758 ext_def(const char *) swe_get_ayanamsa_name(int32 isidmode);
759 ext_def(const char *) swe_get_current_file_data(int ifno, double *tfstart, double *tfend, int *denum);
760 
761 /*ext_def(void) swe_set_timeout(int32 tsec);*/
762 
763 /****************************
764  * exports from swedate.c
765  ****************************/
766 
767 ext_def( int ) swe_date_conversion(
768         int y , int m , int d ,         /* year, month, day */
769         double utime,   /* universal time in hours (decimal) */
770         char c,         /* calendar g[regorian]|j[ulian] */
771         double *tjd);
772 
773 ext_def( double ) swe_julday(
774         int year, int month, int day, double hour,
775         int gregflag);
776 
777 ext_def( void ) swe_revjul (
778         double jd,
779         int gregflag,
780         int *jyear, int *jmon, int *jday, double *jut);
781 
782 ext_def(int32) swe_utc_to_jd(
783         int32 iyear, int32 imonth, int32 iday,
784 	int32 ihour, int32 imin, double dsec,
785 	int32 gregflag, double *dret, char *serr);
786 
787 ext_def(void) swe_jdet_to_utc(
788         double tjd_et, int32 gregflag,
789 	int32 *iyear, int32 *imonth, int32 *iday,
790 	int32 *ihour, int32 *imin, double *dsec);
791 
792 ext_def(void) swe_jdut1_to_utc(
793         double tjd_ut, int32 gregflag,
794 	int32 *iyear, int32 *imonth, int32 *iday,
795 	int32 *ihour, int32 *imin, double *dsec);
796 
797 ext_def(void) swe_utc_time_zone(
798         int32 iyear, int32 imonth, int32 iday,
799 	int32 ihour, int32 imin, double dsec,
800 	double d_timezone,
801 	int32 *iyear_out, int32 *imonth_out, int32 *iday_out,
802 	int32 *ihour_out, int32 *imin_out, double *dsec_out);
803 
804 /****************************
805  * exports from swehouse.c
806  ****************************/
807 
808 ext_def( int ) swe_houses(
809         double tjd_ut, double geolat, double geolon, int hsys,
810 	double *cusps, double *ascmc);
811 
812 ext_def( int ) swe_houses_ex(
813         double tjd_ut, int32 iflag, double geolat, double geolon, int hsys,
814 	double *cusps, double *ascmc);
815 
816 ext_def( int ) swe_houses_ex2(
817         double tjd_ut, int32 iflag, double geolat, double geolon, int hsys,
818 	double *cusps, double *ascmc, double *cusp_speed, double *ascmc_speed, char *serr);
819 
820 ext_def( int ) swe_houses_armc(
821         double armc, double geolat, double eps, int hsys,
822 	double *cusps, double *ascmc);
823 
824 ext_def( int ) swe_houses_armc_ex2(
825         double armc, double geolat, double eps, int hsys,
826 	double *cusps, double *ascmc, double *cusp_speed, double *ascmc_speed, char *serr);
827 
828 ext_def(double) swe_house_pos(
829 	double armc, double geolat, double eps, int hsys, double *xpin, char *serr);
830 
831 ext_def(char *) swe_house_name(int hsys);
832 
833 
834 
835 /****************************
836  * exports from swecl.c
837  ****************************/
838 
839 ext_def(int32) swe_gauquelin_sector(double t_ut, int32 ipl, char *starname, int32 iflag, int32 imeth, double *geopos, double atpress, double attemp, double *dgsect, char *serr);
840 
841 /* computes geographic location and attributes of solar
842  * eclipse at a given tjd */
843 ext_def (int32) swe_sol_eclipse_where(double tjd, int32 ifl, double *geopos, double *attr, char *serr);
844 
845 ext_def (int32) swe_lun_occult_where(double tjd, int32 ipl, char *starname, int32 ifl, double *geopos, double *attr, char *serr);
846 
847 /* computes attributes of a solar eclipse for given tjd, geolon, geolat */
848 ext_def (int32) swe_sol_eclipse_how(double tjd, int32 ifl, double *geopos, double *attr, char *serr);
849 
850 /* finds time of next local eclipse */
851 ext_def (int32) swe_sol_eclipse_when_loc(double tjd_start, int32 ifl, double *geopos, double *tret, double *attr, int32 backward, char *serr);
852 
853 ext_def (int32) swe_lun_occult_when_loc(double tjd_start, int32 ipl, char *starname, int32 ifl,
854      double *geopos, double *tret, double *attr, int32 backward, char *serr);
855 
856 /* finds time of next eclipse globally */
857 ext_def (int32) swe_sol_eclipse_when_glob(double tjd_start, int32 ifl, int32 ifltype,
858      double *tret, int32 backward, char *serr);
859 
860 /* finds time of next occultation globally */
861 ext_def (int32) swe_lun_occult_when_glob(double tjd_start, int32 ipl, char *starname, int32 ifl, int32 ifltype,
862      double *tret, int32 backward, char *serr);
863 
864 /* computes attributes of a lunar eclipse for given tjd */
865 ext_def (int32) swe_lun_eclipse_how(
866           double tjd_ut,
867           int32 ifl,
868           double *geopos,
869           double *attr,
870           char *serr);
871 
872 ext_def (int32) swe_lun_eclipse_when(double tjd_start, int32 ifl, int32 ifltype,
873      double *tret, int32 backward, char *serr);
874 
875 ext_def (int32) swe_lun_eclipse_when_loc(double tjd_start, int32 ifl,
876      double *geopos, double *tret, double *attr, int32 backward, char *serr);
877 
878 /* planetary phenomena */
879 ext_def (int32) swe_pheno(double tjd, int32 ipl, int32 iflag, double *attr, char *serr);
880 
881 ext_def(int32) swe_pheno_ut(double tjd_ut, int32 ipl, int32 iflag, double *attr, char *serr);
882 
883 ext_def (double) swe_refrac(double inalt, double atpress, double attemp, int32 calc_flag);
884 
885 ext_def (double) swe_refrac_extended(double inalt, double geoalt, double atpress, double attemp, double lapse_rate, int32 calc_flag, double *dret);
886 
887 ext_def (void) swe_set_lapse_rate(double lapse_rate);
888 
889 ext_def (void) swe_azalt(
890       double tjd_ut,
891       int32 calc_flag,
892       double *geopos,
893       double atpress,
894       double attemp,
895       double *xin,
896       double *xaz);
897 
898 ext_def (void) swe_azalt_rev(
899       double tjd_ut,
900       int32 calc_flag,
901       double *geopos,
902       double *xin,
903       double *xout);
904 
905 ext_def (int32) swe_rise_trans_true_hor(
906                double tjd_ut, int32 ipl, char *starname,
907 	       int32 epheflag, int32 rsmi,
908                double *geopos,
909 	       double atpress, double attemp,
910 	       double horhgt,
911                double *tret,
912                char *serr);
913 
914 ext_def (int32) swe_rise_trans(
915                double tjd_ut, int32 ipl, char *starname,
916 	       int32 epheflag, int32 rsmi,
917                double *geopos,
918 	       double atpress, double attemp,
919                double *tret,
920                char *serr);
921 
922 ext_def (int32) swe_nod_aps(double tjd_et, int32 ipl, int32 iflag,
923                       int32  method,
924                       double *xnasc, double *xndsc,
925                       double *xperi, double *xaphe,
926                       char *serr);
927 
928 ext_def (int32) swe_nod_aps_ut(double tjd_ut, int32 ipl, int32 iflag,
929                       int32  method,
930                       double *xnasc, double *xndsc,
931                       double *xperi, double *xaphe,
932                       char *serr);
933 ext_def (int32) swe_get_orbital_elements(
934   double tjd_et, int32 ipl, int32 iflag, double *dret, char *serr);
935 
936 ext_def (int32) swe_orbit_max_min_true_distance(double tjd_et, int32 ipl, int32 iflag, double *dmax, double *dmin, double *dtrue, char *serr);
937 
938 /****************************
939  * exports from swephlib.c
940  ****************************/
941 
942 /* delta t */
943 ext_def( double ) swe_deltat(double tjd);
944 ext_def(double) swe_deltat_ex(double tjd, int32 iflag, char *serr);
945 
946 /* equation of time */
947 ext_def(int32) swe_time_equ(double tjd, double *te, char *serr);
948 ext_def(int32) swe_lmt_to_lat(double tjd_lmt, double geolon, double *tjd_lat, char *serr);
949 ext_def(int32) swe_lat_to_lmt(double tjd_lat, double geolon, double *tjd_lmt, char *serr);
950 
951 /* sidereal time */
952 ext_def( double ) swe_sidtime0(double tjd_ut, double eps, double nut);
953 ext_def( double ) swe_sidtime(double tjd_ut);
954 ext_def( void ) swe_set_interpolate_nut(AS_BOOL do_interpolate);
955 
956 /* coordinate transformation polar -> polar */
957 ext_def( void ) swe_cotrans(double *xpo, double *xpn, double eps);
958 ext_def( void ) swe_cotrans_sp(double *xpo, double *xpn, double eps);
959 
960 /* tidal acceleration to be used in swe_deltat() */
961 ext_def( double ) swe_get_tid_acc(void);
962 ext_def( void ) swe_set_tid_acc(double t_acc);
963 
964 /* set a user defined delta t to be returned by functions
965  * swe_deltat() and swe_deltat_ex() */
966 ext_def (void) swe_set_delta_t_userdef(double dt);
967 
968 ext_def( double ) swe_degnorm(double x);
969 ext_def( double ) swe_radnorm(double x);
970 ext_def( double ) swe_rad_midp(double x1, double x0);
971 ext_def( double ) swe_deg_midp(double x1, double x0);
972 
973 ext_def( void ) swe_split_deg(double ddeg, int32 roundflag, int32 *ideg, int32 *imin, int32 *isec, double *dsecfr, int32 *isgn);
974 
975 /*******************************************************
976  * other functions from swephlib.c;
977  * they are not needed for Swiss Ephemeris,
978  * but may be useful to former Placalc users.
979  ********************************************************/
980 
981 /* normalize argument into interval [0..DEG360] */
982 ext_def( centisec ) swe_csnorm(centisec p);
983 
984 /* distance in centisecs p1 - p2 normalized to [0..360[ */
985 ext_def( centisec ) swe_difcsn (centisec p1, centisec p2);
986 
987 ext_def( double ) swe_difdegn (double p1, double p2);
988 
989 /* distance in centisecs p1 - p2 normalized to [-180..180[ */
990 ext_def( centisec ) swe_difcs2n(centisec p1, centisec p2);
991 
992 ext_def( double ) swe_difdeg2n(double p1, double p2);
993 ext_def( double ) swe_difrad2n(double p1, double p2);
994 
995 /* round second, but at 29.5959 always down */
996 ext_def( centisec ) swe_csroundsec(centisec x);
997 
998 /* double to int32 with rounding, no overflow check */
999 ext_def( int32 ) swe_d2l(double x);
1000 
1001 /* monday = 0, ... sunday = 6 */
1002 ext_def( int ) swe_day_of_week(double jd);
1003 
1004 ext_def( char *) swe_cs2timestr(CSEC t, int sep, AS_BOOL suppressZero, char *a);
1005 
1006 ext_def( char *) swe_cs2lonlatstr(CSEC t, char pchar, char mchar, char *s);
1007 
1008 ext_def( char *) swe_cs2degstr(CSEC t, char *a);
1009 
1010 #endif  /* #ifndef _SWEDLL_H */
1011 
1012 #endif  /* #ifndef _SWEPHEXP_INCLUDED */
1013 
1014 #ifdef __cplusplus
1015 } /* extern C */
1016 #endif
1017