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