Changeset 12070
- Timestamp:
- Feb 26, 2007, 5:14:29 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/dvo-mods-2007-02/Ohana/src/libdvo/src/coordops.update.c
r12008 r12070 86 86 case PROJ_ZEA: 87 87 case PROJ_ZPL: 88 if (R > 2*DEG_RAD) { 89 *ra = L; 90 *dec = M; 91 return (FALSE); 92 } 88 93 stht = 1 - 0.5*SQ(R*RAD_DEG); 89 94 ctht = sqrt (1 - stht*stht); … … 110 115 111 116 /**** Other Conventional Projections ****/ 112 if (mode == PROJ_MODE_ ZENITHAL) {117 if (mode == PROJ_MODE_PSEUDOCLY) { 113 118 switch (proj) { 114 119 case PROJ_AIT: … … 119 124 delta = DEG_RAD * asin (RAD_DEG*M*Z); 120 125 break; 121 126 122 127 case PROJ_GLS: 123 128 /* L,M in degrees, alpha,delta in degrees */ … … 213 218 214 219 /**** Other Standard Projections ****/ 215 if (PseudoCyl) { 216 if (!strcmp(type, "-AIT")) { 217 phi = RAD_DEG*(ra - coords[0].crval1); 218 theta = RAD_DEG*(dec - coords[0].crval2); 219 P = 1.0 + cos (theta) * cos (0.5*phi); 220 if (P != 0.0) { 221 A = DEG_RAD * sqrt (2.0 / P); 222 L = 2.0 * A * cos (theta) * sin (0.5*phi); 223 M = A * sin (theta); 224 } else { 225 L = 0.0; 226 M = 0.0; 227 } 228 } 229 if (!strcmp(type, "-GLS")) { 230 phi = ra - coords[0].crval1; 231 theta = dec - coords[0].crval2; 232 L = phi * cos(RAD_DEG * theta); 233 M = theta; 234 } 235 if (!strcmp(type, "-PAR")) { 236 phi = ra - coords[0].crval1; 237 theta = dec - coords[0].crval2; 238 L = phi * (2.0*cos(2*RAD_DEG*theta/3.0) - 1); 239 M = 180.0 * sin (RAD_DEG*theta/3.0); 220 if (mode == PROJ_MODE_PSEUDOCYL) { 221 switch (proj) { 222 case PROJ_AIT: 223 phi = RAD_DEG*(ra - coords[0].crval1); 224 theta = RAD_DEG*(dec - coords[0].crval2); 225 P = 1.0 + cos (theta) * cos (0.5*phi); 226 if (P != 0.0) { 227 A = DEG_RAD * sqrt (2.0 / P); 228 L = 2.0 * A * cos (theta) * sin (0.5*phi); 229 M = A * sin (theta); 230 } else { 231 L = 0.0; 232 M = 0.0; 233 } 234 break; 235 case PROJ_GLS: 236 phi = ra - coords[0].crval1; 237 theta = dec - coords[0].crval2; 238 L = phi * cos(RAD_DEG * theta); 239 M = theta; 240 break; 241 case PROJ_PAR: 242 phi = ra - coords[0].crval1; 243 theta = dec - coords[0].crval2; 244 L = phi * (2.0*cos(2*RAD_DEG*theta/3.0) - 1); 245 M = 180.0 * sin (RAD_DEG*theta/3.0); 246 break; 240 247 } 241 248 } … … 261 268 dL = (L - Lo); 262 269 dM = (M - Mo); 263 // fprintf (stderr, "%d: %f,%f : %f,%f : %f,%f : %f,%f\n", i, L, M, X, Y, Lo, Mo, dL, dM);264 270 265 271 X += determ * (coords[0].pc2_2*dL - coords[0].pc1_2*dM); … … 273 279 274 280 return (status); 275 276 281 } 277 282 … … 651 656 case PROJ_GLS: 652 657 case PROJ_PAR: 653 return PROJ_MODE EUDOCLY;658 return PROJ_MODE_PSEUDOCLY; 654 659 } 655 660 return PROJ_MODE_NONE;
Note:
See TracChangeset
for help on using the changeset viewer.
