Changeset 34521 for branches/eam_branches/ipp-20120905/Ohana/src/opihi
- Timestamp:
- Oct 7, 2012, 1:12:18 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20120905/Ohana/src/opihi/cmd.astro/cplot.c
r34490 r34521 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
Note:
See TracChangeset
for help on using the changeset viewer.
