IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 14066


Ignore:
Timestamp:
Jul 8, 2007, 10:16:49 AM (19 years ago)
Author:
eugene
Message:

pair-by-pair plotting handles backside boundary

File:
1 edited

Legend:

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

    r13479 r14066  
    33int cplot (int argc, char **argv) {
    44 
    5   int i, kapa, Npts, status;
    6   float *x, *y, *r, *d, Rmin, Rmax;
     5  int i, kapa, Npts, status, leftside;
     6  float *x, *y, *r, *d, Rmin, Rmax, Rmid;
    77  Vector Xvec, Yvec, *xvec, *yvec;
    88  Graphdata graphmode;
     
    1717  Rmin = graphmode.coords.crval1 - 182.0;
    1818  Rmax = graphmode.coords.crval1 + 182.0;
     19  Rmid = 0.5*(Rmin + Rmax);
    1920
    2021  /* find vectors */
     
    4243    while (*r < Rmin) *r += 360.0;
    4344    while (*r > Rmax) *r -= 360.0;
     45
     46    // for pair-by-pair connections, check on second point if we straddle the back midline
     47    if ((graphmode.ptype == 100) && (i % 2)) {
     48      leftside = (r[-1] < Rmid); // if first of the pair is left, second must be as well
     49      if ( leftside && (r[0] > Rmid + 90)) { r[0] -= 360.0; }
     50      if (!leftside && (r[0] < Rmid - 90)) { r[0] += 360.0; }
     51    }
    4452    status = fRD_to_XY (x, y, *r, *d, &graphmode.coords);
     53
     54    // if we fail on one of the points, drop the corresponding pair
    4555    if (!status) {
    4656      if (graphmode.ptype == 100) {
Note: See TracChangeset for help on using the changeset viewer.