IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 3, 2008, 12:50:47 PM (18 years ago)
Author:
Paul Price
Message:

Need extra precision in sexagesimal values to properly compare things
at the level 1e-6 (psMetadataItemCompare).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/concepts/pmConceptsStandard.c

    r19724 r19889  
    334334    coords -= medium / 60.0;
    335335    small = 3600.0 * coords;
    336     small = (float)((int)(small * 100.0)) / 100.0;
     336    small = (float)((int)(small * 1000.0)) / 1000.0;
    337337    if (negative) {
    338338        big *= -1;
    339339    }
    340340    psString coordString = NULL;        // String with the coordinates in sexagesimal format
    341     psStringAppend(&coordString, "%d:%02d:%05.2f", big, medium, small);
     341    psStringAppend(&coordString, "%d:%02d:%06.3f", big, medium, small);
    342342    psMetadataItem *coordItem = psMetadataItemAllocStr(concept->name, concept->comment, coordString);
    343343    psFree(coordString);
Note: See TracChangeset for help on using the changeset viewer.