IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 28, 2009, 11:21:56 AM (17 years ago)
Author:
eugene
Message:

always handle psVectorStats false return status (is an error); check for NAN results and handle as possible

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psastro/src/psastroAstromGuess.c

    r21422 r23989  
    382382    psStats *statsQ = psStatsAlloc (PS_STAT_SAMPLE_MEAN | PS_STAT_SAMPLE_STDEV);
    383383
    384     psVectorStats (statsP, cornerPd, NULL, cornerMK, 1);
    385     psVectorStats (statsQ, cornerQd, NULL, cornerMK, 1);
     384    if (!psVectorStats (statsP, cornerPd, NULL, cornerMK, 1)) {
     385        psError(PS_ERR_UNKNOWN, false, "failure to measure stats");
     386        return false;
     387    }
     388    if (!psVectorStats (statsQ, cornerQd, NULL, cornerMK, 1)) {
     389        psError(PS_ERR_UNKNOWN, false, "failure to measure stats");
     390        return false;
     391    }
    386392
    387393    float angle = atan2 (map->y->coeff[1][0], map->x->coeff[1][0]);
Note: See TracChangeset for help on using the changeset viewer.