source: trunk/FACT++/pal/pal.h@ 19353

Last change on this file since 19353 was 18347, checked in by tbretz, 9 years ago
File size: 18.0 KB
Line 
1#ifndef PALHDEF
2#define PALHDEF
3
4/*
5*+
6* Name:
7* pal.h
8
9* Purpose:
10* Function prototypes for PAL routines.
11
12* Language:
13* Starlink ANSI C
14
15* Type of Module:
16* Include file
17
18* Description:
19* Function prototypes for PAL routines.
20
21* Authors:
22* TIMJ: Tim Jenness (JAC, Hawaii)
23* {enter_new_authors_here}
24
25* Notes:
26*
27
28* History:
29* 2012-02-08 (TIMJ):
30* Initial version. Define all SLA prototypes in PAL form even
31* though none are implemented.
32* Adapted with permission from the Fortran SLALIB library.
33* {enter_further_changes_here}
34
35* Copyright:
36* Copyright (C) 2012 Science and Technology Facilities Council.
37* All Rights Reserved.
38
39* Licence:
40* This program is free software: you can redistribute it and/or
41* modify it under the terms of the GNU Lesser General Public
42* License as published by the Free Software Foundation, either
43* version 3 of the License, or (at your option) any later
44* version.
45*
46* This program is distributed in the hope that it will be useful,
47* but WITHOUT ANY WARRANTY; without even the implied warranty of
48* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
49* GNU Lesser General Public License for more details.
50*
51* You should have received a copy of the GNU Lesser General
52* License along with this program. If not, see
53* <http://www.gnu.org/licenses/>.
54
55* Bugs:
56* {note_any_bugs_here}
57*-
58*/
59
60#ifdef __cplusplus
61extern "C" {
62#endif
63
64#include <math.h>
65#include <stdlib.h>
66
67void palAddet ( double rm, double dm, double eq, double *rc, double *dc );
68
69void palAfin ( const char *string, int *iptr, float *a, int *j );
70
71double palAirmas ( double zd );
72
73void palAltaz ( double ha, double dec, double phi,
74 double *az, double *azd, double *azdd,
75 double *el, double *eld, double *eldd,
76 double *pa, double *pad, double *padd );
77
78void palAmp ( double ra, double da, double date, double eq,
79 double *rm, double *dm );
80
81void palAmpqk ( double ra, double da, double amprms[21],
82 double *rm, double *dm );
83
84void palAop ( double rap, double dap, double date, double dut,
85 double elongm, double phim, double hm, double xp,
86 double yp, double tdk, double pmb, double rh,
87 double wl, double tlr,
88 double *aob, double *zob, double *hob,
89 double *dob, double *rob );
90
91void palAoppa ( double date, double dut, double elongm, double phim,
92 double hm, double xp, double yp, double tdk, double pmb,
93 double rh, double wl, double tlr, double aoprms[14] );
94
95void palAoppat ( double date, double aoprms[14] );
96
97void palAopqk ( double rap, double dap, const double aoprms[14],
98 double *aob, double *zob, double *hob,
99 double *dob, double *rob );
100
101void palAtmdsp ( double tdk, double pmb, double rh, double wl1,
102 double a1, double b1, double wl2, double *a2, double *b2 );
103
104void palAv2m ( float axvec[3], float rmat[3][3] );
105
106float palBear ( float a1, float b1, float a2, float b2 );
107
108void palCaf2r ( int ideg, int iamin, float asec, float *rad, int *j );
109
110void palCaldj ( int iy, int im, int id, double *djm, int *j );
111
112void palCalyd ( int iy, int im, int id, int *ny, int *nd, int *j );
113
114void palCc2s ( float v[3], float *a, float *b );
115
116void palCc62s ( float v[6], float *a, float *b, float *r,
117 float *ad, float *bd, float *rd );
118
119void palCd2tf ( int ndp, float days, char *sign, int ihmsf[4] );
120
121void palCldj ( int iy, int im, int id, double *djm, int *j );
122
123void palClyd ( int iy, int im, int id, int *ny, int *nd, int *jstat );
124
125void palCombn ( int nsel, int ncand, int list[], int *j );
126
127void palCr2af ( int ndp, float angle, char *sign, int idmsf[4] );
128
129void palCr2tf ( int ndp, float angle, char *sign, int ihmsf[4] );
130
131void palCs2c ( float a, float b, float v[3] );
132
133void palCs2c6 ( float a, float b, float r, float ad,
134 float bd, float rd, float v[6] );
135
136void palCtf2d ( int ihour, int imin, float sec, float *days, int *j );
137
138void palCtf2r ( int ihour, int imin, float sec, float *rad, int *j );
139
140void palDaf2r ( int ideg, int iamin, double asec, double *rad, int *j );
141
142void palDafin ( const char *string, int *iptr, double *a, int *j );
143
144double palDat ( double dju );
145
146void palDav2m ( double axvec[3], double rmat[3][3] );
147
148double palDbear ( double a1, double b1, double a2, double b2 );
149
150void palDbjin ( const char *string, int *nstrt,
151 double *dreslt, int *jf1, int *jf2 );
152
153void palDc62s ( double v[6], double *a, double *b, double *r,
154 double *ad, double *bd, double *rd );
155
156void palDcc2s ( double v[3], double *a, double *b );
157
158void palDcmpf ( double coeffs[6], double *xz, double *yz, double *xs,
159 double *ys, double *perp, double *orient );
160
161void palDcs2c ( double a, double b, double v[3] );
162
163void palDd2tf ( int ndp, double days, char *sign, int ihmsf[4] );
164
165void palDe2h ( double ha, double dec, double phi,
166 double *az, double *el );
167
168void palDeuler ( const char *order, double phi, double theta, double psi,
169 double rmat[3][3] );
170
171void palDfltin ( const char *string, int *nstrt, double *dreslt, int *jflag );
172
173void palDh2e ( double az, double el, double phi, double *ha, double *dec);
174
175void palDimxv ( double dm[3][3], double va[3], double vb[3] );
176
177void palDjcal ( int ndp, double djm, int iymdf[4], int *j );
178
179void palDjcl ( double djm, int *iy, int *im, int *id, double *fd, int *j );
180
181void palDm2av ( double rmat[3][3], double axvec[3] );
182
183void palDmat ( int n, double *a, double *y, double *d, int *jf, int *iw );
184
185void palDmoon ( double date, double pv[6] );
186
187void palDmxm ( double a[3][3], double b[3][3], double c[3][3] );
188
189void palDmxv ( double dm[3][3], double va[3], double vb[3] );
190
191double palDpav ( double v1[3], double v2[3] );
192
193void palDr2af ( int ndp, double angle, char *sign, int idmsf[4] );
194
195void palDr2tf ( int ndp, double angle, char *sign, int ihmsf[4] );
196
197double palDrange ( double angle );
198
199double palDranrm ( double angle );
200
201void palDs2c6 ( double a, double b, double r, double ad, double bd,
202 double rd, double v[6] );
203
204void palDs2tp ( double ra, double dec, double raz, double decz,
205 double *xi, double *eta, int *j );
206
207double palDsep ( double a1, double b1, double a2, double b2 );
208
209double palDsepv ( double v1[3], double v2[3] );
210
211double palDt ( double epoch );
212
213void palDtf2d ( int ihour, int imin, double sec, double *days, int *j );
214
215void palDtf2r ( int ihour, int imin, double sec, double *rad, int *j );
216
217void palDtp2s ( double xi, double eta, double raz, double decz,
218 double *ra, double *dec );
219
220void palDtp2v ( double xi, double eta, double v0[3], double v[3] );
221
222void palDtps2c ( double xi, double eta, double ra, double dec,
223 double *raz1, double *decz1,
224 double *raz2, double *decz2, int *n );
225
226void palDtpv2c ( double xi, double eta, double v[3],
227 double v01[3], double v02[3], int *n );
228
229double palDtt ( double dju );
230
231void palDv2tp ( double v[3], double v0[3], double *xi, double *eta, int *j );
232
233double palDvdv ( double va[3], double vb[3] );
234
235void palDvn ( double v[3], double uv[3], double *vm );
236
237void palDvxv ( double va[3], double vb[3], double vc[3] );
238
239void palE2h ( float ha, float dec, float phi, float *az, float *el );
240
241void palEarth ( int iy, int id, float fd, float posvel[6] );
242
243void palEcleq ( double dl, double db, double date, double *dr, double *dd );
244
245void palEcmat ( double date, double rmat[3][3] );
246
247void palEcor ( float rm, float dm, int iy, int id, float fd,
248 float *rv, float *tl );
249
250void palEg50 ( double dr, double dd, double *dl, double *db );
251
252void palEl2ue ( double date, int jform, double epoch, double orbinc,
253 double anode, double perih, double aorq, double e,
254 double aorl, double dm, double u[13], int *jstat );
255
256double palEpb ( double date );
257
258double palEpb2d ( double epb );
259
260double palEpco ( char k0, char k, double e );
261
262double palEpj ( double date );
263
264double palEpj2d ( double epj );
265
266void palEpv( double date, double ph[3], double vh[3],
267 double pb[3], double vb[3] );
268
269void palEqecl ( double dr, double dd, double date, double *dl, double *db );
270
271double palEqeqx ( double date );
272
273void palEqgal ( double dr, double dd, double *dl, double *db );
274
275void palEtrms ( double ep, double ev[3] );
276
277void palEuler ( const char *order, float phi, float theta, float psi,
278 float rmat[3][3] );
279
280void palEvp ( double date, double deqx,
281 double dvb[3], double dpb[3],
282 double dvh[3], double dph[3] );
283
284void palFitxy ( int itype, int np, double xye[][2], double xym[][2],
285 double coeffs[6], int *j );
286
287void palFk425 ( double r1950, double d1950, double dr1950,
288 double dd1950, double p1950, double v1950,
289 double *r2000, double *d2000, double *dr2000,
290 double *dd2000, double *p2000, double *v2000 );
291
292void palFk45z ( double r1950, double d1950, double bepoch,
293 double *r2000, double *d2000 );
294
295void palFk524 ( double r2000, double d2000, double dr2000,
296 double dd2000, double p2000, double v2000,
297 double *r1950, double *d1950, double *dr1950,
298 double *dd1950, double *p1950, double *v1950 );
299
300void palFk52h ( double r5, double d5, double dr5, double dd5,
301 double *dr, double *dh, double *drh, double *ddh );
302
303void palFk54z ( double r2000, double d2000, double bepoch,
304 double *r1950, double *d1950,
305 double *dr1950, double *dd1950 );
306
307void palFk5hz ( double r5, double d5, double epoch,
308 double *rh, double *dh );
309
310void palFlotin ( const char *string, int *nstrt, float *reslt, int *jflag );
311
312void palGaleq ( double dl, double db, double *dr, double *dd );
313
314void palGalsup ( double dl, double db, double *dsl, double *dsb );
315
316void palGe50 ( double dl, double db, double *dr, double *dd );
317
318void palGeoc ( double p, double h, double *r, double *z );
319
320double palGmst ( double ut1 );
321
322double palGmsta ( double date, double ut1 );
323
324void palH2e ( float az, float el, float phi, float *ha, float *dec );
325
326void palH2fk5 ( double dr, double dh, double drh, double ddh,
327 double *r5, double *d5, double *dr5, double *dd5 );
328
329void palHfk5z ( double rh, double dh, double epoch,
330 double *r5, double *d5, double *dr5, double *dd5 );
331
332void palImxv ( float rm[3][3], float va[3], float vb[3] );
333
334void palInt2in ( const char *string, int *nstrt, int *ireslt, int *jflag );
335
336void palIntin ( const char *string, int *nstrt, long *ireslt, int *jflag );
337
338void palInvf ( double fwds[6], double bkwds[6], int *j );
339
340void palKbj ( int jb, double e, char *k, int *j );
341
342void palM2av ( float rmat[3][3], float axvec[3] );
343
344void palMap ( double rm, double dm, double pr, double pd,
345 double px, double rv, double eq, double date,
346 double *ra, double *da );
347
348void palMappa ( double eq, double date, double amprms[21] );
349
350void palMapqk ( double rm, double dm, double pr, double pd,
351 double px, double rv, double amprms[21],
352 double *ra, double *da );
353
354void palMapqkz ( double rm, double dm, double amprms[21],
355 double *ra, double *da );
356
357void palMoon ( int iy, int id, float fd, float posvel[6] );
358
359void palMxm ( float a[3][3], float b[3][3], float c[3][3] );
360
361void palMxv ( float rm[3][3], float va[3], float vb[3] );
362
363void palNut ( double date, double rmatn[3][3] );
364
365void palNutc ( double date, double *dpsi, double *deps, double *eps0 );
366
367void palNutc80 ( double date, double *dpsi, double *deps, double *eps0 );
368
369void palOap ( const char *type, double ob1, double ob2, double date,
370 double dut, double elongm, double phim, double hm,
371 double xp, double yp, double tdk, double pmb,
372 double rh, double wl, double tlr,
373 double *rap, double *dap );
374
375void palOapqk ( const char *type, double ob1, double ob2, const double aoprms[14],
376 double *rap, double *dap );
377
378int palObs( size_t n, const char * c,
379 char * ident, size_t identlen,
380 char * name, size_t namelen,
381 double * w, double * p, double * h );
382
383double palPa ( double ha, double dec, double phi );
384
385double palPav ( float v1[3], float v2[3] );
386
387void palPcd ( double disco, double *x, double *y );
388
389void palPda2h ( double p, double d, double a,
390 double *h1, int *j1, double *h2, int *j2 );
391
392void palPdq2h ( double p, double d, double q,
393 double *h1, int *j1, double *h2, int *j2 );
394
395void palPermut ( int n, int istate[], int iorder[], int *j );
396
397void palPertel (int jform, double date0, double date1,
398 double epoch0, double orbi0, double anode0,
399 double perih0, double aorq0, double e0, double am0,
400 double *epoch1, double *orbi1, double *anode1,
401 double *perih1, double *aorq1, double *e1, double *am1,
402 int *jstat );
403
404void palPertue ( double date, double u[13], int *jstat );
405
406void palPlanel ( double date, int jform, double epoch, double orbinc,
407 double anode, double perih, double aorq, double e,
408 double aorl, double dm, double pv[6], int *jstat );
409
410void palPlanet ( double date, int np, double pv[6], int *j );
411
412void palPlante ( double date, double elong, double phi, int jform,
413 double epoch, double orbinc, double anode, double perih,
414 double aorq, double e, double aorl, double dm,
415 double *ra, double *dec, double *r, int *jstat );
416
417void palPlantu ( double date, double elong, double phi, const double u[13],
418 double *ra, double *dec, double *r, int *jstat );
419
420void palPm ( double r0, double d0, double pr, double pd,
421 double px, double rv, double ep0, double ep1,
422 double *r1, double *d1 );
423
424void palPolmo ( double elongm, double phim, double xp, double yp,
425 double *elong, double *phi, double *daz );
426
427void palPrebn ( double bep0, double bep1, double rmatp[3][3] );
428
429void palPrec ( double ep0, double ep1, double rmatp[3][3] );
430
431void palPrecl ( double ep0, double ep1, double rmatp[3][3] );
432
433void palPreces ( const char sys[3], double ep0, double ep1,
434 double *ra, double *dc );
435
436void palPrenut ( double epoch, double date, double rmatpn[3][3] );
437
438void palPv2el ( const double pv[6], double date, double pmass, int jformr,
439 int *jform, double *epoch, double *orbinc,
440 double *anode, double *perih, double *aorq, double *e,
441 double *aorl, double *dm, int *jstat );
442
443void palPv2ue ( const double pv[6], double date, double pmass,
444 double u[13], int *jstat );
445
446void palPvobs ( double p, double h, double stl, double pv[6] );
447
448void palPxy ( int np, double xye[][2], double xym[][2],
449 double coeffs[6],
450 double xyp[][2], double *xrms, double *yrms, double *rrms );
451
452float palRange ( float angle );
453
454float palRanorm ( float angle );
455
456double palRcc ( double tdb, double ut1, double wl, double u, double v );
457
458void palRdplan ( double date, int np, double elong, double phi,
459 double *ra, double *dec, double *diam );
460
461void palRefco ( double hm, double tdk, double pmb, double rh,
462 double wl, double phi, double tlr, double eps,
463 double *refa, double *refb );
464
465void palRefcoq ( double tdk, double pmb, double rh, double wl,
466 double *refa, double *refb );
467
468void palRefro ( double zobs, double hm, double tdk, double pmb,
469 double rh, double wl, double phi, double tlr, double eps,
470 double *ref );
471
472void palRefv ( double vu[3], double refa, double refb, double vr[3] );
473
474void palRefz ( double zu, double refa, double refb, double *zr );
475
476double palRverot ( double phi, double ra, double da, double st );
477
478double palRvgalc ( double r2000, double d2000 );
479
480double palRvlg ( double r2000, double d2000 );
481
482double palRvlsrd ( double r2000, double d2000 );
483
484double palRvlsrk ( double r2000, double d2000 );
485
486void palS2tp ( float ra, float dec, float raz, float decz,
487 float *xi, float *eta, int *j );
488
489float palSep ( float a1, float b1, float a2, float b2 );
490
491float palSepv ( float v1[3], float v2[3] );
492
493void palSmat ( int n, float *a, float *y, float *d, int *jf, int *iw );
494
495void palSubet ( double rc, double dc, double eq,
496 double *rm, double *dm );
497
498void palSupgal ( double dsl, double dsb, double *dl, double *db );
499
500void palSvd ( int m, int n, int mp, int np,
501 double *a, double *w, double *v, double *work,
502 int *jstat );
503
504void palSvdcov ( int n, int np, int nc,
505 double *w, double *v, double *work, double *cvm );
506
507void palSvdsol ( int m, int n, int mp, int np,
508 double *b, double *u, double *w, double *v,
509 double *work, double *x );
510
511void palTp2s ( float xi, float eta, float raz, float decz,
512 float *ra, float *dec );
513
514void palTp2v ( float xi, float eta, float v0[3], float v[3] );
515
516void palTps2c ( float xi, float eta, float ra, float dec,
517 float *raz1, float *decz1,
518 float *raz2, float *decz2, int *n );
519
520void palTpv2c ( float xi, float eta, float v[3],
521 float v01[3], float v02[3], int *n );
522
523void palUe2el ( const double u[13], int jformr,
524 int *jform, double *epoch, double *orbinc,
525 double *anode, double *perih, double *aorq, double *e,
526 double *aorl, double *dm, int *jstat );
527
528void palUe2pv ( double date, double u[13], double pv[], int *jstat );
529
530void palUnpcd ( double disco, double *x, double *y );
531
532void palV2tp ( float v[3], float v0[3], float *xi, float *eta, int *j );
533
534float palVdv ( float va[3], float vb[3] );
535
536int palVers ( char * verstring, size_t verlen );
537
538void palVn ( float v[3], float uv[3], float *vm );
539
540void palVxv ( float va[3], float vb[3], float vc[3] );
541
542void palXy2xy ( double x1, double y1, double coeffs[6],
543 double *x2, double *y2 );
544
545double palZd ( double ha, double dec, double phi );
546
547#ifdef __cplusplus
548}
549#endif
550
551#endif
Note: See TracBrowser for help on using the repository browser.