source: Sophya/trunk/SophyaExt/XephemAstroLib/auxil.c@ 4011

Last change on this file since 4011 was 3654, checked in by cmv, 16 years ago

mise a niveau Xephem 3.7.4, cmv 16/07/2009

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 */
11static 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 */
18int
19pref_get(Preferences pref)
20{
21 return (prefs[pref]);
22}
23
24/* call to force a certain preference, return the old setting.
25 */
26int
27pref_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 */
35double
36mm_mjed (Now *np)
37{
38 return (mjd + deltat(mjd)/86400.0);
39}
40
41/* For RCS Only -- Do Not Edit */
42static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: auxil.c,v $ $Date: 2009-07-16 10:34:36 $ $Revision: 1.8 $ $Name: not supported by cvs2svn $"};
Note: See TracBrowser for help on using the repository browser.