sweph4ruby 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,643 @@
1
+ /************************************************************
2
+ $Header: swephexp.h,v 1.65 2003/06/14 13:09:46 alois Exp $
3
+ SWISSEPH: exported definitions and constants
4
+
5
+ This file represents the standard application interface (API)
6
+ to the Swiss Ephemeris.
7
+
8
+ A C programmer needs only to include this file, and link his code
9
+ with the SwissEph library.
10
+
11
+ The function calls are documented in the Programmer's documentation,
12
+ which is online in HTML format.
13
+
14
+ Structure of this file:
15
+ Public API definitions
16
+ Internal developer's definitions
17
+ Public API functions.
18
+
19
+ Authors: Dieter Koch and Alois Treindl, Astrodienst Z�rich
20
+
21
+ ************************************************************/
22
+ /* Copyright (C) 1997, 1998 Astrodienst AG, Switzerland. All rights reserved.
23
+
24
+ This file is part of Swiss Ephemeris Free Edition.
25
+
26
+ Swiss Ephemeris is distributed with NO WARRANTY OF ANY KIND. No author
27
+ or distributor accepts any responsibility for the consequences of using it,
28
+ or for whether it serves any particular purpose or works at all, unless he
29
+ or she says so in writing. Refer to the Swiss Ephemeris Public License
30
+ ("SEPL" or the "License") for full details.
31
+
32
+ Every copy of Swiss Ephemeris must include a copy of the License,
33
+ normally in a plain ASCII text file named LICENSE. The License grants you
34
+ the right to copy, modify and redistribute Swiss Ephemeris, but only
35
+ under certain conditions described in the License. Among other things, the
36
+ License requires that the copyright notices and this notice be preserved on
37
+ all copies.
38
+
39
+ For uses of the Swiss Ephemeris which do not fall under the definitions
40
+ laid down in the Public License, the Swiss Ephemeris Professional Edition
41
+ must be purchased by the developer before he/she distributes any of his
42
+ software or makes available any product or service built upon the use of
43
+ the Swiss Ephemeris.
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
+
62
+ #ifndef _SWEPHEXP_INCLUDED /* allow multiple #includes of swephexp.h */
63
+ #define _SWEPHEXP_INCLUDED
64
+
65
+ #include "sweodef.h"
66
+
67
+ /***********************************************************
68
+ * definitions for use also by non-C programmers
69
+ ***********************************************************/
70
+
71
+ /* values for gregflag in swe_julday() and swe_revjul() */
72
+ # define SE_JUL_CAL 0
73
+ # define SE_GREG_CAL 1
74
+
75
+ /*
76
+ * planet numbers for the ipl parameter in swe_calc()
77
+ */
78
+ #define SE_ECL_NUT -1
79
+
80
+ #define SE_SUN 0
81
+ #define SE_MOON 1
82
+ #define SE_MERCURY 2
83
+ #define SE_VENUS 3
84
+ #define SE_MARS 4
85
+ #define SE_JUPITER 5
86
+ #define SE_SATURN 6
87
+ #define SE_URANUS 7
88
+ #define SE_NEPTUNE 8
89
+ #define SE_PLUTO 9
90
+ #define SE_MEAN_NODE 10
91
+ #define SE_TRUE_NODE 11
92
+ #define SE_MEAN_APOG 12
93
+ #define SE_OSCU_APOG 13
94
+ #define SE_EARTH 14
95
+ #define SE_CHIRON 15
96
+ #define SE_PHOLUS 16
97
+ #define SE_CERES 17
98
+ #define SE_PALLAS 18
99
+ #define SE_JUNO 19
100
+ #define SE_VESTA 20
101
+
102
+ #define SE_NPLANETS 21
103
+
104
+ #define SE_AST_OFFSET 10000
105
+ #define SE_VARUNA (SE_AST_OFFSET + 20000)
106
+
107
+ #define SE_FICT_OFFSET 40
108
+ #define SE_FICT_OFFSET_1 39
109
+ #define SE_FICT_MAX 999
110
+ #define SE_NFICT_ELEM 15
111
+
112
+ #define SE_COMET_OFFSET 1000
113
+
114
+ #define SE_NALL_NAT_POINTS (SE_NPLANETS + SE_NFICT_ELEM)
115
+
116
+ /* Hamburger or Uranian "planets" */
117
+ #define SE_CUPIDO 40
118
+ #define SE_HADES 41
119
+ #define SE_ZEUS 42
120
+ #define SE_KRONOS 43
121
+ #define SE_APOLLON 44
122
+ #define SE_ADMETOS 45
123
+ #define SE_VULKANUS 46
124
+ #define SE_POSEIDON 47
125
+ /* other fictitious bodies */
126
+ #define SE_ISIS 48
127
+ #define SE_NIBIRU 49
128
+ #define SE_HARRINGTON 50
129
+ #define SE_NEPTUNE_LEVERRIER 51
130
+ #define SE_NEPTUNE_ADAMS 52
131
+ #define SE_PLUTO_LOWELL 53
132
+ #define SE_PLUTO_PICKERING 54
133
+ #define SE_VULCAN 55
134
+ #define SE_WHITE_MOON 56
135
+ #define SE_PROSERPINA 57
136
+ #define SE_WALDEMATH 58
137
+
138
+ #define SE_FIXSTAR -10
139
+
140
+ #define SE_ASC 0
141
+ #define SE_MC 1
142
+ #define SE_ARMC 2
143
+ #define SE_VERTEX 3
144
+ #define SE_EQUASC 4 /* "equatorial ascendant" */
145
+ #define SE_COASC1 5 /* "co-ascendant" (W. Koch) */
146
+ #define SE_COASC2 6 /* "co-ascendant" (M. Munkasey) */
147
+ #define SE_POLASC 7 /* "polar ascendant" (M. Munkasey) */
148
+ #define SE_NASCMC 8
149
+
150
+ /*
151
+ * flag bits for parameter iflag in function swe_calc()
152
+ * The flag bits are defined in such a way that iflag = 0 delivers what one
153
+ * usually wants:
154
+ * - the default ephemeris (SWISS EPHEMERIS) is used,
155
+ * - apparent geocentric positions referring to the true equinox of date
156
+ * are returned.
157
+ * If not only coordinates, but also speed values are required, use
158
+ * flag = SEFLG_SPEED.
159
+ *
160
+ * The 'L' behind the number indicates that 32-bit integers (Long) are used.
161
+ */
162
+ #define SEFLG_JPLEPH 1 /* use JPL ephemeris */
163
+ #define SEFLG_SWIEPH 2 /* use SWISSEPH ephemeris */
164
+ #define SEFLG_MOSEPH 4 /* use Moshier ephemeris */
165
+
166
+ #define SEFLG_HELCTR 8 /* return heliocentric position */
167
+ #define SEFLG_TRUEPOS 16 /* return true positions, not apparent */
168
+ #define SEFLG_J2000 32 /* no precession, i.e. give J2000 equinox */
169
+ #define SEFLG_NONUT 64 /* no nutation, i.e. mean equinox of date */
170
+ #define SEFLG_SPEED3 128 /* speed from 3 positions (do not use it,
171
+ SEFLG_SPEED is faster and more precise.) */
172
+ #define SEFLG_SPEED 256 /* high precision speed */
173
+ #define SEFLG_NOGDEFL 512 /* turn off gravitational deflection */
174
+ #define SEFLG_NOABERR 1024 /* turn off 'annual' aberration of light */
175
+ #define SEFLG_EQUATORIAL (2*1024) /* equatorial positions are wanted */
176
+ #define SEFLG_XYZ (4*1024) /* cartesian, not polar, coordinates */
177
+ #define SEFLG_RADIANS (8*1024) /* coordinates in radians, not degrees */
178
+ #define SEFLG_BARYCTR (16*1024) /* barycentric positions */
179
+ #define SEFLG_TOPOCTR (32*1024) /* topocentric positions */
180
+ #define SEFLG_SIDEREAL (64*1024) /* sidereal positions */
181
+
182
+ #define SE_SIDBITS 256
183
+ /* for projection onto ecliptic of t0 */
184
+ #define SE_SIDBIT_ECL_T0 256
185
+ /* for projection onto solar system plane */
186
+ #define SE_SIDBIT_SSY_PLANE 512
187
+
188
+ /* sidereal modes (ayanamsas) */
189
+ #define SE_SIDM_FAGAN_BRADLEY 0
190
+ #define SE_SIDM_LAHIRI 1
191
+ #define SE_SIDM_DELUCE 2
192
+ #define SE_SIDM_RAMAN 3
193
+ #define SE_SIDM_USHASHASHI 4
194
+ #define SE_SIDM_KRISHNAMURTI 5
195
+ #define SE_SIDM_DJWHAL_KHUL 6
196
+ #define SE_SIDM_YUKTESHWAR 7
197
+ #define SE_SIDM_JN_BHASIN 8
198
+ #define SE_SIDM_BABYL_KUGLER1 9
199
+ #define SE_SIDM_BABYL_KUGLER2 10
200
+ #define SE_SIDM_BABYL_KUGLER3 11
201
+ #define SE_SIDM_BABYL_HUBER 12
202
+ #define SE_SIDM_BABYL_ETPSC 13
203
+ #define SE_SIDM_ALDEBARAN_15TAU 14
204
+ #define SE_SIDM_HIPPARCHOS 15
205
+ #define SE_SIDM_SASSANIAN 16
206
+ #define SE_SIDM_GALCENT_0SAG 17
207
+ #define SE_SIDM_J2000 18
208
+ #define SE_SIDM_J1900 19
209
+ #define SE_SIDM_B1950 20
210
+ #define SE_SIDM_USER 255
211
+
212
+ #define SE_NSIDM_PREDEF 21
213
+
214
+ /* used for swe_nod_aps(): */
215
+ #define SE_NODBIT_MEAN 1 /* mean nodes/apsides */
216
+ #define SE_NODBIT_OSCU 2 /* osculating nodes/apsides */
217
+ #define SE_NODBIT_OSCU_BAR 4 /* same, but motion about solar system barycenter is considered */
218
+ #define SE_NODBIT_FOPOINT 256 /* focal point of orbit instead of aphelion */
219
+
220
+ /* default ephemeris used when no ephemeris flagbit is set */
221
+ #define SEFLG_DEFAULTEPH SEFLG_SWIEPH
222
+
223
+ #define SE_MAX_STNAME 20 /* maximum size of fixstar name;
224
+ * the parameter star in swe_fixstar
225
+ * must allow twice this space for
226
+ * the returned star name.
227
+ */
228
+
229
+ /* defines for eclipse computations */
230
+
231
+ #define SE_ECL_CENTRAL 1
232
+ #define SE_ECL_NONCENTRAL 2
233
+ #define SE_ECL_TOTAL 4
234
+ #define SE_ECL_ANNULAR 8
235
+ #define SE_ECL_PARTIAL 16
236
+ #define SE_ECL_ANNULAR_TOTAL 32
237
+ #define SE_ECL_PENUMBRAL 64
238
+ #define SE_ECL_VISIBLE 128
239
+ #define SE_ECL_MAX_VISIBLE 256
240
+ #define SE_ECL_1ST_VISIBLE 512
241
+ #define SE_ECL_2ND_VISIBLE 1024
242
+ #define SE_ECL_3RD_VISIBLE 2048
243
+ #define SE_ECL_4TH_VISIBLE 4096
244
+ #define SE_ECL_ONE_TRY (32*1024)
245
+ /* check if the next conjunction of the moon with
246
+ * a planet is an occultation; don't search further */
247
+
248
+ /* for swe_rise_transit() */
249
+ #define SE_CALC_RISE 1
250
+ #define SE_CALC_SET 2
251
+ #define SE_CALC_MTRANSIT 4
252
+ #define SE_CALC_ITRANSIT 8
253
+ #define SE_BIT_DISC_CENTER 256 /* to be or'ed to SE_CALC_RISE/SET */
254
+ /* if rise or set of disc center is */
255
+ /* requried */
256
+ #define SE_BIT_NO_REFRACTION 512 /* to be or'ed to SE_CALC_RISE/SET, */
257
+ /* if refraction is not to be considered */
258
+
259
+ /* for swe_azalt() and swe_azalt_rev() */
260
+ #define SE_ECL2HOR 0
261
+ #define SE_EQU2HOR 1
262
+ #define SE_HOR2ECL 0
263
+ #define SE_HOR2EQU 1
264
+
265
+ /* for swe_refrac() */
266
+ #define SE_TRUE_TO_APP 0
267
+ #define SE_APP_TO_TRUE 1
268
+
269
+ /*
270
+ * only used for experimenting with various JPL ephemeris files
271
+ * which are available at Astrodienst's internal network
272
+ */
273
+ #define SE_DE_NUMBER 406
274
+ #define SE_FNAME_DE200 "de200.eph"
275
+ #define SE_FNAME_DE403 "de403.eph"
276
+ #define SE_FNAME_DE404 "de404.eph"
277
+ #define SE_FNAME_DE405 "de405.eph"
278
+ #define SE_FNAME_DE406 "de406.eph"
279
+ #define SE_FNAME_DFT SE_FNAME_DE406
280
+ #define SE_STARFILE "fixstars.cat"
281
+ #define SE_ASTNAMFILE "seasnam.txt"
282
+ #define SE_FICTFILE "seorbel.txt"
283
+
284
+ /*
285
+ * ephemeris path
286
+ * this defines where ephemeris files are expected if the function
287
+ * swe_set_ephe_path() is not called by the application.
288
+ * Normally, every application should make this call to define its
289
+ * own place for the ephemeris files.
290
+ */
291
+
292
+ #if MSDOS
293
+ #ifdef PAIR_SWEPH
294
+ # define SE_EPHE_PATH "\\pair\\ephe\\"
295
+ #else
296
+ # define SE_EPHE_PATH "\\sweph\\ephe\\"
297
+ #endif
298
+ #else
299
+ # ifdef MACOS
300
+ # define SE_EPHE_PATH ":ephe:"
301
+ # else
302
+ # define SE_EPHE_PATH ".:/users/ephe2/:/users/ephe/"
303
+ /* At Astrodienst, we maintain two ephemeris areas for
304
+ the thousands of asteroid files:
305
+ the short files in /users/ephe/ast*,
306
+ the long file in /users/ephe2/ast*. */
307
+ # endif
308
+ #endif
309
+
310
+ /* defines for function swe_split_deg() (in swephlib.c) */
311
+ # define SE_SPLIT_DEG_ROUND_SEC 1
312
+ # define SE_SPLIT_DEG_ROUND_MIN 2
313
+ # define SE_SPLIT_DEG_ROUND_DEG 4
314
+ # define SE_SPLIT_DEG_ZODIACAL 8
315
+ # define SE_SPLIT_DEG_KEEP_SIGN 16 /* don't round to next sign,
316
+ * e.g. 29.9999999 will be rounded
317
+ * to 29�59'59" (or 29�59' or 29�) */
318
+ # define SE_SPLIT_DEG_KEEP_DEG 32 /* don't round to next degree
319
+ * e.g. 13.9999999 will be rounded
320
+ * to 13�59'59" (or 13�59' or 13�) */
321
+
322
+ /*
323
+ * by compiling with -DPAIR_SWEPH in he compiler options it
324
+ * is possible to create a more compact version of SwissEph which
325
+ * contains no code for the JPL ephemeris file and for the builtin
326
+ * Moshier ephemeris.
327
+ * This is quite useful for MSDOS real mode applications which need to
328
+ * run within 640 kb.
329
+ * The option is called PAIR_SWEPH because it was introduced for
330
+ * Astrodienst's partner software PAIR.
331
+ */
332
+ #ifdef PAIR_SWEPH
333
+ # define NO_JPL
334
+ # define NO_MOSHIER
335
+ #endif
336
+
337
+ /**************************************************************
338
+ * here follow some ugly definitions which are only required
339
+ * if SwissEphemeris is compiled on Windows, either to use a DLL
340
+ * or to create a DLL.
341
+ * Unix users can savely ignore his section
342
+ * and skip to the export function decarations below.
343
+ ************************************************************/
344
+ #if defined(MAKE_DLL) || defined(USE_DLL) || defined(_WINDOWS)
345
+ # include <windows.h>
346
+ #endif
347
+
348
+ #ifdef USE_DLL
349
+ # include "swedll.h"
350
+ #endif
351
+
352
+ #if defined(DOS32) || !MSDOS || defined(WIN32)
353
+ /* use compiler switch to define DOS32 */
354
+ # ifndef FAR
355
+ # define FAR
356
+ # endif
357
+ # define MALLOC malloc
358
+ # define CALLOC calloc
359
+ # define FREE free
360
+ #else
361
+ # ifndef FAR
362
+ # define FAR far
363
+ # endif
364
+ # ifdef __BORLANDC__
365
+ # include <alloc.h>
366
+ # define MALLOC farmalloc
367
+ # define CALLOC farcalloc
368
+ # define FREE farfree
369
+ # else
370
+ # define MALLOC _fmalloc
371
+ # define CALLOC _fcalloc
372
+ # define FREE _ffree
373
+ # endif
374
+ #endif
375
+
376
+ /* DLL defines */
377
+ #ifdef MAKE_DLL
378
+ #if defined (PASCAL)
379
+ #define PASCAL_CONV PASCAL
380
+ #else
381
+ #define PASCAL_CONV
382
+ #endif
383
+ #ifdef MAKE_DLL16 /* 16bit DLL */
384
+ /* We compiled the 16bit DLL for Windows 3.x using Borland C/C++ Ver:3.x
385
+ and the -WD or -WDE compiler switch. */
386
+ #define EXP16 __export
387
+ #define EXP32
388
+ #else /* 32bit DLL */
389
+ /* To export symbols in the new DLL model of Win32, Microsoft
390
+ recommends the following approach */
391
+ #define EXP16
392
+ #define EXP32 __declspec( dllexport )
393
+ #endif
394
+ #else
395
+ #define PASCAL_CONV
396
+ #define EXP16
397
+ #define EXP32
398
+ #endif
399
+
400
+ #ifndef _SWEDLL_H
401
+
402
+ /***********************************************************
403
+ * exported functions
404
+ ***********************************************************/
405
+
406
+ #define ext_def(x) extern EXP32 x FAR PASCAL_CONV EXP16
407
+ /* ext_def(x) evaluates to x on Unix */
408
+
409
+ /****************************
410
+ * exports from sweph.c
411
+ ****************************/
412
+
413
+ /* planets, moon, nodes etc. */
414
+ ext_def( int32 ) swe_calc(
415
+ double tjd, int ipl, int32 iflag,
416
+ double *xx,
417
+ char *serr);
418
+
419
+ ext_def(int32) swe_calc_ut(double tjd_ut, int32 ipl, int32 iflag,
420
+ double *xx, char *serr);
421
+
422
+ /* fixed stars */
423
+ ext_def( int32 ) swe_fixstar(
424
+ char *star, double tjd, int32 iflag,
425
+ double *xx,
426
+ char *serr);
427
+
428
+ ext_def(int32) swe_fixstar_ut(char *star, double tjd_ut, int32 iflag,
429
+ double *xx, char *serr);
430
+
431
+ /* close Swiss Ephemeris */
432
+ ext_def( void ) swe_close(void);
433
+
434
+ /* set directory path of ephemeris files */
435
+ ext_def( void ) swe_set_ephe_path(char *path);
436
+
437
+ /* set file name of JPL file */
438
+ ext_def( void ) swe_set_jpl_file(char *fname);
439
+
440
+ /* get planet name */
441
+ ext_def( char *) swe_get_planet_name(int ipl, char *spname);
442
+
443
+ /* set geographic position of observer */
444
+ ext_def (void) swe_set_topo(double geolon, double geolat, double geoalt);
445
+
446
+ /* set sidereal mode */
447
+ ext_def(void) swe_set_sid_mode(int32 sid_mode, double t0, double ayan_t0);
448
+
449
+ /* get ayanamsa */
450
+ ext_def(double) swe_get_ayanamsa(double tjd_et);
451
+
452
+ ext_def(double) swe_get_ayanamsa_ut(double tjd_ut);
453
+
454
+ ext_def( char *) swe_get_ayanamsa_name(int32 isidmode);
455
+
456
+ /****************************
457
+ * exports from swedate.c
458
+ ****************************/
459
+
460
+ ext_def( int ) swe_date_conversion(
461
+ int y , int m , int d , /* year, month, day */
462
+ double utime, /* universal time in hours (decimal) */
463
+ char c, /* calendar g[regorian]|j[ulian] */
464
+ double *tjd);
465
+
466
+ ext_def( double ) swe_julday(
467
+ int year, int month, int day, double hour,
468
+ int gregflag);
469
+
470
+ ext_def( void ) swe_revjul (
471
+ double jd,
472
+ int gregflag,
473
+ int *jyear, int *jmon, int *jday, double *jut);
474
+
475
+ /****************************
476
+ * exports from swehouse.c
477
+ ****************************/
478
+
479
+ ext_def( int ) swe_houses(
480
+ double tjd_ut, double geolat, double geolon, int hsys,
481
+ double *cusps, double *ascmc);
482
+
483
+ ext_def( int ) swe_houses_ex(
484
+ double tjd_ut, int32 iflag, double geolat, double geolon, int hsys,
485
+ double *cusps, double *ascmc);
486
+
487
+ ext_def( int ) swe_houses_armc(
488
+ double armc, double geolat, double eps, int hsys,
489
+ double *cusps, double *ascmc);
490
+
491
+ ext_def(double) swe_house_pos(
492
+ double armc, double geolat, double eps, int hsys, double *xpin, char *serr);
493
+
494
+ /****************************
495
+ * exports from swecl.c
496
+ ****************************/
497
+
498
+ 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);
499
+
500
+ /* computes geographic location and attributes of solar
501
+ * eclipse at a given tjd */
502
+ ext_def (int32) swe_sol_eclipse_where(double tjd, int32 ifl, double *geopos, double *attr, char *serr);
503
+
504
+ ext_def (int32) swe_lun_occult_where(double tjd, int32 ipl, char *starname, int32 ifl, double *geopos, double *attr, char *serr);
505
+
506
+ /* computes attributes of a solar eclipse for given tjd, geolon, geolat */
507
+ ext_def (int32) swe_sol_eclipse_how(double tjd, int32 ifl, double *geopos, double *attr, char *serr);
508
+
509
+ /* finds time of next local eclipse */
510
+ ext_def (int32) swe_sol_eclipse_when_loc(double tjd_start, int32 ifl, double *geopos, double *tret, double *attr, int32 backward, char *serr);
511
+
512
+ ext_def (int32) swe_lun_occult_when_loc(double tjd_start, int32 ipl, char *starname, int32 ifl,
513
+ double *geopos, double *tret, double *attr, int32 backward, char *serr);
514
+
515
+ /* finds time of next eclipse globally */
516
+ ext_def (int32) swe_sol_eclipse_when_glob(double tjd_start, int32 ifl, int32 ifltype,
517
+ double *tret, int32 backward, char *serr);
518
+
519
+ /* finds time of next occultation globally */
520
+ ext_def (int32) swe_lun_occult_when_glob(double tjd_start, int32 ipl, char *starname, int32 ifl, int32 ifltype,
521
+ double *tret, int32 backward, char *serr);
522
+
523
+ /* computes attributes of a lunar eclipse for given tjd */
524
+ ext_def (int32) swe_lun_eclipse_how(
525
+ double tjd_ut,
526
+ int32 ifl,
527
+ double *geopos,
528
+ double *attr,
529
+ char *serr);
530
+
531
+ ext_def (int32) swe_lun_eclipse_when(double tjd_start, int32 ifl, int32 ifltype,
532
+ double *tret, int32 backward, char *serr);
533
+
534
+ /* planetary phenomena */
535
+ ext_def (int32) swe_pheno(double tjd, int32 ipl, int32 iflag, double *attr, char *serr);
536
+
537
+ ext_def(int32) swe_pheno_ut(double tjd_ut, int32 ipl, int32 iflag, double *attr, char *serr);
538
+
539
+ ext_def (double) swe_refrac(double inalt, double atpress, double attemp, int32 calc_flag);
540
+
541
+ ext_def (void) swe_azalt(
542
+ double tjd_ut,
543
+ int32 calc_flag,
544
+ double *geopos,
545
+ double atpress,
546
+ double attemp,
547
+ double *xin,
548
+ double *xaz);
549
+
550
+ ext_def (void) swe_azalt_rev(
551
+ double tjd_ut,
552
+ int32 calc_flag,
553
+ double *geopos,
554
+ double *xin,
555
+ double *xout);
556
+
557
+ ext_def (int32) swe_rise_trans(
558
+ double tjd_ut, int32 ipl, char *starname,
559
+ int32 epheflag, int32 rsmi,
560
+ double *geopos,
561
+ double atpress, double attemp,
562
+ double *tret,
563
+ char *serr);
564
+
565
+ ext_def (int32) swe_nod_aps(double tjd_et, int32 ipl, int32 iflag,
566
+ int32 method,
567
+ double *xnasc, double *xndsc,
568
+ double *xperi, double *xaphe,
569
+ char *serr);
570
+
571
+ ext_def (int32) swe_nod_aps_ut(double tjd_ut, int32 ipl, int32 iflag,
572
+ int32 method,
573
+ double *xnasc, double *xndsc,
574
+ double *xperi, double *xaphe,
575
+ char *serr);
576
+
577
+ /****************************
578
+ * exports from swephlib.c
579
+ ****************************/
580
+
581
+ /* delta t */
582
+ ext_def( double ) swe_deltat(double tjd);
583
+
584
+ /* equation of time */
585
+ ext_def( int ) swe_time_equ(double tjd, double *te, char *serr);
586
+
587
+ /* sidereal time */
588
+ ext_def( double ) swe_sidtime0(double tjd_ut, double eps, double nut);
589
+ ext_def( double ) swe_sidtime(double tjd_ut);
590
+
591
+ /* coordinate transformation polar -> polar */
592
+ ext_def( void ) swe_cotrans(double *xpo, double *xpn, double eps);
593
+ ext_def( void ) swe_cotrans_sp(double *xpo, double *xpn, double eps);
594
+
595
+ /* tidal acceleration to be used in swe_deltat() */
596
+ ext_def( double ) swe_get_tid_acc(void);
597
+ ext_def( void ) swe_set_tid_acc(double t_acc);
598
+
599
+ ext_def( double ) swe_degnorm(double x);
600
+ ext_def( double ) swe_radnorm(double x);
601
+ ext_def( double ) swe_rad_midp(double x1, double x0);
602
+ ext_def( double ) swe_deg_midp(double x1, double x0);
603
+
604
+ ext_def( void ) swe_split_deg(double ddeg, int32 roundflag, int32 *ideg, int32 *imin, int32 *isec, double *dsecfr, int32 *isgn);
605
+
606
+ /*******************************************************
607
+ * other functions from swephlib.c;
608
+ * they are not needed for Swiss Ephemeris,
609
+ * but may be useful to former Placalc users.
610
+ ********************************************************/
611
+
612
+ /* normalize argument into interval [0..DEG360] */
613
+ ext_def( centisec ) swe_csnorm(centisec p);
614
+
615
+ /* distance in centisecs p1 - p2 normalized to [0..360[ */
616
+ ext_def( centisec ) swe_difcsn (centisec p1, centisec p2);
617
+
618
+ ext_def( double ) swe_difdegn (double p1, double p2);
619
+
620
+ /* distance in centisecs p1 - p2 normalized to [-180..180[ */
621
+ ext_def( centisec ) swe_difcs2n(centisec p1, centisec p2);
622
+
623
+ ext_def( double ) swe_difdeg2n(double p1, double p2);
624
+ ext_def( double ) swe_difrad2n(double p1, double p2);
625
+
626
+ /* round second, but at 29.5959 always down */
627
+ ext_def( centisec ) swe_csroundsec(centisec x);
628
+
629
+ /* double to int32 with rounding, no overflow check */
630
+ ext_def( int32 ) swe_d2l(double x);
631
+
632
+ /* monday = 0, ... sunday = 6 */
633
+ ext_def( int ) swe_day_of_week(double jd);
634
+
635
+ ext_def( char *) swe_cs2timestr(CSEC t, int sep, AS_BOOL suppressZero, char *a);
636
+
637
+ ext_def( char *) swe_cs2lonlatstr(CSEC t, char pchar, char mchar, char *s);
638
+
639
+ ext_def( char *) swe_cs2degstr(CSEC t, char *a);
640
+
641
+ #endif /* #ifndef _SWEDLL_H */
642
+
643
+ #endif /* #ifndef _SWEPHEXP_INCLUDED */