Index: /trunk/SophyaExt/XephemAstroLib/aa_hadec.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/aa_hadec.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/aa_hadec.c	(revision 2643)
@@ -75,3 +75,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: aa_hadec.c,v $ $Date: 2004-06-15 16:52:37 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: aa_hadec.c,v $ $Date: 2005-01-17 10:13:02 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/aberration.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/aberration.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/aberration.c	(revision 2643)
@@ -125,3 +125,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: aberration.c,v $ $Date: 2004-06-15 16:52:37 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: aberration.c,v $ $Date: 2005-01-17 10:13:02 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/actan.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/actan.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/actan.c	(revision 2643)
@@ -1,5 +1,5 @@
 #include <math.h>
 
-/* @(#) $Id: actan.c,v 1.3 2004-06-15 16:52:37 cmv Exp $ */
+/* @(#) $Id: actan.c,v 1.4 2005-01-17 10:13:02 cmv Exp $ */
 
 /* commonly in math.h, but not in strict ANSI C */
@@ -65,3 +65,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: actan.c,v $ $Date: 2004-06-15 16:52:37 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: actan.c,v $ $Date: 2005-01-17 10:13:02 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/airmass.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/airmass.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/airmass.c	(revision 2643)
@@ -24,3 +24,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: airmass.c,v $ $Date: 2004-06-15 16:52:37 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: airmass.c,v $ $Date: 2005-01-17 10:13:03 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/anomaly.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/anomaly.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/anomaly.c	(revision 2643)
@@ -61,3 +61,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: anomaly.c,v $ $Date: 2004-06-15 16:52:37 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: anomaly.c,v $ $Date: 2005-01-17 10:13:03 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/ap_as.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/ap_as.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/ap_as.c	(revision 2643)
@@ -51,3 +51,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: ap_as.c,v $ $Date: 2004-06-15 16:52:37 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: ap_as.c,v $ $Date: 2005-01-17 10:13:03 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/astro.h
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/astro.h	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/astro.h	(revision 2643)
@@ -532,9 +532,12 @@
     char *full;		/* full name */
     char *tag;		/* Roman numeral tag */
-    float x, y, z;	/* radii: +x:east +y:south +z:front */
-    float ra, dec;
-    float mag;
+    float x, y, z;	/* sky loc in planet radii: +x:east +y:south +z:front */
+    float ra, dec;	/* sky location in ra/dec */
+    float mag;		/* magnitude */
     int evis;		/* whether geometrically visible from earth */
     int svis;		/* whether in sun light */
+    int pshad;		/* whether moon is casting shadow on planet */
+    int trans;		/* whether moon is transiting */
+    float sx, sy;	/* shadow sky loc in planet radii: +x:east +y:south */
 } MoonData;
 
@@ -660,6 +663,7 @@
 
 /* jupmoon.c */
-extern void jupiter_data (double Mjd, char dir[], Obj *eop, Obj *jop,
-    double *jupsize, double *cmlI, double *cmlII, MoonData md[J_NMOONS]); 
+extern void jupiter_data (double Mjd, char dir[], Obj *sop, Obj *jop,
+    double *jupsize, double *cmlI, double *cmlII, double *polera,
+    double *poledec, MoonData md[J_NMOONS]); 
 
 /* libration.c */
@@ -671,6 +675,6 @@
 
 /* marsmoon.c */
-extern void marsm_data (double Mjd, char dir[], Obj *eop, Obj *mop,
-    double *marssize, MoonData md[M_NMOONS]); 
+extern void marsm_data (double Mjd, char dir[], Obj *sop, Obj *mop,
+    double *marssize, double *polera, double *poledec, MoonData md[M_NMOONS]); 
 
 /* misc.c */
@@ -740,6 +744,6 @@
 
 /* plshadow.c */
-extern int plshadow (Now *np, Obj *op, Obj *sop, double polera,
-double poledec, double x, double y, double z, double *sxp, double *syp);
+extern int plshadow (Obj *op, Obj *sop, double polera,
+    double poledec, double x, double y, double z, float *sxp, float *syp);
 
 /* plmoon_cir.c */
@@ -774,5 +778,6 @@
 /* satmoon.c */
 extern void saturn_data (double Mjd, char dir[], Obj *eop, Obj *sop,
-    double *satsize, double *etilt, double *stlit, MoonData md[S_NMOONS]); 
+    double *satsize, double *etilt, double *stlit, double *polera, 
+    double *poledec, MoonData md[S_NMOONS]); 
 
 /* sphcart.c */
@@ -789,6 +794,6 @@
 
 /* umoon.c */
-extern void uranus_data (double Mjd, char dir[], Obj *eop, Obj *uop,
-    double *usize, MoonData md[U_NMOONS]); 
+extern void uranus_data (double Mjd, char dir[], Obj *sop, Obj *uop,
+    double *usize, double *polera, double *poledec, MoonData md[U_NMOONS]); 
 
 /* utc_gst.c */
@@ -802,4 +807,4 @@
 
 /* For RCS Only -- Do Not Edit
- * @(#) $RCSfile: astro.h,v $ $Date: 2004-06-15 16:52:37 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $
+ * @(#) $RCSfile: astro.h,v $ $Date: 2005-01-17 10:13:03 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $
  */
Index: /trunk/SophyaExt/XephemAstroLib/atlas.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/atlas.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/atlas.c	(revision 2643)
@@ -194,3 +194,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: atlas.c,v $ $Date: 2004-06-15 16:54:11 $ $Revision: 1.1 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: atlas.c,v $ $Date: 2005-01-17 10:13:03 $ $Revision: 1.2 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/auxil.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/auxil.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/auxil.c	(revision 2643)
@@ -40,3 +40,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: auxil.c,v $ $Date: 2004-06-15 16:52:37 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: auxil.c,v $ $Date: 2005-01-17 10:13:03 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/bdl.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/bdl.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/bdl.c	(revision 2643)
@@ -232,3 +232,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: bdl.c,v $ $Date: 2004-06-15 16:54:11 $ $Revision: 1.1 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: bdl.c,v $ $Date: 2005-01-17 10:13:03 $ $Revision: 1.2 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/bdl.h
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/bdl.h	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/bdl.h	(revision 2643)
@@ -3,4 +3,4 @@
 
 /* For RCS Only -- Do Not Edit
- * @(#) $RCSfile: bdl.h,v $ $Date: 2004-06-15 16:54:11 $ $Revision: 1.1 $ $Name: not supported by cvs2svn $
+ * @(#) $RCSfile: bdl.h,v $ $Date: 2005-01-17 10:13:03 $ $Revision: 1.2 $ $Name: not supported by cvs2svn $
  */
Index: /trunk/SophyaExt/XephemAstroLib/chap95.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/chap95.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/chap95.c	(revision 2643)
@@ -172,3 +172,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: chap95.c,v $ $Date: 2004-06-15 16:52:37 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: chap95.c,v $ $Date: 2005-01-17 10:13:03 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/chap95.h
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/chap95.h	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/chap95.h	(revision 2643)
@@ -65,4 +65,4 @@
 
 /* For RCS Only -- Do Not Edit
- * @(#) $RCSfile: chap95.h,v $ $Date: 2004-06-15 16:52:37 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $
+ * @(#) $RCSfile: chap95.h,v $ $Date: 2005-01-17 10:13:03 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $
  */
Index: /trunk/SophyaExt/XephemAstroLib/chap95_data.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/chap95_data.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/chap95_data.c	(revision 2643)
@@ -781,3 +781,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: chap95_data.c,v $ $Date: 2004-06-15 16:52:37 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: chap95_data.c,v $ $Date: 2005-01-17 10:13:03 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/circum.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/circum.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/circum.c	(revision 2643)
@@ -861,3 +861,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: circum.c,v $ $Date: 2004-12-03 10:39:58 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: circum.c,v $ $Date: 2005-01-17 10:13:04 $ $Revision: 1.5 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/comet.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/comet.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/comet.c	(revision 2643)
@@ -81,3 +81,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: comet.c,v $ $Date: 2004-06-15 16:52:38 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: comet.c,v $ $Date: 2005-01-17 10:13:04 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/constel.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/constel.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/constel.c	(revision 2643)
@@ -4707,3 +4707,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: constel.c,v $ $Date: 2004-06-15 16:54:11 $ $Revision: 1.1 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: constel.c,v $ $Date: 2005-01-17 10:13:04 $ $Revision: 1.2 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/dbfmt.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/dbfmt.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/dbfmt.c	(revision 2643)
@@ -1004,3 +1004,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: dbfmt.c,v $ $Date: 2004-06-15 16:52:38 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: dbfmt.c,v $ $Date: 2005-01-17 10:13:04 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/deep.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/deep.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/deep.c	(revision 2643)
@@ -788,3 +788,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: deep.c,v $ $Date: 2004-06-15 16:52:38 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: deep.c,v $ $Date: 2005-01-17 10:13:04 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/deepconst.h
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/deepconst.h	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/deepconst.h	(revision 2643)
@@ -2,5 +2,5 @@
 #define _CONST_H
 
-/* $Id: deepconst.h,v 1.3 2004-06-15 16:52:38 cmv Exp $ */
+/* $Id: deepconst.h,v 1.4 2005-01-17 10:13:04 cmv Exp $ */
 
 
@@ -31,4 +31,4 @@
 
 /* For RCS Only -- Do Not Edit
- * @(#) $RCSfile: deepconst.h,v $ $Date: 2004-06-15 16:52:38 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $
+ * @(#) $RCSfile: deepconst.h,v $ $Date: 2005-01-17 10:13:04 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $
  */
Index: /trunk/SophyaExt/XephemAstroLib/deltat.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/deltat.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/deltat.c	(revision 2643)
@@ -304,3 +304,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: deltat.c,v $ $Date: 2004-06-15 16:52:38 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: deltat.c,v $ $Date: 2005-01-17 10:13:04 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/earthsat.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/earthsat.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/earthsat.c	(revision 2643)
@@ -784,3 +784,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: earthsat.c,v $ $Date: 2004-12-03 10:39:58 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: earthsat.c,v $ $Date: 2005-01-17 10:13:04 $ $Revision: 1.5 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/eq_ecl.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/eq_ecl.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/eq_ecl.c	(revision 2643)
@@ -70,3 +70,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: eq_ecl.c,v $ $Date: 2004-06-15 16:52:38 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: eq_ecl.c,v $ $Date: 2005-01-17 10:13:04 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/eq_gal.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/eq_gal.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/eq_gal.c	(revision 2643)
@@ -97,3 +97,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: eq_gal.c,v $ $Date: 2004-06-15 16:52:38 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: eq_gal.c,v $ $Date: 2005-01-17 10:13:05 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/formats.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/formats.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/formats.c	(revision 2643)
@@ -202,3 +202,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: formats.c,v $ $Date: 2004-06-15 16:52:38 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: formats.c,v $ $Date: 2005-01-17 10:13:05 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/helio.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/helio.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/helio.c	(revision 2643)
@@ -49,3 +49,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: helio.c,v $ $Date: 2004-06-15 16:52:38 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: helio.c,v $ $Date: 2005-01-17 10:13:05 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/jupmoon.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/jupmoon.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/jupmoon.c	(revision 2643)
@@ -13,6 +13,8 @@
     MoonData md[J_NMOONS]);
 static void moonradec (double jupsize, MoonData md[J_NMOONS]);
-static void moonSVis (Obj *eop, Obj *jop, MoonData md[J_NMOONS]);
+static void moonSVis (Obj *sop, Obj *jop, MoonData md[J_NMOONS]);
 static void moonEVis (MoonData md[J_NMOONS]);
+static void moonPShad (Obj *sop, Obj *jop, MoonData md[J_NMOONS]);
+static void moonTrans (MoonData md[J_NMOONS]);
 
 /* moon table and a few other goodies and when it was last computed */
@@ -32,8 +34,15 @@
 static char jbdlfn[] = "jupiter.9910";
 
+/* These values are from the Explanatory Supplement.
+ * Precession degrades them gradually over time.
+ */
+#define POLE_RA   degrad(268.05)	 /* RA of Jupiter's north pole */
+#define POLE_DEC  degrad(64.50)		/* Dec of Jupiter's north pole */
+
+
 /* get jupiter info in md[0], moon info in md[1..J_NMOONS-1].
  * if !dir always use meeus model.
  * if !jop caller just wants md[] for names
- * N.B. we assume eop and jop are updated.
+ * N.B. we assume sop and jop are updated.
  */
 void
@@ -41,8 +50,9 @@
 double Mjd,		/* mjd */
 char dir[],             /* dir in which to look for helper files */
-Obj *eop,               /* earth == Sun */
+Obj *sop,               /* Sun */
 Obj *jop,		/* jupiter */
 double *sizep,		/* jup angular diam, rads */
-double *cmlI, double *cmlII,	/* central meridian longitude, rads */
+double *cmlI, double *cmlII,		/* central meridian longitude, rads */
+double *polera, double *poledec,	/* pole location */
 MoonData md[J_NMOONS])	/* return info */
 {
@@ -51,4 +61,8 @@
 	/* always copy back at least for name */
 	memcpy (md, jmd, sizeof(jmd));
+
+	/* pole */
+	if (polera) *polera = POLE_RA;
+	if (poledec) *poledec = POLE_DEC;
 
 	/* nothing else if repeat call or just want names */
@@ -91,6 +105,8 @@
 
 	/* set visibilities */
-	moonSVis (eop, jop, md);
+	moonSVis (sop, jop, md);
+	moonPShad (sop, jop, md);
 	moonEVis (md);
+	moonTrans (md);
 
 	/* fill in moon ra and dec */
@@ -168,6 +184,4 @@
 			 */
 {
-#define POLE_RA         degrad(268.05)  /* RA of Jupiter's north pole */
-#define POLE_DEC        degrad(64.50)   /* Dec of Jupiter's north pole */
 #define	dsin(x)	sin(degrad(x))
 #define	dcos(x)	cos(degrad(x))
@@ -296,9 +310,9 @@
 static void
 moonSVis(
-Obj *eop,		/* earth == SUN */
+Obj *sop,		/* SUN */
 Obj *jop,		/* jupiter */
 MoonData md[J_NMOONS])
 {
-	double esd = eop->s_edist;
+	double esd = sop->s_edist;
 	double eod = jop->s_edist;
 	double sod = jop->s_sdist;
@@ -339,4 +353,32 @@
 }
 
+/* set pshad and sx,sy shadow info */
+static void
+moonPShad(
+Obj *sop,		/* SUN */
+Obj *jop,		/* jupiter */
+MoonData md[J_NMOONS])
+{
+	int i;
+
+	for (i = 1; i < J_NMOONS; i++) {
+	    MoonData *mdp = &md[i];
+	    mdp->pshad = !plshadow (jop, sop, POLE_RA, POLE_DEC, mdp->x,
+					    mdp->y, mdp->z, &mdp->sx, &mdp->sy);
+	}
+}
+
+/* set whether moons are transiting */
+static void
+moonTrans (MoonData md[J_NMOONS])
+{
+	int i;
+
+	for (i = 1; i < J_NMOONS; i++) {
+	    MoonData *mdp = &md[i];
+	    mdp->trans = mdp->z > 0 && mdp->x*mdp->x + mdp->y*mdp->y < 1;
+	}
+}
+
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: jupmoon.c,v $ $Date: 2004-06-15 16:54:12 $ $Revision: 1.1 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: jupmoon.c,v $ $Date: 2005-01-17 10:13:05 $ $Revision: 1.2 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/libration.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/libration.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/libration.c	(revision 2643)
@@ -2216,3 +2216,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: libration.c,v $ $Date: 2004-06-15 16:52:39 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: libration.c,v $ $Date: 2005-01-17 10:13:05 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/magdecl.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/magdecl.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/magdecl.c	(revision 2643)
@@ -379,3 +379,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: magdecl.c,v $ $Date: 2004-12-03 10:39:58 $ $Revision: 1.2 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: magdecl.c,v $ $Date: 2005-01-17 10:13:05 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/marsmoon.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/marsmoon.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/marsmoon.c	(revision 2643)
@@ -11,6 +11,8 @@
 static int use_bdl (double JD, char *dir, MoonData md[M_NMOONS]);
 static void moonradec (double msize, MoonData md[M_NMOONS]);
-static void moonSVis (Obj *eop, Obj *mop, MoonData md[M_NMOONS]);
+static void moonSVis (Obj *sop, Obj *mop, MoonData md[M_NMOONS]);
 static void moonEVis (MoonData md[M_NMOONS]);
+static void moonPShad (Obj *sop, Obj *mop, MoonData md[M_NMOONS]);
+static void moonTrans (MoonData md[M_NMOONS]);
 
 /* moon table and a few other goodies and when it was last computed */
@@ -26,8 +28,15 @@
 static char mbdlfn[] = "mars.9910";
 
+/* These values are from the Explanatory Supplement.
+ * Precession degrades them gradually over time.
+ */
+#define POLE_RA         degrad(317.61)
+#define POLE_DEC        degrad(52.85)
+
+
 /* get mars info in md[0], moon info in md[1..M_NMOONS-1].
  * if !dir always use bruton model.
  * if !mop caller just wants md[] for names
- * N.B. we assume eop and mop are updated.
+ * N.B. we assume sop and mop are updated.
  */
 void
@@ -35,7 +44,8 @@
 double Mjd,			/* mjd */
 char dir[],			/* dir in which to look for helper files */
-Obj *eop,			/* earth == Sun */
+Obj *sop,			/* Sun */
 Obj *mop,			/* mars */
 double *sizep,			/* mars's angular diam, rads */
+double *polera, double *poledec,/* pole location */
 MoonData md[M_NMOONS])		/* return info */
 {
@@ -44,4 +54,8 @@
 	/* always copy back at least for name */
 	memcpy (md, mmd, sizeof(mmd));
+
+	/* pole */
+	if (polera) *polera = POLE_RA;
+	if (poledec) *poledec = POLE_DEC;
 
 	/* nothing else if repeat call or just want names */
@@ -81,6 +95,8 @@
 
 	/* set visibilities */
-	moonSVis (eop, mop, md);
+	moonSVis (sop, mop, md);
+	moonPShad (sop, mop, md);
 	moonEVis (md);
+	moonTrans (md);
 
 	/* fill in moon ra and dec */
@@ -167,9 +183,9 @@
 static void
 moonSVis(
-Obj *eop,		/* earth == SUN */
+Obj *sop,		/* SUN */
 Obj *mop,		/* mars */
 MoonData md[M_NMOONS])
 {
-	double esd = eop->s_edist;
+	double esd = sop->s_edist;
 	double eod = mop->s_edist;
 	double sod = mop->s_sdist;
@@ -210,4 +226,33 @@
 }
 
+/* set pshad and sx,sy shadow info */
+static void
+moonPShad(
+Obj *sop,             /* SUN */
+Obj *mop,             /* mars */
+MoonData md[M_NMOONS])
+{
+	int i;
+
+	for (i = 1; i < M_NMOONS; i++) {
+	    MoonData *mdp = &md[i];
+	    mdp->pshad = !plshadow (mop, sop, POLE_RA, POLE_DEC, mdp->x,
+					  mdp->y, mdp->z, &mdp->sx, &mdp->sy);
+	}
+}
+
+/* set whether moons are transiting */
+static void
+moonTrans (MoonData md[M_NMOONS])
+{
+	int i;
+
+	for (i = 1; i < M_NMOONS; i++) {
+	    MoonData *mdp = &md[i];
+	    mdp->trans = mdp->z > 0 && mdp->x*mdp->x + mdp->y*mdp->y < 1;
+	}
+}
+
+
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: marsmoon.c,v $ $Date: 2004-06-15 16:54:12 $ $Revision: 1.1 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: marsmoon.c,v $ $Date: 2005-01-17 10:13:05 $ $Revision: 1.2 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/misc.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/misc.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/misc.c	(revision 2643)
@@ -477,3 +477,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: misc.c,v $ $Date: 2004-06-15 16:52:39 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: misc.c,v $ $Date: 2005-01-17 10:13:05 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/mjd.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/mjd.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/mjd.c	(revision 2643)
@@ -254,3 +254,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: mjd.c,v $ $Date: 2004-06-15 16:52:39 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: mjd.c,v $ $Date: 2005-01-17 10:13:05 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/moon.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/moon.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/moon.c	(revision 2643)
@@ -3463,3 +3463,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: moon.c,v $ $Date: 2004-06-15 16:52:39 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: moon.c,v $ $Date: 2005-01-17 10:13:05 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/mooncolong.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/mooncolong.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/mooncolong.c	(revision 2643)
@@ -234,3 +234,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: mooncolong.c,v $ $Date: 2004-06-15 16:52:39 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: mooncolong.c,v $ $Date: 2005-01-17 10:13:05 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/moonnf.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/moonnf.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/moonnf.c	(revision 2643)
@@ -67,3 +67,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: moonnf.c,v $ $Date: 2004-06-15 16:54:12 $ $Revision: 1.1 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: moonnf.c,v $ $Date: 2005-01-17 10:13:05 $ $Revision: 1.2 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/nutation.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/nutation.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/nutation.c	(revision 2643)
@@ -439,3 +439,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: nutation.c,v $ $Date: 2004-06-15 16:52:39 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: nutation.c,v $ $Date: 2005-01-17 10:13:06 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/obliq.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/obliq.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/obliq.c	(revision 2643)
@@ -25,3 +25,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: obliq.c,v $ $Date: 2004-06-15 16:52:39 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: obliq.c,v $ $Date: 2005-01-17 10:13:06 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/parallactic.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/parallactic.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/parallactic.c	(revision 2643)
@@ -52,3 +52,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: parallactic.c,v $ $Date: 2004-06-15 16:54:12 $ $Revision: 1.1 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: parallactic.c,v $ $Date: 2005-01-17 10:13:06 $ $Revision: 1.2 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/parallax.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/parallax.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/parallax.c	(revision 2643)
@@ -40,3 +40,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: parallax.c,v $ $Date: 2004-06-15 16:52:39 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: parallax.c,v $ $Date: 2005-01-17 10:13:06 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/plans.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/plans.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/plans.c	(revision 2643)
@@ -225,3 +225,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: plans.c,v $ $Date: 2004-06-15 16:52:39 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: plans.c,v $ $Date: 2005-01-17 10:13:06 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/plmoon.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/plmoon.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/plmoon.c	(revision 2643)
@@ -106,4 +106,5 @@
 	MoonData md[X_MAXNMOONS];
 	double sz, t1, t2;
+	double pra, pdec;
 	MoonData *mdp;
 	Obj *planop;
@@ -136,5 +137,5 @@
 
 	    /* don't worry, this already caches based on same mjd */
-	    marsm_data (mjd, moondir, sunop, planop, &sz, md);
+	    marsm_data (mjd, moondir, sunop, planop, &sz, &pra, &pdec, md);
 	    mdp = &md[moonop->pl_moon];
 	    break;
@@ -154,5 +155,5 @@
 
 	    /* don't worry, this already caches based on same mjd */
-	    jupiter_data (mjd, moondir, sunop, planop, &sz, &t1, &t2, md);
+	    jupiter_data (mjd,moondir,sunop,planop,&sz,&t1,&t2,&pra,&pdec,md);
 	    mdp = &md[moonop->pl_moon];
 	    moonop->pl_aux1 = t1;
@@ -178,5 +179,5 @@
 
 	    /* don't worry, this already caches based on same mjd */
-	    saturn_data (mjd, moondir, sunop, planop, &sz, &t1, &t2, md);
+	    saturn_data (mjd,moondir,sunop,planop,&sz,&t1,&t2,&pra,&pdec,md);
 	    mdp = &md[moonop->pl_moon];
 	    moonop->pl_aux1 = t1;
@@ -199,5 +200,5 @@
 
 	    /* don't worry, this already caches based on same mjd */
-	    uranus_data (mjd, moondir, sunop, planop, &sz, md);
+	    uranus_data (mjd, moondir, sunop, planop, &sz, &pra, &pdec, md);
 	    mdp = &md[moonop->pl_moon];
 	    break;
Index: /trunk/SophyaExt/XephemAstroLib/plshadow.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/plshadow.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/plshadow.c	(revision 2643)
@@ -6,5 +6,5 @@
 #define	sqr(x)		((x)*(x))
 
-/* given a time, a planet, the sun, the planet's eq pole position and a
+/* given a planet, the sun, the planet's eq pole position and a
  * position of a satellite (as eq x=+e y=+s z=front in planet radii) find x,y
  * position of shadow.
@@ -12,6 +12,6 @@
  */
 int
-plshadow (Now *np, Obj *op, Obj *sop, double polera, double poledec, double x,
-double y, double z, double *sxp, double *syp)
+plshadow (Obj *op, Obj *sop, double polera, double poledec, double x,
+double y, double z, float *sxp, float *syp)
 {
 	/* equatorial to ecliptic sky-plane rotation */
@@ -48,3 +48,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: plshadow.c,v $ $Date: 2004-06-15 16:54:12 $ $Revision: 1.1 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: plshadow.c,v $ $Date: 2005-01-17 10:13:06 $ $Revision: 1.2 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/precess.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/precess.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/precess.c	(revision 2643)
@@ -144,3 +144,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: precess.c,v $ $Date: 2004-06-15 16:52:39 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: precess.c,v $ $Date: 2005-01-17 10:13:06 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/preferences.h
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/preferences.h	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/preferences.h	(revision 2643)
@@ -29,4 +29,4 @@
 
 /* For RCS Only -- Do Not Edit
- * @(#) $RCSfile: preferences.h,v $ $Date: 2004-06-15 16:52:39 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $
+ * @(#) $RCSfile: preferences.h,v $ $Date: 2005-01-17 10:13:06 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $
  */
Index: /trunk/SophyaExt/XephemAstroLib/reduce.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/reduce.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/reduce.c	(revision 2643)
@@ -76,3 +76,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: reduce.c,v $ $Date: 2004-06-15 16:52:40 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: reduce.c,v $ $Date: 2005-01-17 10:13:06 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/refract.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/refract.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/refract.c	(revision 2643)
@@ -89,3 +89,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: refract.c,v $ $Date: 2004-06-15 16:52:40 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: refract.c,v $ $Date: 2005-01-17 10:13:06 $ $Revision: 1.5 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/rings.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/rings.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/rings.c	(revision 2643)
@@ -43,3 +43,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: rings.c,v $ $Date: 2004-06-15 16:52:40 $ $Revision: 1.2 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: rings.c,v $ $Date: 2005-01-17 10:13:07 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/riset.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/riset.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/riset.c	(revision 2643)
@@ -98,3 +98,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: riset.c,v $ $Date: 2004-06-15 16:52:40 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: riset.c,v $ $Date: 2005-01-17 10:13:07 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/riset_cir.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/riset_cir.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/riset_cir.c	(revision 2643)
@@ -370,3 +370,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: riset_cir.c,v $ $Date: 2004-06-15 16:52:40 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: riset_cir.c,v $ $Date: 2005-01-17 10:13:07 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/satlib.h
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/satlib.h	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/satlib.h	(revision 2643)
@@ -2,5 +2,5 @@
 #define __SATLIB_H
 
-/* $Id: satlib.h,v 1.3 2004-06-15 16:52:40 cmv Exp $ */
+/* $Id: satlib.h,v 1.4 2005-01-17 10:13:07 cmv Exp $ */
 
 typedef struct _SatElem {
@@ -203,4 +203,4 @@
 
 /* For RCS Only -- Do Not Edit
- * @(#) $RCSfile: satlib.h,v $ $Date: 2004-06-15 16:52:40 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $
+ * @(#) $RCSfile: satlib.h,v $ $Date: 2005-01-17 10:13:07 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $
  */
Index: /trunk/SophyaExt/XephemAstroLib/satmoon.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/satmoon.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/satmoon.c	(revision 2643)
@@ -14,4 +14,6 @@
 static void moonSVis (Obj *eop, Obj *sop, MoonData md[S_NMOONS]);
 static void moonEVis (MoonData md[S_NMOONS]);
+static void moonPShad (Obj *eop, Obj *sop, MoonData md[S_NMOONS]);
+static void moonTrans (MoonData md[S_NMOONS]);
 
 /* moon table and a few other goodies and when it was last computed */
@@ -35,4 +37,11 @@
 static char sbdlfn[] = "saturne.9910";
 
+/* These values are from the Explanatory Supplement.
+ * Precession degrades them gradually over time.
+ */
+#define POLE_RA         degrad(40.58)   /* RA of Saturn's north pole */
+#define POLE_DEC        degrad(83.54)   /* Dec of Saturn's north pole */
+
+
 /* get saturn info in md[0], moon info in md[1..S_NMOONS-1].
  * if !dir always use bruton model.
@@ -48,4 +57,5 @@
 double *sizep,			/* saturn's angular diam, rads */
 double *etiltp, double *stiltp,	/* earth and sun tilts -- +S */
+double *polera, double *poledec,/* pole location */
 MoonData md[S_NMOONS])		/* return info */
 {
@@ -54,4 +64,8 @@
 	/* always copy back at least for name */
 	memcpy (md, smd, sizeof(smd));
+
+	/* pole */
+	if (polera) *polera = POLE_RA;
+	if (poledec) *poledec = POLE_DEC;
 
 	/* nothing else if repeat call or just want names */
@@ -94,5 +108,7 @@
 	/* set visibilities */
 	moonSVis (eop, sop, md);
+	moonPShad (eop, sop, md);
 	moonEVis (md);
+	moonTrans (md);
 
 	/* fill in moon ra and dec */
@@ -455,4 +471,33 @@
 }
 
+/* set pshad and sx,sy shadow info */
+static void
+moonPShad(
+Obj *eop,             /* earth == SUN */
+Obj *sop,             /* saturn */
+MoonData md[S_NMOONS])
+{
+	int i;
+
+	for (i = 1; i < S_NMOONS; i++) {
+	    MoonData *mdp = &md[i];
+	    mdp->pshad = !plshadow (sop, eop, POLE_RA, POLE_DEC, mdp->x,
+					  mdp->y, mdp->z, &mdp->sx, &mdp->sy);
+	}
+}
+
+
+/* set whether moons are transiting */
+static void
+moonTrans (MoonData md[S_NMOONS])
+{
+	int i;
+
+	for (i = 1; i < S_NMOONS; i++) {
+	    MoonData *mdp = &md[i];
+	    mdp->trans = mdp->z > 0 && mdp->x*mdp->x + mdp->y*mdp->y < 1;
+	}
+}
+
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: satmoon.c,v $ $Date: 2004-06-15 16:54:12 $ $Revision: 1.1 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: satmoon.c,v $ $Date: 2005-01-17 10:13:07 $ $Revision: 1.2 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/satspec.h
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/satspec.h	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/satspec.h	(revision 2643)
@@ -2,5 +2,5 @@
 #define __SATSPEC_H
 
-/* $Id: satspec.h,v 1.3 2004-06-15 16:52:40 cmv Exp $ */
+/* $Id: satspec.h,v 1.4 2005-01-17 10:13:07 cmv Exp $ */
 
 #include "sattypes.h"
@@ -40,4 +40,4 @@
 
 /* For RCS Only -- Do Not Edit
- * @(#) $RCSfile: satspec.h,v $ $Date: 2004-06-15 16:52:40 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $
+ * @(#) $RCSfile: satspec.h,v $ $Date: 2005-01-17 10:13:07 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $
  */
Index: /trunk/SophyaExt/XephemAstroLib/sattypes.h
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/sattypes.h	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/sattypes.h	(revision 2643)
@@ -2,5 +2,5 @@
 #define __SATTYPES_H
 
-/* $Id: sattypes.h,v 1.3 2004-06-15 16:52:40 cmv Exp $ */
+/* $Id: sattypes.h,v 1.4 2005-01-17 10:13:07 cmv Exp $ */
 
 typedef struct _Vec3 {
@@ -25,4 +25,4 @@
 
 /* For RCS Only -- Do Not Edit
- * @(#) $RCSfile: sattypes.h,v $ $Date: 2004-06-15 16:52:40 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $
+ * @(#) $RCSfile: sattypes.h,v $ $Date: 2005-01-17 10:13:07 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $
  */
Index: /trunk/SophyaExt/XephemAstroLib/sdp4.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/sdp4.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/sdp4.c	(revision 2643)
@@ -428,3 +428,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: sdp4.c,v $ $Date: 2004-06-15 16:52:40 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: sdp4.c,v $ $Date: 2005-01-17 10:13:07 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/sgp4.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/sgp4.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/sgp4.c	(revision 2643)
@@ -399,3 +399,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: sgp4.c,v $ $Date: 2004-06-15 16:52:40 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: sgp4.c,v $ $Date: 2005-01-17 10:13:07 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/sphcart.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/sphcart.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/sphcart.c	(revision 2643)
@@ -41,3 +41,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: sphcart.c,v $ $Date: 2004-06-15 16:52:40 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: sphcart.c,v $ $Date: 2005-01-17 10:13:07 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/sun.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/sun.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/sun.c	(revision 2643)
@@ -42,3 +42,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: sun.c,v $ $Date: 2004-06-15 16:52:40 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: sun.c,v $ $Date: 2005-01-17 10:13:08 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/thetag.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/thetag.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/thetag.c	(revision 2643)
@@ -3,5 +3,5 @@
 #include "deepconst.h"
 
-/* @(#) $Id: thetag.c,v 1.3 2004-06-15 16:52:40 cmv Exp $ */
+/* @(#) $Id: thetag.c,v 1.4 2005-01-17 10:13:08 cmv Exp $ */
 
 
@@ -88,3 +88,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: thetag.c,v $ $Date: 2004-06-15 16:52:40 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: thetag.c,v $ $Date: 2005-01-17 10:13:08 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/twobody.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/twobody.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/twobody.c	(revision 2643)
@@ -241,3 +241,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: twobody.c,v $ $Date: 2004-06-15 16:52:41 $ $Revision: 1.2 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: twobody.c,v $ $Date: 2005-01-17 10:13:08 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/umoon.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/umoon.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/umoon.c	(revision 2643)
@@ -11,6 +11,8 @@
 static int use_bdl (double jd, char *dir, MoonData md[U_NMOONS]);
 static void moonradec (double usize, MoonData md[U_NMOONS]);
-static void moonSVis (Obj *eop, Obj *uop, MoonData md[U_NMOONS]);
+static void moonSVis (Obj *sop, Obj *uop, MoonData md[U_NMOONS]);
 static void moonEVis (MoonData md[U_NMOONS]);
+static void moonPShad (Obj *sop, Obj *uop, MoonData md[U_NMOONS]);
+static void moonTrans (MoonData md[U_NMOONS]);
 
 /* moon table and a few other goodies and when it was last computed */
@@ -29,7 +31,14 @@
 static char ubdlfn[] = "uranus.9910";
 
+/* These values are from the Explanatory Supplement.
+ * Precession degrades them gradually over time.
+ */
+#define POLE_RA         degrad(257.43)  /* RA of Uranus' north pole */
+#define POLE_DEC        degrad(-15.10)  /* Dec of Uranus' north pole */
+
+
 /* get uranus info in md[0], moon info in md[1..U_NMOONS-1].
  * if !uop caller just wants md[] for names
- * N.B. we assume eop and uop are updated.
+ * N.B. we assume sop and uop are updated.
  */
 void
@@ -37,7 +46,8 @@
 double Mjd,		/* mjd */
 char dir[],             /* dir in which to look for helper files */
-Obj *eop,               /* earth == Sun */
+Obj *sop,               /* Sun */
 Obj *uop,		/* uranus */
 double *sizep,		/* u angular diam, rads */
+double *polera, double *poledec,      /* pole location */
 MoonData md[U_NMOONS])	/* return info */
 {
@@ -46,4 +56,8 @@
 	/* always copy back at least for name */
 	memcpy (md, umd, sizeof(umd));
+
+	/* pole */
+	if (polera) *polera = POLE_RA;
+	if (poledec) *poledec = POLE_DEC;
 
 	/* nothing else if repeat call or just want names */
@@ -86,6 +100,8 @@
 
 	/* set visibilities */
-	moonSVis (eop, uop, md);
+	moonSVis (sop, uop, md);
+	moonPShad (sop, uop, md);
 	moonEVis (md);
+	moonTrans (md);
 
 	/* fill in moon ra and dec */
@@ -172,9 +188,9 @@
 static void
 moonSVis(
-Obj *eop,		/* earth == SUN */
+Obj *sop,		/* SUN */
 Obj *uop,		/* uranus */
 MoonData md[U_NMOONS])
 {
-	double esd = eop->s_edist;
+	double esd = sop->s_edist;
 	double eod = uop->s_edist;
 	double sod = uop->s_sdist;
@@ -215,4 +231,33 @@
 }
 
+/* set pshad and sx,sy shadow info */
+static void
+moonPShad(
+Obj *sop,             /* SUN */
+Obj *uop,             /* uranus */
+MoonData md[U_NMOONS])
+{
+	int i;
+
+	for (i = 1; i < U_NMOONS; i++) {
+	    MoonData *mdp = &md[i];
+	    mdp->pshad = !plshadow (uop, sop, POLE_RA, POLE_DEC, mdp->x,
+					  mdp->y, mdp->z, &mdp->sx, &mdp->sy);
+	}
+}
+
+/* set whether moons are transiting */
+static void
+moonTrans (MoonData md[U_NMOONS])
+{
+	int i;
+
+	for (i = 1; i < U_NMOONS; i++) {
+	    MoonData *mdp = &md[i];
+	    mdp->trans = mdp->z > 0 && mdp->x*mdp->x + mdp->y*mdp->y < 1;
+	}
+}
+
+
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: umoon.c,v $ $Date: 2004-06-15 16:54:12 $ $Revision: 1.1 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: umoon.c,v $ $Date: 2005-01-17 10:13:08 $ $Revision: 1.2 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/utc_gst.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/utc_gst.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/utc_gst.c	(revision 2643)
@@ -93,3 +93,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: utc_gst.c,v $ $Date: 2004-06-15 16:52:41 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: utc_gst.c,v $ $Date: 2005-01-17 10:13:08 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/vector.h
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/vector.h	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/vector.h	(revision 2643)
@@ -2,5 +2,5 @@
 #define __SATVECTOR_H
 
-/* $Id: vector.h,v 1.3 2004-06-15 16:52:41 cmv Exp $ */
+/* $Id: vector.h,v 1.4 2005-01-17 10:13:08 cmv Exp $ */
 
 #define dotp(A,B) ((A).x*(B).x+(A).y*(B).y+(A).z*(B).z)
@@ -16,4 +16,4 @@
 
 /* For RCS Only -- Do Not Edit
- * @(#) $RCSfile: vector.h,v $ $Date: 2004-06-15 16:52:41 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $
+ * @(#) $RCSfile: vector.h,v $ $Date: 2005-01-17 10:13:08 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $
  */
Index: /trunk/SophyaExt/XephemAstroLib/vsop87.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/vsop87.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/vsop87.c	(revision 2643)
@@ -207,3 +207,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: vsop87.c,v $ $Date: 2004-06-15 16:52:41 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: vsop87.c,v $ $Date: 2005-01-17 10:13:08 $ $Revision: 1.5 $ $Name: not supported by cvs2svn $"};
Index: /trunk/SophyaExt/XephemAstroLib/vsop87.h
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/vsop87.h	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/vsop87.h	(revision 2643)
@@ -90,4 +90,4 @@
 
 /* For RCS Only -- Do Not Edit
- * @(#) $RCSfile: vsop87.h,v $ $Date: 2004-06-15 16:52:41 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $
+ * @(#) $RCSfile: vsop87.h,v $ $Date: 2005-01-17 10:13:08 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $
  */
Index: /trunk/SophyaExt/XephemAstroLib/vsop87_data.c
===================================================================
--- /trunk/SophyaExt/XephemAstroLib/vsop87_data.c	(revision 2642)
+++ /trunk/SophyaExt/XephemAstroLib/vsop87_data.c	(revision 2643)
@@ -6986,3 +6986,3 @@
 
 /* For RCS Only -- Do Not Edit */
-static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: vsop87_data.c,v $ $Date: 2004-06-15 16:52:41 $ $Revision: 1.3 $ $Name: not supported by cvs2svn $"};
+static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: vsop87_data.c,v $ $Date: 2005-01-17 10:13:08 $ $Revision: 1.4 $ $Name: not supported by cvs2svn $"};
