Changeset 34584 for trunk/Ohana/src/opihi/cmd.astro/cplot.c
- Timestamp:
- Oct 25, 2012, 10:26:16 AM (14 years ago)
- Location:
- trunk/Ohana/src/opihi/cmd.astro
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/cmd.astro
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20120905/Ohana/src/opihi/cmd.astro merged: 34468,34490,34521,34569,34575
- Property svn:mergeinfo changed
-
trunk/Ohana/src/opihi/cmd.astro/cplot.c
r21153 r34584 3 3 int cplot (int argc, char **argv) { 4 4 5 double ra_prev; 5 6 int i, kapa, Npts, status, leftside; 6 7 opihi_flt *x, *y, *r, *d, Rmin, Rmax, Rmid; … … 41 42 Npts = 0; 42 43 for (i = 0; i < Xvec.Nelements; i++, r++, d++) { 43 *r= ohana_normalize_angle (*r);44 while ( *r < Rmin) *r+= 360.0;45 while ( *r > Rmax) *r-= 360.0;44 double ra = ohana_normalize_angle (*r); 45 while (ra < Rmin) ra += 360.0; 46 while (ra > Rmax) ra -= 360.0; 46 47 47 48 // for pair-by-pair connections, check on second point if we straddle the back midline 48 if ((graphmode.ptype == 100) && (i % 2)) { 49 leftside = (r[-1] < Rmid); // if first of the pair is left, second must be as well 50 if ( leftside && (r[0] > Rmid + 90)) { r[0] -= 360.0; } 51 if (!leftside && (r[0] < Rmid - 90)) { r[0] += 360.0; } 49 if (graphmode.ptype == 100) { 50 if (i % 2) { 51 leftside = (ra_prev < Rmid); // if first of the pair is left, second must be as well 52 if ( leftside && (ra > Rmid + 90)) { ra -= 360.0; } 53 if (!leftside && (ra < Rmid - 90)) { ra += 360.0; } 54 } else { 55 ra_prev = ra; 56 } 52 57 } 53 status = RD_to_XY (x, y, *r, *d, &graphmode.coords);58 status = RD_to_XY (x, y, ra, *d, &graphmode.coords); 54 59 55 60 // if we fail on one of the points, drop the corresponding pair … … 78 83 79 84 graphmode.etype = 0; 80 PlotVectorPair (kapa, &Xvec, &Yvec, &graphmode);85 PlotVectorPair (kapa, &Xvec, &Yvec, NULL, &graphmode); 81 86 82 87 free (Xvec.elements.Ptr);
Note:
See TracChangeset
for help on using the changeset viewer.
