Changeset 14066
- Timestamp:
- Jul 8, 2007, 10:16:49 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/cmd.astro/cplot.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/cmd.astro/cplot.c
r13479 r14066 3 3 int cplot (int argc, char **argv) { 4 4 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; 7 7 Vector Xvec, Yvec, *xvec, *yvec; 8 8 Graphdata graphmode; … … 17 17 Rmin = graphmode.coords.crval1 - 182.0; 18 18 Rmax = graphmode.coords.crval1 + 182.0; 19 Rmid = 0.5*(Rmin + Rmax); 19 20 20 21 /* find vectors */ … … 42 43 while (*r < Rmin) *r += 360.0; 43 44 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 } 44 52 status = fRD_to_XY (x, y, *r, *d, &graphmode.coords); 53 54 // if we fail on one of the points, drop the corresponding pair 45 55 if (!status) { 46 56 if (graphmode.ptype == 100) {
Note:
See TracChangeset
for help on using the changeset viewer.
