Changeset 3627 for branches/rel5/psLib/test/astronomy/tst_psAstrometry01.c
- Timestamp:
- Apr 1, 2005, 10:55:58 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/rel5/psLib/test/astronomy/tst_psAstrometry01.c
r3569 r3627 5 5 * @author GLG, MHPCC 6 6 * 7 * @version $Revision: 1.16 $ $Name: not supported by cvs2svn $8 * @date $Date: 2005-0 3-30 23:22:39$7 * @version $Revision: 1.16.2.1 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2005-04-01 20:55:58 $ 9 9 * 10 10 * XXX: Must test … … 258 258 for (j=0;j<X_NUM_COLS;j++) { 259 259 if ((tmp->x)[i][j] != x->data.F64[i][j]) { 260 printf("ERROR: (tmp->x)[%d][%d] is % f, should be %f\n", i, j,260 printf("ERROR: (tmp->x)[%d][%d] is %.2f, should be %.2f\n", i, j, 261 261 (tmp->x)[i][j], x->data.F64[i][j]); 262 262 testStatus = 1; … … 274 274 for (j=0;j<Y_NUM_COLS;j++) { 275 275 if ((tmp->y)[i][j] != y->data.F64[i][j]) { 276 printf("ERROR: (tmp->y)[%d][%d] is % f, should be %f\n", i, j,276 printf("ERROR: (tmp->y)[%d][%d] is %.2f, should be %.2f\n", i, j, 277 277 (tmp->y)[i][j], y->data.F64[i][j]); 278 278 … … 292 292 } 293 293 if (tmp->x0 != X0) { 294 printf("ERROR: tmp->x0 is % f, should be %f\n", tmp->x0, X0);294 printf("ERROR: tmp->x0 is %.2f, should be %.2f\n", tmp->x0, X0); 295 295 testStatus = 1; 296 296 } 297 297 if (tmp->xScale != X_SCALE) { 298 printf("ERROR: tmp->xScale is % f, should be %f\n", tmp->xScale, X_SCALE);298 printf("ERROR: tmp->xScale is %.2f, should be %.2f\n", tmp->xScale, X_SCALE); 299 299 testStatus = 1; 300 300 } … … 306 306 } 307 307 if (tmp->y0 != Y0) { 308 printf("ERROR: tmp->y0 is % f, should be %f\n", tmp->y0, Y0);308 printf("ERROR: tmp->y0 is %.2f, should be %.2f\n", tmp->y0, Y0); 309 309 testStatus = 1; 310 310 } 311 311 if (tmp->yScale != Y_SCALE) { 312 printf("ERROR: tmp->yScale is % f, should be %f\n", tmp->yScale, Y_SCALE);312 printf("ERROR: tmp->yScale is %.2f, should be %.2f\n", tmp->yScale, Y_SCALE); 313 313 testStatus = 1; 314 314 } … … 336 336 337 337 if (grom->height != HEIGHT) { 338 printf("ERROR: grom->height is % f, should be %f\n", grom->height, HEIGHT);338 printf("ERROR: grom->height is %.2f, should be %.2f\n", grom->height, HEIGHT); 339 339 testStatus = 1; 340 340 } 341 341 if (grom->temperature != TEMPERATURE) { 342 printf("ERROR: grom->temperature is % f, should be %f\n", grom->temperature, TEMPERATURE);342 printf("ERROR: grom->temperature is %.2f, should be %.2f\n", grom->temperature, TEMPERATURE); 343 343 testStatus = 2; 344 344 } 345 345 346 346 if (grom->pressure != PRESSURE) { 347 printf("ERROR: grom->pressure is % f, should be %f\n", grom->pressure, PRESSURE);347 printf("ERROR: grom->pressure is %.2f, should be %.2f\n", grom->pressure, PRESSURE); 348 348 testStatus = 3; 349 349 } 350 350 351 351 if (grom->humidity != HUMIDITY) { 352 printf("ERROR: grom->humidity is % f, should be %f\n", grom->humidity, HUMIDITY);352 printf("ERROR: grom->humidity is %.2f, should be %.2f\n", grom->humidity, HUMIDITY); 353 353 testStatus = 4; 354 354 } 355 355 356 356 if (grom->wavelength != WAVELENGTH) { 357 printf("ERROR: grom->wavelength is % f, should be %f\n", grom->wavelength, WAVELENGTH);357 printf("ERROR: grom->wavelength is %.2f, should be %.2f\n", grom->wavelength, WAVELENGTH); 358 358 testStatus = 5; 359 359 } 360 360 361 361 if (grom->lapseRate != LAPSERATE) { 362 printf("ERROR: grom->lapseRate is % f, should be %f\n", grom->lapseRate, LAPSERATE);362 printf("ERROR: grom->lapseRate is %.2f, should be %.2f\n", grom->lapseRate, LAPSERATE); 363 363 testStatus = 6; 364 364 } … … 369 369 370 370 if (grom-> != ) { 371 printf("ERROR: grom-> is % f, should be %f\n", grom->, );371 printf("ERROR: grom-> is %.2f, should be %.2f\n", grom->, ); 372 372 testStatus = 1; 373 373 } 374 374 */ 375 375 376 printf("grom->latitude is % f\n", grom->latitude);377 printf("grom->sinLat is % f\n", grom->sinLat);378 printf("grom->cosLat is % f\n", grom->cosLat);379 printf("grom->abberationMag is % f\n", grom->abberationMag);380 printf("grom->height is % f\n", grom->height);381 printf("grom->temperature is % f\n", grom->temperature);382 printf("grom->pressure is % f\n", grom->pressure);383 printf("grom->humidity is % f\n", grom->humidity);384 printf("grom->wavelength is % f\n", grom->wavelength);385 printf("grom->lapseRate is % f\n", grom->lapseRate);386 printf("grom->refractA is % f\n", grom->refractA);387 printf("grom->refractB is % f\n", grom->refractB);388 printf("grom->longitudeOffset is % f\n", grom->longitudeOffset);389 // printf("grom->siderealTime is % f\n", grom->siderealTime);376 printf("grom->latitude is %.2f\n", grom->latitude); 377 printf("grom->sinLat is %.2f\n", grom->sinLat); 378 printf("grom->cosLat is %.2f\n", grom->cosLat); 379 printf("grom->abberationMag is %.2f\n", grom->abberationMag); 380 printf("grom->height is %.2f\n", grom->height); 381 printf("grom->temperature is %.2f\n", grom->temperature); 382 printf("grom->pressure is %.2f\n", grom->pressure); 383 printf("grom->humidity is %.2f\n", grom->humidity); 384 printf("grom->wavelength is %.2f\n", grom->wavelength); 385 printf("grom->lapseRate is %.2f\n", grom->lapseRate); 386 printf("grom->refractA is %.2f\n", grom->refractA); 387 printf("grom->refractB is %.2f\n", grom->refractB); 388 printf("grom->longitudeOffset is %.2f\n", grom->longitudeOffset); 389 // printf("grom->siderealTime is %.2f\n", grom->siderealTime); 390 390 391 391 psFree(now); … … 461 461 fpaCoord.x = (double) xFPA; 462 462 fpaCoord.y = (double) y; 463 //printf("------------------ (% f, %f) ------------------\n", fpaCoord.x, fpaCoord.y);463 //printf("------------------ (%.2f, %.2f) ------------------\n", fpaCoord.x, fpaCoord.y); 464 464 psChip* tmpChip = psChipInFPA(&fpaCoord, myFPA); 465 465 myCell = psCellInFPA(&fpaCoord, myFPA); … … 477 477 478 478 if (x != (psS32) cellCoord.x) { 479 printf("ERROR: x coord was % f, should be %d\n", cellCoord.x, x);479 printf("ERROR: x coord was %.2f, should be %d\n", cellCoord.x, x); 480 480 } 481 481 if (y != (psS32) cellCoord.y) { 482 printf("ERROR: y coord was % f, should be %d\n", cellCoord.y, y);482 printf("ERROR: y coord was %.2f, should be %d\n", cellCoord.y, y); 483 483 } 484 484 485 485 psCoordCellToChip(&testCoord, &cellCoord, myCell); 486 486 if (testCoord.x != chipCoord.x) { 487 printf("ERROR: psCoordCellToChip() x coord was % f, should be %d\n", cellCoord.x, x);487 printf("ERROR: psCoordCellToChip() x coord was %.2f, should be %d\n", cellCoord.x, x); 488 488 } 489 489 if (testCoord.y != chipCoord.y) { 490 printf("ERROR: psCoordCellToChip() y coord was % f, should be %d\n", cellCoord.y, y);490 printf("ERROR: psCoordCellToChip() y coord was %.2f, should be %d\n", cellCoord.y, y); 491 491 } 492 492 … … 501 501 psCoordChipToFPA(&testCoord, &chipCoord, tmpChip); 502 502 if (testCoord.x != xFPA) { 503 printf("ERROR: psCoordChipToFPA() x coord was % f, should be %d\n", cellCoord.x, x);503 printf("ERROR: psCoordChipToFPA() x coord was %.2f, should be %d\n", cellCoord.x, x); 504 504 } 505 505 if (testCoord.y != y) { 506 printf("ERROR: psCoordChipToFPA() y coord was % f, should be %d\n", cellCoord.y, y);506 printf("ERROR: psCoordChipToFPA() y coord was %.2f, should be %d\n", cellCoord.y, y); 507 507 } 508 508 509 509 psCoordFPAToTP(&testCoord, &fpaCoord, 0.0, 0.0, myFPA); 510 510 if (testCoord.x != fpaCoord.x) { 511 printf("ERROR: psCoordFPAToTP() x coord was % f, should be %d\n", cellCoord.x, x);511 printf("ERROR: psCoordFPAToTP() x coord was %.2f, should be %d\n", cellCoord.x, x); 512 512 } 513 513 if (testCoord.y != fpaCoord.y) { 514 printf("ERROR: psCoordFPAToTP() y coord was % f, should be %d\n", cellCoord.y, y);514 printf("ERROR: psCoordFPAToTP() y coord was %.2f, should be %d\n", cellCoord.y, y); 515 515 } 516 516 517 517 psCoordCellToFPA(&testCoord, &cellCoord, myCell); 518 518 if (testCoord.x != fpaCoord.x) { 519 printf("ERROR: psCoordFPAToTP() x coord was % f, should be %d\n", cellCoord.x, x);519 printf("ERROR: psCoordFPAToTP() x coord was %.2f, should be %d\n", cellCoord.x, x); 520 520 } 521 521 if (testCoord.y != fpaCoord.y) { 522 printf("ERROR: psCoordFPAToTP() y coord was % f, should be %d\n", cellCoord.y, y);522 printf("ERROR: psCoordFPAToTP() y coord was %.2f, should be %d\n", cellCoord.y, y); 523 523 } 524 524 525 525 psCoordTPToFPA(&testCoord, &fpaCoord, 0.0, 0.0, myFPA); 526 526 if (testCoord.x != fpaCoord.x) { 527 printf("ERROR: psCoordFPAToTP() x coord was % f, should be %d\n", cellCoord.x, x);527 printf("ERROR: psCoordFPAToTP() x coord was %.2f, should be %d\n", cellCoord.x, x); 528 528 } 529 529 if (testCoord.y != fpaCoord.y) { 530 printf("ERROR: psCoordFPAToTP() y coord was % f, should be %d\n", cellCoord.y, y);530 printf("ERROR: psCoordFPAToTP() y coord was %.2f, should be %d\n", cellCoord.y, y); 531 531 } 532 532 }
Note:
See TracChangeset
for help on using the changeset viewer.
