Changeset 8242
- Timestamp:
- Aug 8, 2006, 3:51:28 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/libdvo/src/coordops.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/libdvo/src/coordops.c
r8127 r8242 20 20 type = &coords[0].ctype[4]; 21 21 22 /* DIS is equiv to TAN with higher order terms 23 PLY is cartesian with higher order terms 22 /* PLY is equiv to LIN with higher order terms 23 ZPL is equiv to ZEA with higher order terms 24 DIS is equiv to TAN with higher order terms 24 25 WRP is equiv to PLY, with implied mosaic */ 25 26 26 Polynomial = !strcmp(type, "-PLY") || !strcmp(type, "-DIS") || !strcmp(type, "-WRP") ;27 Polynomial = !strcmp(type, "-PLY") || !strcmp(type, "-DIS") || !strcmp(type, "-WRP") || !strcmp(type, "-ZPL"); 27 28 Cartesian = !strcmp(type, "-LIN") || !strcmp(type, "-PLY") || !strcmp(type, "-WRP") || !strcmp(&coords[0].ctype[0], "GENE"); 28 29 PseudoCyl = !strcmp(type, "-AIT") || !strcmp(type, "-GLS") || !strcmp(type, "-PAR"); 29 30 Zenith1 = !strcmp(type, "-DIS") || !strcmp(type, "-TAN") || !strcmp(type, "-STG"); 30 31 Zenith2 = !strcmp(type, "-SIN") || !strcmp(&coords[0].ctype[0], "MM"); 31 Zenithal = !strcmp(type, "-ZEA") || Zenith1 || Zenith2;32 Zenithal = !strcmp(type, "-ZEA") || !strcmp(type, "-ZPL") || Zenith1 || Zenith2; 32 33 if (!Zenithal && !Cartesian && !PseudoCyl) return (FALSE); 33 34 … … 90 91 stht = sqrt (1 - ctht*ctht); 91 92 } 92 if (!strcmp(type, "-ZEA") ) {93 if (!strcmp(type, "-ZEA") || !strcmp(type, "-ZPL")) { 93 94 stht = 1 - 0.5*SQ(R*RAD_DEG); 94 95 ctht = sqrt (1 - stht*stht); … … 166 167 L = M = 0; 167 168 168 Polynomial = !strcmp(type, "-PLY") || !strcmp(type, "-DIS") || !strcmp(type, "-WRP") ;169 Polynomial = !strcmp(type, "-PLY") || !strcmp(type, "-DIS") || !strcmp(type, "-WRP") || !strcmp(type, "-ZPL"); 169 170 Cartesian = !strcmp(type, "-LIN") || !strcmp(type, "-PLY") || !strcmp(type, "-WRP") || !strcmp(&coords[0].ctype[0], "GENE"); 170 171 PseudoCyl = !strcmp(type, "-AIT") || !strcmp(type, "-GLS") || !strcmp(type, "-PAR"); 171 172 Zenith1 = !strcmp(type, "-DIS") || !strcmp(type, "-TAN") || !strcmp(type, "-STG"); 172 173 Zenith2 = !strcmp(type, "-SIN") || !strcmp(&coords[0].ctype[0], "MM"); 173 Zenithal = !strcmp(type, "-ZEA") || Zenith1 || Zenith2;174 Zenithal = !strcmp(type, "-ZEA") || !strcmp(type, "-ZPL") || Zenith1 || Zenith2; 174 175 if (!Zenithal && !Cartesian && !PseudoCyl) return (FALSE); 175 176 … … 209 210 M = -DEG_RAD * cphi; 210 211 } 211 if (!strcmp(type, "-ZEA") ) {212 if (!strcmp(type, "-ZEA") || !strcmp(type, "-ZPL")) { 212 213 Rc = DEG_RAD * M_SQRT2 / sqrt (1 + stht); 213 214 L = Rc * sphi; … … 253 254 /** extra polynomial terms **/ 254 255 if (Polynomial) { 255 for (i = 0; i < 3; i++) {256 for (i = 0; i < 10; i++) { 256 257 Lo = (X*coords[0].pc1_1 + Y*coords[0].pc1_2); 257 258 Mo = (X*coords[0].pc2_1 + Y*coords[0].pc2_2); … … 266 267 dL = (L - Lo); 267 268 dM = (M - Mo); 269 // fprintf (stderr, "%d: %f,%f : %f,%f : %f,%f : %f,%f\n", i, L, M, X, Y, Lo, Mo, dL, dM); 268 270 269 271 X += determ * (coords[0].pc2_2*dL - coords[0].pc1_2*dM); 270 Y += determ * (coords[0].pc1_1*dM - coords[0].pc2_1*d L);272 Y += determ * (coords[0].pc1_1*dM - coords[0].pc2_1*dM); 271 273 } 272 274 }
Note:
See TracChangeset
for help on using the changeset viewer.
