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
data/ext/swe4r/swejpl.h
ADDED
@@ -0,0 +1,105 @@
|
|
1
|
+
/*
|
2
|
+
| $Header: /home/dieter/sweph/RCS/swejpl.h,v 1.74 2008/06/16 10:07:20 dieter Exp $
|
3
|
+
|
|
4
|
+
| Subroutines for reading JPL ephemerides.
|
5
|
+
| derived from testeph.f as contained in DE403 distribution July 1995.
|
6
|
+
| works with DE200, DE102, DE403, DE404, DE405, DE406
|
7
|
+
| (attention, DE102 has 950 reference frame and also DE403 has slightly
|
8
|
+
| different reference frame from DE200).
|
9
|
+
|
10
|
+
Authors: Dieter Koch and Alois Treindl, Astrodienst Zurich
|
11
|
+
|
12
|
+
**************************************************************/
|
13
|
+
/* Copyright (C) 1997 - 2008 Astrodienst AG, Switzerland. All rights reserved.
|
14
|
+
|
15
|
+
License conditions
|
16
|
+
------------------
|
17
|
+
|
18
|
+
This file is part of Swiss Ephemeris.
|
19
|
+
|
20
|
+
Swiss Ephemeris is distributed with NO WARRANTY OF ANY KIND. No author
|
21
|
+
or distributor accepts any responsibility for the consequences of using it,
|
22
|
+
or for whether it serves any particular purpose or works at all, unless he
|
23
|
+
or she says so in writing.
|
24
|
+
|
25
|
+
Swiss Ephemeris is made available by its authors under a dual licensing
|
26
|
+
system. The software developer, who uses any part of Swiss Ephemeris
|
27
|
+
in his or her software, must choose between one of the two license models,
|
28
|
+
which are
|
29
|
+
a) GNU public license version 2 or later
|
30
|
+
b) Swiss Ephemeris Professional License
|
31
|
+
|
32
|
+
The choice must be made before the software developer distributes software
|
33
|
+
containing parts of Swiss Ephemeris to others, and before any public
|
34
|
+
service using the developed software is activated.
|
35
|
+
|
36
|
+
If the developer choses the GNU GPL software license, he or she must fulfill
|
37
|
+
the conditions of that license, which includes the obligation to place his
|
38
|
+
or her whole software project under the GNU GPL or a compatible license.
|
39
|
+
See http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
40
|
+
|
41
|
+
If the developer choses the Swiss Ephemeris Professional license,
|
42
|
+
he must follow the instructions as found in http://www.astro.com/swisseph/
|
43
|
+
and purchase the Swiss Ephemeris Professional Edition from Astrodienst
|
44
|
+
and sign the corresponding license contract.
|
45
|
+
|
46
|
+
The License grants you the right to use, copy, modify and redistribute
|
47
|
+
Swiss Ephemeris, but only under certain conditions described in the License.
|
48
|
+
Among other things, the License requires that the copyright notices and
|
49
|
+
this notice be preserved on all copies.
|
50
|
+
|
51
|
+
Authors of the Swiss Ephemeris: Dieter Koch and Alois Treindl
|
52
|
+
|
53
|
+
The authors of Swiss Ephemeris have no control or influence over any of
|
54
|
+
the derived works, i.e. over software or services created by other
|
55
|
+
programmers which use Swiss Ephemeris functions.
|
56
|
+
|
57
|
+
The names of the authors or of the copyright holder (Astrodienst) must not
|
58
|
+
be used for promoting any software, product or service which uses or contains
|
59
|
+
the Swiss Ephemeris. This copyright notice is the ONLY place where the
|
60
|
+
names of the authors can legally appear, except in cases where they have
|
61
|
+
given special permission in writing.
|
62
|
+
|
63
|
+
The trademarks 'Swiss Ephemeris' and 'Swiss Ephemeris inside' may be used
|
64
|
+
for promoting such software, products or services.
|
65
|
+
*/
|
66
|
+
|
67
|
+
|
68
|
+
#include "sweodef.h"
|
69
|
+
|
70
|
+
#define J_MERCURY 0 /* jpl body indices, modified by Alois */
|
71
|
+
#define J_VENUS 1 /* now they start at 0 and not at 1 */
|
72
|
+
#define J_EARTH 2
|
73
|
+
#define J_MARS 3
|
74
|
+
#define J_JUPITER 4
|
75
|
+
#define J_SATURN 5
|
76
|
+
#define J_URANUS 6
|
77
|
+
#define J_NEPTUNE 7
|
78
|
+
#define J_PLUTO 8
|
79
|
+
#define J_MOON 9
|
80
|
+
#define J_SUN 10
|
81
|
+
#define J_SBARY 11
|
82
|
+
#define J_EMB 12
|
83
|
+
#define J_NUT 13
|
84
|
+
#define J_LIB 14
|
85
|
+
|
86
|
+
/*
|
87
|
+
* compute position and speed at time et, for body ntarg with center
|
88
|
+
* ncent. rrd must be double[6] to contain the return vectors.
|
89
|
+
* ntarg can be all of the above, ncent all except J_NUT and J_LIB.
|
90
|
+
* Librations and Nutations are not affected by ncent.
|
91
|
+
*/
|
92
|
+
extern int swi_pleph(double et, int ntarg, int ncent, double *rrd, char *serr);
|
93
|
+
|
94
|
+
/*
|
95
|
+
* read the ephemeris constants. ss[0..2] returns start, end and granule size.
|
96
|
+
* If do_show is TRUE, a list of constants is printed to stdout.
|
97
|
+
*/
|
98
|
+
extern void swi_close_jpl_file(void);
|
99
|
+
|
100
|
+
extern int swi_open_jpl_file(double *ss, char *fname, char *fpath, char *serr);
|
101
|
+
|
102
|
+
extern int32 swi_get_jpl_denum(void);
|
103
|
+
|
104
|
+
extern void swi_IERS_FK5(double *xin, double *xout, int dir);
|
105
|
+
|