libnova v 0.15.0

- Main Page
- Related Pages
- Modules
- Data Structures
- Files
- Examples

- File List

ln_types.h
1 /*
2 * This library is free software; you can redistribute it and/or
3 * modify it under the terms of the GNU Lesser General Public
4 * License as published by the Free Software Foundation; either
5 * version 2 of the License, or (at your option) any later version.
6 *
7 * This library is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10 * Lesser General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
15 *
16 * Copyright (C) 2000 - 2005 Liam Girdwood
17 */
18
19 #ifndef _LN_TYPES_H
20 #define _LN_TYPES_H
21
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25
26 #if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) || defined( __BCPLUSPLUS__) || defined( __MWERKS__)
27 # if defined( LIBNOVA_STATIC )
28 # define LIBNOVA_EXPORT
29 # elif defined( LIBNOVA_SHARED )
30 # define LIBNOVA_EXPORT __declspec(dllexport)
31 # else
32 # define LIBNOVA_EXPORT
33 # endif
34 #else
35 # define LIBNOVA_EXPORT
36 #endif
37
38 /* define some useful constants if they are not already defined */
39 #if(!defined(M_PI_2) && (!defined(_MSC_VER) || !defined(_USE_MATH_DEFINES)))
40 #define M_PI_2 1.5707963267948966192313216916398
41 #define M_PI_4 0.78539816339744830961566084581988
42 #define M_PI 3.1415926535897932384626433832795
43 #endif
44
45 /* sideral day length in seconds and days (for JD)*/
46 #define LN_SIDEREAL_DAY_SEC 86164.09
47 #define LN_SIDEREAL_DAY_DAY LN_SIDEREAL_DAY_SEC/86400
48
49 /* 1.1.2000 Julian Day & others */
50 #define JD2000 2451545.0
51 #define JD2050 2469807.50
52
53 #define B1900 2415020.3135
54 #define B1950 2433282.4235
55
66 struct ln_date
67 {
68 int years;
69 int months;
70 int days;
71 int hours;
72 int minutes;
73 double seconds;
74 };
75
86 struct ln_zonedate
87 {
88 int years;
89 int months;
90 int days;
91 int hours;
92 int minutes;
93 double seconds;
94 long gmtoff;
95 };
96
103 struct ln_dms
104 {
105 unsigned short neg;
106 unsigned short degrees;
107 unsigned short minutes;
108 double seconds;
109 };
110
117 struct ln_hms
118 {
119 unsigned short hours;
120 unsigned short minutes;
121 double seconds;
122 };
123
130 struct lnh_equ_posn
131 {
132 struct ln_hms ra;
133 struct ln_dms dec;
134 };
135
142 struct lnh_hrz_posn
143 {
144 struct ln_dms az;
145 struct ln_dms alt;
146 };
147
148
155 struct lnh_lnlat_posn
156 {
157 struct ln_dms lng;
158 struct ln_dms lat;
159 };
160
161
170 struct ln_equ_posn
171 {
172 double ra;
173 double dec;
174 };
175
184 struct ln_hrz_posn
185 {
186 double az;
188 double alt;
189 };
190
191
200 struct ln_lnlat_posn
201 {
202 double lng;
203 double lat;
204 };
205
206
216 struct ln_helio_posn
217 {
218 double L;
219 double B;
220 double R;
221 };
222
237 struct ln_rect_posn
238 {
239 double X;
240 double Y;
241 double Z;
242 };
243
252 struct ln_gal_posn
253 {
254 double l;
255 double b;
256 };
257
265 struct ln_ell_orbit
266 {
267 double a;
268 double e;
269 double i;
270 double w;
271 double omega;
272 double n;
273 double JD;
274 };
275
283 struct ln_par_orbit
284 {
285 double q;
286 double i;
287 double w;
288 double omega;
289 double JD;
290 };
291
299 struct ln_hyp_orbit
300 {
301 double q;
302 double e;
303 double i;
304 double w;
305 double omega;
306 double JD;
307 };
308
317 struct ln_rst_time
318 {
319 double rise;
320 double set;
321 double transit;
322 };
323
332 struct ln_nutation
333 {
334 double longitude;
335 double obliquity;
336 double ecliptic;
337 };
338
339 /* Definitions of POSIX structures for Win32. */
340 #ifdef __WIN32__
341
342 #include <time.h>
343
344 struct timeval
345 {
346 time_t tv_sec; /* count of seconds since Jan. 1, 1970 */
347 long tv_usec; /* and microseconds */
348 };
349
350 struct timezone
351 {
352 int tz_minuteswest; /* Minutes west of GMT */
353 int tz_dsttime; /* DST correction offset */
354 };
355
356 #endif /* __WIN32__ */
357
358 #ifdef __cplusplus
359 };
360 #endif
361
362 #endif
363
ln_nutation
Nutation in longitude, ecliptic and obliquity.
Definition: ln_types.h:332
ln_ell_orbit::JD
double JD
Definition: ln_types.h:273
ln_zonedate::minutes
int minutes
Definition: ln_types.h:92
ln_hyp_orbit::i
double i
Definition: ln_types.h:303
ln_zonedate::months
int months
Definition: ln_types.h:89
ln_equ_posn::dec
double dec
Definition: ln_types.h:173
ln_ell_orbit
Elliptic Orbital elements.
Definition: ln_types.h:265
lnh_equ_posn::dec
struct ln_dms dec
Definition: ln_types.h:133
ln_zonedate::seconds
double seconds
Definition: ln_types.h:93
ln_hyp_orbit::JD
double JD
Definition: ln_types.h:306
ln_ell_orbit::n
double n
Definition: ln_types.h:272
ln_rect_posn::X
double X
Definition: ln_types.h:239
ln_gal_posn::l
double l
Definition: ln_types.h:254
lnh_hrz_posn::az
struct ln_dms az
Definition: ln_types.h:144
ln_rect_posn
Rectangular coordinates.
Definition: ln_types.h:237
ln_helio_posn::L
double L
Definition: ln_types.h:218
ln_hyp_orbit::q
double q
Definition: ln_types.h:301
ln_ell_orbit::e
double e
Definition: ln_types.h:268
ln_hms::hours
unsigned short hours
Definition: ln_types.h:119
ln_rst_time::rise
double rise
Definition: ln_types.h:319
ln_zonedate
Human readable Date and time with timezone information used by libnova.
Definition: ln_types.h:86
ln_hrz_posn
Horizontal Coordinates.
Definition: ln_types.h:184
lnh_lnlat_posn::lng
struct ln_dms lng
Definition: ln_types.h:157
ln_nutation::ecliptic
double ecliptic
Definition: ln_types.h:336
ln_rect_posn::Z
double Z
Definition: ln_types.h:241
ln_dms
Degrees, minutes and seconds.
Definition: ln_types.h:103
ln_hms
Hours, minutes and seconds.
Definition: ln_types.h:117
ln_date::seconds
double seconds
Definition: ln_types.h:73
ln_date::months
int months
Definition: ln_types.h:69
ln_helio_posn::B
double B
Definition: ln_types.h:219
ln_lnlat_posn::lat
double lat
Definition: ln_types.h:203
lnh_lnlat_posn::lat
struct ln_dms lat
Definition: ln_types.h:158
ln_helio_posn::R
double R
Definition: ln_types.h:220
ln_par_orbit::q
double q
Definition: ln_types.h:285
ln_equ_posn
Equatorial Coordinates.
Definition: ln_types.h:170
ln_hyp_orbit::w
double w
Definition: ln_types.h:304
ln_dms::seconds
double seconds
Definition: ln_types.h:108
lnh_hrz_posn::alt
struct ln_dms alt
Definition: ln_types.h:145
ln_hyp_orbit
Hyperbolic Orbital elements.
Definition: ln_types.h:299
ln_hrz_posn::alt
double alt
Definition: ln_types.h:188
ln_zonedate::days
int days
Definition: ln_types.h:90
ln_dms::neg
unsigned short neg
Definition: ln_types.h:105
ln_rect_posn::Y
double Y
Definition: ln_types.h:240
ln_nutation::longitude
double longitude
Definition: ln_types.h:334
ln_lnlat_posn
Ecliptical (or celestial) Longitude and Latitude.
Definition: ln_types.h:200
ln_ell_orbit::w
double w
Definition: ln_types.h:270
ln_par_orbit
Parabolic Orbital elements.
Definition: ln_types.h:283
ln_nutation::obliquity
double obliquity
Definition: ln_types.h:335
ln_date
Human readable Date and time used by libnova.
Definition: ln_types.h:66
ln_rst_time
Rise, Set and Transit times.
Definition: ln_types.h:317
ln_ell_orbit::i
double i
Definition: ln_types.h:269
ln_date::minutes
int minutes
Definition: ln_types.h:72
ln_date::hours
int hours
Definition: ln_types.h:71
ln_par_orbit::omega
double omega
Definition: ln_types.h:288
lnh_equ_posn::ra
struct ln_hms ra
Definition: ln_types.h:132
ln_helio_posn
Heliocentric position.
Definition: ln_types.h:216
ln_rst_time::set
double set
Definition: ln_types.h:320
ln_hyp_orbit::e
double e
Definition: ln_types.h:302
lnh_equ_posn
Right Ascension and Declination.
Definition: ln_types.h:130
ln_hms::seconds
double seconds
Definition: ln_types.h:121
ln_date::days
int days
Definition: ln_types.h:70
ln_zonedate::years
int years
Definition: ln_types.h:88
ln_dms::degrees
unsigned short degrees
Definition: ln_types.h:106
ln_hrz_posn::az
double az
Definition: ln_types.h:186
ln_zonedate::gmtoff
long gmtoff
Definition: ln_types.h:94
ln_zonedate::hours
int hours
Definition: ln_types.h:91
ln_par_orbit::JD
double JD
Definition: ln_types.h:289
ln_equ_posn::ra
double ra
Definition: ln_types.h:172
lnh_lnlat_posn
Ecliptical (or celestial) Latitude and Longitude.
Definition: ln_types.h:155
ln_rst_time::transit
double transit
Definition: ln_types.h:321
ln_lnlat_posn::lng
double lng
Definition: ln_types.h:202
ln_hms::minutes
unsigned short minutes
Definition: ln_types.h:120
ln_par_orbit::i
double i
Definition: ln_types.h:286
ln_gal_posn
Galactic coordinates.
Definition: ln_types.h:252
lnh_hrz_posn
Azimuth and Altitude.
Definition: ln_types.h:142
ln_dms::minutes
unsigned short minutes
Definition: ln_types.h:107
ln_gal_posn::b
double b
Definition: ln_types.h:255
ln_date::years
int years
Definition: ln_types.h:68
ln_par_orbit::w
double w
Definition: ln_types.h:287
ln_hyp_orbit::omega
double omega
Definition: ln_types.h:305
ln_ell_orbit::omega
double omega
Definition: ln_types.h:271
ln_ell_orbit::a
double a
Definition: ln_types.h:267