swe4r 0.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/ext/swe4r/extconf.rb +3 -0
- data/ext/swe4r/src/swemptab.c +10642 -0
- data/ext/swe4r/swe4r.c +129 -0
- data/ext/swe4r/swecl.c +4948 -0
- data/ext/swe4r/swedate.c +590 -0
- data/ext/swe4r/swedate.h +82 -0
- data/ext/swe4r/swehel.c +3445 -0
- data/ext/swe4r/swehouse.c +1727 -0
- data/ext/swe4r/swehouse.h +85 -0
- data/ext/swe4r/swejpl.c +937 -0
- data/ext/swe4r/swejpl.h +105 -0
- data/ext/swe4r/swemmoon.c +1824 -0
- data/ext/swe4r/swemplan.c +959 -0
- data/ext/swe4r/swenut2000a.h +2820 -0
- data/ext/swe4r/sweodef.h +325 -0
- data/ext/swe4r/sweph.c +6241 -0
- data/ext/swe4r/sweph.h +556 -0
- data/ext/swe4r/swephexp.h +749 -0
- data/ext/swe4r/swephlib.c +2581 -0
- data/ext/swe4r/swephlib.h +177 -0
- data/lib/swe4r.rb +2 -0
- metadata +66 -0
@@ -0,0 +1,177 @@
|
|
1
|
+
|
2
|
+
/************************************************************
|
3
|
+
$Header: /home/dieter/sweph/RCS/swephlib.h,v 1.74 2008/06/16 10:07:20 dieter Exp $
|
4
|
+
|
5
|
+
Authors: Dieter Koch and Alois Treindl, Astrodienst Zurich
|
6
|
+
|
7
|
+
************************************************************/
|
8
|
+
/* Copyright (C) 1997 - 2008 Astrodienst AG, Switzerland. All rights reserved.
|
9
|
+
|
10
|
+
License conditions
|
11
|
+
------------------
|
12
|
+
|
13
|
+
This file is part of Swiss Ephemeris.
|
14
|
+
|
15
|
+
Swiss Ephemeris is distributed with NO WARRANTY OF ANY KIND. No author
|
16
|
+
or distributor accepts any responsibility for the consequences of using it,
|
17
|
+
or for whether it serves any particular purpose or works at all, unless he
|
18
|
+
or she says so in writing.
|
19
|
+
|
20
|
+
Swiss Ephemeris is made available by its authors under a dual licensing
|
21
|
+
system. The software developer, who uses any part of Swiss Ephemeris
|
22
|
+
in his or her software, must choose between one of the two license models,
|
23
|
+
which are
|
24
|
+
a) GNU public license version 2 or later
|
25
|
+
b) Swiss Ephemeris Professional License
|
26
|
+
|
27
|
+
The choice must be made before the software developer distributes software
|
28
|
+
containing parts of Swiss Ephemeris to others, and before any public
|
29
|
+
service using the developed software is activated.
|
30
|
+
|
31
|
+
If the developer choses the GNU GPL software license, he or she must fulfill
|
32
|
+
the conditions of that license, which includes the obligation to place his
|
33
|
+
or her whole software project under the GNU GPL or a compatible license.
|
34
|
+
See http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
35
|
+
|
36
|
+
If the developer choses the Swiss Ephemeris Professional license,
|
37
|
+
he must follow the instructions as found in http://www.astro.com/swisseph/
|
38
|
+
and purchase the Swiss Ephemeris Professional Edition from Astrodienst
|
39
|
+
and sign the corresponding license contract.
|
40
|
+
|
41
|
+
The License grants you the right to use, copy, modify and redistribute
|
42
|
+
Swiss Ephemeris, but only under certain conditions described in the License.
|
43
|
+
Among other things, the License requires that the copyright notices and
|
44
|
+
this notice be preserved on all copies.
|
45
|
+
|
46
|
+
Authors of the Swiss Ephemeris: Dieter Koch and Alois Treindl
|
47
|
+
|
48
|
+
The authors of Swiss Ephemeris have no control or influence over any of
|
49
|
+
the derived works, i.e. over software or services created by other
|
50
|
+
programmers which use Swiss Ephemeris functions.
|
51
|
+
|
52
|
+
The names of the authors or of the copyright holder (Astrodienst) must not
|
53
|
+
be used for promoting any software, product or service which uses or contains
|
54
|
+
the Swiss Ephemeris. This copyright notice is the ONLY place where the
|
55
|
+
names of the authors can legally appear, except in cases where they have
|
56
|
+
given special permission in writing.
|
57
|
+
|
58
|
+
The trademarks 'Swiss Ephemeris' and 'Swiss Ephemeris inside' may be used
|
59
|
+
for promoting such software, products or services.
|
60
|
+
*/
|
61
|
+
|
62
|
+
|
63
|
+
/* Set TRUE, to include Herring's (1987) corrections to IAU 1980
|
64
|
+
* nutation series. AA (1996) neglects them. */
|
65
|
+
#define NUT_CORR_1987 FALSE
|
66
|
+
|
67
|
+
/* Precession coefficients for remote past and future.
|
68
|
+
* One of the following four defines must be true.
|
69
|
+
*/
|
70
|
+
#define PREC_WILLIAMS_1994 TRUE /* used by Moshier for DE404 */
|
71
|
+
#define PREC_SIMON_1994 FALSE
|
72
|
+
#define PREC_LASKAR_1986 FALSE
|
73
|
+
#define PREC_BRETAGNON_2003 FALSE
|
74
|
+
/* IAU precession 1976 or 2003 for recent centuries.
|
75
|
+
* only one of the following two defines may be TRUE */
|
76
|
+
#define PREC_IAU_1976 FALSE
|
77
|
+
#define PREC_IAU_2003 TRUE /* precession model P03 */
|
78
|
+
#define PREC_IAU_1976_CTIES 2.0 /* J2000 +/- two centuries */
|
79
|
+
/* we use P03 for whole ephemeris */
|
80
|
+
#define PREC_IAU_2003_CTIES 75.0 /* J2000 +/- 75 centuries */
|
81
|
+
|
82
|
+
/* choose between the following nutation models */
|
83
|
+
#define NUT_IAU_1980 FALSE
|
84
|
+
#define NUT_IAU_2000A FALSE /* very time consuming ! */
|
85
|
+
#define NUT_IAU_2000B TRUE /* fast, but precision of milli-arcsec */
|
86
|
+
|
87
|
+
/* coordinate transformation */
|
88
|
+
extern void swi_coortrf(double *xpo, double *xpn, double eps);
|
89
|
+
|
90
|
+
/* coordinate transformation */
|
91
|
+
extern void swi_coortrf2(double *xpo, double *xpn, double sineps, double coseps);
|
92
|
+
|
93
|
+
/* cartesian to polar coordinates */
|
94
|
+
extern void swi_cartpol(double *x, double *l);
|
95
|
+
|
96
|
+
/* cartesian to polar coordinates with velocity */
|
97
|
+
extern void swi_cartpol_sp(double *x, double *l);
|
98
|
+
extern void swi_polcart_sp(double *l, double *x);
|
99
|
+
|
100
|
+
/* polar to cartesian coordinates */
|
101
|
+
extern void swi_polcart(double *l, double *x);
|
102
|
+
|
103
|
+
/* GCRS to J2000 */
|
104
|
+
extern void swi_bias(double *x, int32 iflag, AS_BOOL backward);
|
105
|
+
/* GCRS to FK5 */
|
106
|
+
extern void swi_icrs2fk5(double *x, int32 iflag, AS_BOOL backward);
|
107
|
+
|
108
|
+
/* precession */
|
109
|
+
extern int swi_precess(double *R, double J, int direction );
|
110
|
+
extern void swi_precess_speed(double *xx, double t, int direction);
|
111
|
+
|
112
|
+
/* from sweph.c, light deflection, aberration, etc. */
|
113
|
+
extern void swi_deflect_light(double *xx, double dt, int32 iflag);
|
114
|
+
extern void swi_aberr_light(double *xx, double *xe, int32 iflag);
|
115
|
+
extern int swi_plan_for_osc_elem(int32 iflag, double tjd, double *xx);
|
116
|
+
extern int swi_trop_ra2sid_lon(double *xin, double *xout, double *xoutr, int32 iflag, char *serr);
|
117
|
+
extern int swi_trop_ra2sid_lon_sosy(double *xin, double *xout, double *xoutr, int32 iflag, char *serr);
|
118
|
+
extern int swi_get_observer(double tjd, int32 iflag,
|
119
|
+
AS_BOOL do_save, double *xobs, char *serr);
|
120
|
+
extern void swi_force_app_pos_etc();
|
121
|
+
|
122
|
+
/* obliquity of ecliptic */
|
123
|
+
extern void swi_check_ecliptic(double tjd);
|
124
|
+
extern double swi_epsiln(double J);
|
125
|
+
|
126
|
+
/* nutation */
|
127
|
+
extern void swi_check_nutation(double tjd, int32 iflag);
|
128
|
+
extern int swi_nutation(double J, double *nutlo);
|
129
|
+
extern void swi_nutate(double *xx, int32 iflag, AS_BOOL backward);
|
130
|
+
|
131
|
+
extern void swi_mean_lunar_elements(double tjd,
|
132
|
+
double *node, double *dnode,
|
133
|
+
double *peri, double *dperi);
|
134
|
+
/* */
|
135
|
+
extern double swi_mod2PI(double x);
|
136
|
+
|
137
|
+
/* evaluation of chebyshew series and derivative */
|
138
|
+
extern double swi_echeb(double x, double *coef, int ncf);
|
139
|
+
extern double swi_edcheb(double x, double *coef, int ncf);
|
140
|
+
|
141
|
+
/* cross product of vectors */
|
142
|
+
extern void swi_cross_prod(double *a, double *b, double *x);
|
143
|
+
/* dot product of vecotrs */
|
144
|
+
extern double swi_dot_prod_unit(double *x, double *y);
|
145
|
+
|
146
|
+
extern double swi_angnorm(double x);
|
147
|
+
|
148
|
+
/* generation of SWISSEPH file names */
|
149
|
+
extern void swi_gen_filename(double tjd, int ipli, char *fname);
|
150
|
+
|
151
|
+
/* cyclic redundancy checksum (CRC), 32 bit */
|
152
|
+
extern uint32 swi_crc32(unsigned char *buf, int len);
|
153
|
+
|
154
|
+
extern int swi_cutstr(char *s, char *cutlist, char *cpos[], int nmax);
|
155
|
+
extern char *swi_right_trim(char *s);
|
156
|
+
|
157
|
+
extern double swi_kepler(double E, double M, double ecce);
|
158
|
+
|
159
|
+
extern char *swi_get_fict_name(int32 ipl, char *s);
|
160
|
+
|
161
|
+
extern void swi_FK4_FK5(double *xp, double tjd);
|
162
|
+
|
163
|
+
extern char *swi_strcpy(char *to, char *from);
|
164
|
+
extern char *swi_strncpy(char *to, char *from, size_t n);
|
165
|
+
|
166
|
+
#ifdef TRACE
|
167
|
+
# define TRACE_COUNT_MAX 10000
|
168
|
+
extern FILE *swi_fp_trace_c;
|
169
|
+
extern FILE *swi_fp_trace_out;
|
170
|
+
extern void swi_open_trace(char *serr);
|
171
|
+
extern int32 swi_trace_count;
|
172
|
+
static char *fname_trace_c = "swetrace.c";
|
173
|
+
static char *fname_trace_out = "swetrace.txt";
|
174
|
+
#ifdef FORCE_IFLAG
|
175
|
+
static char *fname_force_flg = "force.flg";
|
176
|
+
#endif
|
177
|
+
#endif /* TRACE */
|
data/lib/swe4r.rb
ADDED
metadata
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: swe4r
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Andrew Kirk
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-04-22 00:00:00.000000000Z
|
13
|
+
dependencies: []
|
14
|
+
description:
|
15
|
+
email: andrew.kirk@windhorsemedia.com
|
16
|
+
executables: []
|
17
|
+
extensions:
|
18
|
+
- ext/swe4r/extconf.rb
|
19
|
+
extra_rdoc_files: []
|
20
|
+
files:
|
21
|
+
- lib/swe4r.rb
|
22
|
+
- ext/swe4r/extconf.rb
|
23
|
+
- ext/swe4r/swedate.h
|
24
|
+
- ext/swe4r/swehouse.h
|
25
|
+
- ext/swe4r/swejpl.h
|
26
|
+
- ext/swe4r/swenut2000a.h
|
27
|
+
- ext/swe4r/sweodef.h
|
28
|
+
- ext/swe4r/sweph.h
|
29
|
+
- ext/swe4r/swephexp.h
|
30
|
+
- ext/swe4r/swephlib.h
|
31
|
+
- ext/swe4r/src/swemptab.c
|
32
|
+
- ext/swe4r/swe4r.c
|
33
|
+
- ext/swe4r/swecl.c
|
34
|
+
- ext/swe4r/swedate.c
|
35
|
+
- ext/swe4r/swehel.c
|
36
|
+
- ext/swe4r/swehouse.c
|
37
|
+
- ext/swe4r/swejpl.c
|
38
|
+
- ext/swe4r/swemmoon.c
|
39
|
+
- ext/swe4r/swemplan.c
|
40
|
+
- ext/swe4r/sweph.c
|
41
|
+
- ext/swe4r/swephlib.c
|
42
|
+
homepage:
|
43
|
+
licenses: []
|
44
|
+
post_install_message:
|
45
|
+
rdoc_options: []
|
46
|
+
require_paths:
|
47
|
+
- lib
|
48
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
55
|
+
none: false
|
56
|
+
requirements:
|
57
|
+
- - ! '>='
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '0'
|
60
|
+
requirements: []
|
61
|
+
rubyforge_project:
|
62
|
+
rubygems_version: 1.8.10
|
63
|
+
signing_key:
|
64
|
+
specification_version: 3
|
65
|
+
summary: A C extension for the Swiss Ephemeris library (http://www.astro.com/swisseph/)
|
66
|
+
test_files: []
|