IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 2, 2008, 8:08:31 AM (18 years ago)
Author:
eugene
Message:

replace poor code with ohana_normalize_angle

Location:
trunk/Ohana/src/addstar/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/addstar/src/FilterStars.c

    r16810 r19823  
    2828
    2929    XY_to_RD (&stars[N].R, &stars[N].D, stars[N].X, stars[N].Y, &image[0].coords);
    30     while (stars[N].R <    0.0) stars[N].R += 360.0;
    31     while (stars[N].R >= 360.0) stars[N].R -= 360.0;
     30    stars[N].R = ohana_normalize_angle (stars[N].R);
    3231    stars[N].found = -1;
    3332    stars[N].code = image[0].photcode;
  • trunk/Ohana/src/addstar/src/ReadImageHeader.c

    r19130 r19823  
    7676  } else {
    7777    /* force image to lie in 0-360 range */
    78     while (image[0].coords.crval1 < 0) image[0].coords.crval1 += 360.0;
    79     while (image[0].coords.crval1 > 360.0) image[0].coords.crval1 -= 360.0;
     78    image[0].coords.crval1 = ohana_normalize_angle (image[0].coords.crval1);
    8079  }
    8180
  • trunk/Ohana/src/addstar/src/grefstars.c

    r17439 r19823  
    2525    dparse (&stars[N].M,  3, line);
    2626    dparse (&stars[N].dM, 4, line);
    27     while (stars[N].R < 0.0) stars[N].R += 360.0;
    28     while (stars[N].R >= 360.0) stars[N].R -= 360.0;
     27    stars[N].R = ohana_normalize_angle (stars[N].R);
    2928    stars[N].t = 0;
    3029    stars[N].code = photcode;
Note: See TracChangeset for help on using the changeset viewer.