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

Last change on this file since 3586 was 3477, checked in by cmv, 18 years ago

mise a jour Xephem 3.7.3 , cmv 25/03/2008

File size: 963 bytes
RevLine 
[1457]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
[2551]10/* default preferences */
[1457]11static int prefs[NPREFS] = {
12 PREF_TOPO, PREF_METRIC, PREF_MDY, PREF_UTCTZ, PREF_HIPREC, PREF_NOMSGBELL,
[2551]13 PREF_PREFILL, PREF_TIPSON, PREF_CONFIRMON, PREF_SUN
[1457]14};
15
16/* called anytime we want to know a preference.
17 */
18int
[2551]19pref_get(Preferences pref)
[1457]20{
21 return (prefs[pref]);
22}
23
24/* call to force a certain preference, return the old setting.
25 */
26int
[2551]27pref_set (Preferences pref, int newp)
[1457]28{
29 int prior = pref_get(pref);
[2551]30 prefs[pref] = newp;
[1457]31 return (prior);
32}
33
34/* given an mjd, return it modified for terrestial dynamical time */
35double
[2551]36mm_mjed (Now *np)
[1457]37{
38 return (mjd + deltat(mjd)/86400.0);
39}
40
41/* For RCS Only -- Do Not Edit */
[3477]42static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: auxil.c,v $ $Date: 2008-03-25 17:45:10 $ $Revision: 1.7 $ $Name: not supported by cvs2svn $"};
Note: See TracBrowser for help on using the repository browser.