IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 30, 2008, 7:45:21 AM (18 years ago)
Author:
eugene
Message:

modify functions to use both int and flt vectors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20081124/Ohana/src/opihi/dvo/pmeasure.c

    r20839 r20857  
    1414  unsigned photFlagChoice, photFlagClip;
    1515  int PhotcodeClip;
    16   opihi_flt *Xvec, *Yvec, *Zvec;
     16  float *Xvec, *Yvec, *Zvec;
    1717  time_t tzero, tend;
    1818  void *Signal;
     
    169169  Npts = 0;
    170170  NPTS = 1000;
    171   ALLOCATE (Xvec, opihi_flt, NPTS);
    172   ALLOCATE (Yvec, opihi_flt, NPTS);
    173   ALLOCATE (Zvec, opihi_flt, NPTS);
     171  ALLOCATE (Xvec, float, NPTS);
     172  ALLOCATE (Yvec, float, NPTS);
     173  ALLOCATE (Zvec, float, NPTS);
    174174
    175175  // prepare to handle interrupt signals
     
    218218          free (date);
    219219        }
    220         status = RD_to_XY (&Xvec[Npts], &Yvec[Npts], R, D, &graphmode.coords);
     220        status = fRD_to_XY (&Xvec[Npts], &Yvec[Npts], R, D, &graphmode.coords);
    221221        if (!status) continue;
    222222        Npts ++;
    223223
    224224        if (Npts == NPTS - 1) {
    225             NPTS += 1000;
    226             REALLOCATE (Xvec, opihi_flt, NPTS);
    227             REALLOCATE (Yvec, opihi_flt, NPTS);
    228             REALLOCATE (Zvec, opihi_flt, NPTS);
     225          NPTS += 1000;
     226          REALLOCATE (Xvec, float, NPTS);
     227          REALLOCATE (Yvec, float, NPTS);
     228          REALLOCATE (Zvec, float, NPTS);
    229229        }
    230230        if ((Npts > NCHUNK) || (Nloaded >= 25)) {
    231             PlotVectorTriplet (kapa, Npts, Xvec, Yvec, Zvec, &graphmode);
    232             Npts = 0;
    233             Nloaded = 0;
     231          KapaPrepPlot (kapa, Npts, graphmode);
     232          KapaPlotVector (kapa, Npts, Xvec, "x");
     233          KapaPlotVector (kapa, Npts, Yvec, "y");
     234          KapaPlotVector (kapa, Npts, Zvec, "z");
     235          Npts = 0;
     236          Nloaded = 0;
    234237        }
    235238      }
     
    238241    dvo_catalog_free (&catalog);
    239242  }
    240   if (Npts > 0) PlotVectorTriplet (kapa, Npts, Xvec, Yvec, Zvec, &graphmode);
    241 
     243  if (Npts > 0) {
     244    KapaPrepPlot (kapa, Npts, graphmode);
     245    KapaPlotVector (kapa, Npts, Xvec, "x");
     246    KapaPlotVector (kapa, Npts, Yvec, "y");
     247    KapaPlotVector (kapa, Npts, Zvec, "z");
     248  }
    242249  free (Xvec);
    243250  free (Yvec);
Note: See TracChangeset for help on using the changeset viewer.