Changeset 40581 for trunk/Ohana/src/opihi/dvo/find_matches.c
- Timestamp:
- Dec 10, 2018, 5:05:32 PM (8 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/dvo/find_matches.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/dvo/find_matches.c
r40523 r40581 213 213 for (i = 0; i < Npoints; i++) { 214 214 inCatalog[i] = FALSE; 215 if (RAvec->elements.Flt[i] < Rmin) continue; 216 if (RAvec->elements.Flt[i] > Rmax) continue; 215 216 // we need to worry about points near the 0,360 boundary. I have expanded Rmin and 217 // Rmax to account for the RADIUS. if I have a region which is close to the boundary, 218 // then: Rmin < 0 or Rmax > 360. if so, check on the other side as well 219 220 int altTest = FALSE; 221 double Rnorm = ohana_normalize_angle (RAvec->elements.Flt[i]); 222 if ((Rmax > 360.0) && (Rnorm < 180.0)) { 223 double Rtest = Rnorm + 360.0; 224 if (Rtest < Rmin) continue; 225 if (Rtest > Rmax) continue; 226 altTest = TRUE; 227 } 228 if ((Rmin < 0.0) && (Rnorm > 180.0)) { 229 double Rtest = Rnorm - 360.0; 230 if (Rtest < Rmin) continue; 231 if (Rtest > Rmax) continue; 232 altTest = TRUE; 233 } 234 if (!altTest) { 235 if (Rnorm < Rmin) continue; 236 if (Rnorm > Rmax) continue; 237 } 238 217 239 if (DECvec->elements.Flt[i] < Dmin) continue; 218 240 if (DECvec->elements.Flt[i] > Dmax) continue;
Note:
See TracChangeset
for help on using the changeset viewer.
