IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 16, 2006, 10:58:49 PM (20 years ago)
Author:
eugene
Message:

major updates to use gprint for buffered / threaded printing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/cmd.astro/getvel.c

    r7080 r7917  
    1313
    1414  if (argc != 5) {
    15     fprintf (stderr, "USAGE: rotcurve buf X Y curve.txt\n");
     15    gprint (GP_ERR, "USAGE: rotcurve buf X Y curve.txt\n");
    1616    return (FALSE);
    1717  }
     
    1919  f = fopen (argv[4], "r");
    2020  if (f == (FILE *) NULL) {
    21     fprintf (stderr, "can't find rotation curve data file %s\n", argv[4]);
     21    gprint (GP_ERR, "can't find rotation curve data file %s\n", argv[4]);
    2222    return (FALSE);
    2323  }
     
    4545  while (L >= 360) {L -= 360.0;}
    4646  while (L < 0.0)  {L += 360.0;}
    47   fprintf (stderr, "L: %f\n", L);
     47  gprint (GP_ERR, "L: %f\n", L);
    4848
    4949  cl = cos (L*RAD_DEG);
     
    5959  for (n = 0; (n < Ncurve) && (wr < W[n]); n++);
    6060  if ((n == 0) || (n == Ncurve)) {
    61     fprintf (stderr, "velocity out of reasonable range\n");
    62     fprintf (stderr, "%f %f %f %f\n", V, wr, W[0], W[Ncurve-1]);
     61    gprint (GP_ERR, "velocity out of reasonable range\n");
     62    gprint (GP_ERR, "%f %f %f %f\n", V, wr, W[0], W[Ncurve-1]);
    6363    return (TRUE);
    6464  }
     
    6666  fr = (Ro/r);
    6767  if (r < fabs(Rs)) { /* can't be on rotation curve */
    68     fprintf (stderr, "velocity out of reasonable range\n");
    69     fprintf (stderr, "%f %f %f %f %f %f %f\n", V, wr, W[0], W[Ncurve-1], r, fr, Rs);
     68    gprint (GP_ERR, "velocity out of reasonable range\n");
     69    gprint (GP_ERR, "%f %f %f %f %f %f %f\n", V, wr, W[0], W[Ncurve-1], r, fr, Rs);
    7070    return (TRUE);
    7171  }
     
    7575    d = Ro*cl + sqrt(r*r - Rs*Rs);
    7676 
    77   fprintf (stderr, "dist: %f, vel: %f\n", d, V);
     77  gprint (GP_ERR, "dist: %f, vel: %f\n", d, V);
    7878
    7979  return (TRUE);
Note: See TracChangeset for help on using the changeset viewer.