Index: trunk/Ohana/src/opihi/cmd.astro/csystem.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/csystem.c	(revision 39926)
+++ trunk/Ohana/src/opihi/cmd.astro/csystem.c	(revision 41305)
@@ -12,4 +12,14 @@
   Vector *uxvec = NULL;
   Vector *uyvec = NULL;
+
+  int Quiet = FALSE;
+  if ((N = get_argument (argc, argv, "-q"))) {
+    Quiet = TRUE;
+    remove_argument (N, &argc, argv);
+  }
+  if ((N = get_argument (argc, argv, "-quiet"))) {
+    Quiet = TRUE;
+    remove_argument (N, &argc, argv);
+  }
 
   // transform proper motions at the same time
@@ -84,7 +94,45 @@
 
     if (uXname) {
-      gprint (GP_LOG, "%10.6f %10.6f @ %10.6f %10.6f\n", x, y, ux, uy);
+      if (!Quiet) {
+	gprint (GP_LOG, "%10.6f %10.6f @ %10.6f %10.6f\n", x, y, ux, uy);
+	switch (output) {
+	  case COORD_CELESTIAL:
+	    set_variable ("uR", ux);
+	    set_variable ("uD", uy);
+	    break;
+	  case COORD_ECLIPTIC:
+	    set_variable ("uL", ux);
+	    set_variable ("uB", uy);
+	    break;
+	  case COORD_GALACTIC:
+	  case COORD_GALACTIC_REID_2004:
+	    set_variable ("uLon", ux);
+	    set_variable ("uLat", uy);
+	    break;
+	  default:
+	    break;
+	}
+      }
     } else {
-      gprint (GP_LOG, "%10.6f %10.6f\n", x, y);
+      if (!Quiet) {
+	gprint (GP_LOG, "%10.6f %10.6f\n", x, y);
+      }
+    }
+    switch (output) {
+      case COORD_CELESTIAL:
+	set_variable ("RA", x);
+	set_variable ("DEC", y);
+	break;
+      case COORD_ECLIPTIC:
+	set_variable ("Lambda", x);
+	set_variable ("Beta", y);
+	break;
+      case COORD_GALACTIC:
+      case COORD_GALACTIC_REID_2004:
+	set_variable ("gLon", x);
+	set_variable ("gLat", y);
+	break;
+      default:
+	break;
     }
     free (transform);
@@ -154,4 +202,9 @@
   gprint (GP_ERR, " e.g.   : csystem C G R D -pm uR uD -> R D will contain glon, glat; uR, uD will contain uL, uB\n");
   gprint (GP_ERR, " e.g.   : csystem C G R D -pmback uL uB -> R D will contain glon, glat; uL, uB will contain uR, uD\n");
+  gprint (GP_ERR, "        :  if input values are vectors, their values are replaced with the transformed values\n");
+  gprint (GP_ERR, "        :  if input values are scalars, the transformed coordinates are printed (disable with -q)\n");
+  gprint (GP_ERR, "        :    and the following output variables will be set (names depend on output system)\n");
+  gprint (GP_ERR, "        :  output positions (RA, DEC), (Lambda, Beta), (gLon, gLat)\n");
+  gprint (GP_ERR, "        :  output motions   (uR, uD),  (uL, uB),       (uLon, uLat)\n");
   return FALSE;
 }
