Last change
on this file since 1457 was 1457, checked in by cmv, 24 years ago |
import de la partie libastro de Xephem cmv+rz 10/4/2001
|
File size:
1017 bytes
|
Line | |
---|
1 | /* aux functions so programs besides XEphem can use this library.
|
---|
2 | */
|
---|
3 |
|
---|
4 | #include <stdio.h>
|
---|
5 |
|
---|
6 | #if defined (__STDC__)
|
---|
7 | #include <stdlib.h>
|
---|
8 | #endif
|
---|
9 |
|
---|
10 | #include "P_.h"
|
---|
11 | #include "astro.h"
|
---|
12 | #include "circum.h"
|
---|
13 | #include "preferences.h"
|
---|
14 |
|
---|
15 | static int prefs[NPREFS] = {
|
---|
16 | PREF_TOPO, PREF_METRIC, PREF_MDY, PREF_UTCTZ, PREF_HIPREC, PREF_NOMSGBELL,
|
---|
17 | PREF_PREFILL, PREF_TIPSON, PREF_CONFIRMON
|
---|
18 | };
|
---|
19 |
|
---|
20 | /* called anytime we want to know a preference.
|
---|
21 | */
|
---|
22 | int
|
---|
23 | pref_get(pref)
|
---|
24 | Preferences pref;
|
---|
25 | {
|
---|
26 | return (prefs[pref]);
|
---|
27 | }
|
---|
28 |
|
---|
29 | /* call to force a certain preference, return the old setting.
|
---|
30 | */
|
---|
31 | int
|
---|
32 | pref_set (pref, new)
|
---|
33 | Preferences pref;
|
---|
34 | int new;
|
---|
35 | {
|
---|
36 | int prior = pref_get(pref);
|
---|
37 | prefs[pref] = new;
|
---|
38 | return (prior);
|
---|
39 | }
|
---|
40 |
|
---|
41 | /* given an mjd, return it modified for terrestial dynamical time */
|
---|
42 | double
|
---|
43 | mm_mjed (np)
|
---|
44 | Now *np;
|
---|
45 | {
|
---|
46 | return (mjd + deltat(mjd)/86400.0);
|
---|
47 | }
|
---|
48 |
|
---|
49 | /* For RCS Only -- Do Not Edit */
|
---|
50 | static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: auxil.c,v $ $Date: 2001-04-10 14:40:46 $ $Revision: 1.1.1.1 $ $Name: not supported by cvs2svn $"};
|
---|
Note:
See
TracBrowser
for help on using the repository browser.