IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 15, 2009, 4:03:13 PM (17 years ago)
Author:
eugene
Message:

updates from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20090715/psModules/src/concepts/pmConceptsStandard.c

    r24419 r25407  
    429429        }
    430430
    431         psString ra = psMetadataLookupStr(&mdok, formats, "FPA.RA"); // Format for RA
    432         psString dec = psMetadataLookupStr(&mdok, formats, "FPA.DEC"); // Format for Dec
    433         if (ra && strcasecmp(ra, "HOURS") == 0 && dec && strcasecmp(dec, "DEGREES") == 0) {
    434             sexagesimal = true;
     431        if (strcmp(concept->name, "FPA.RA") == 0 || strcmp(concept->name, "FPA.DEC") == 0) {
     432            psString ra = psMetadataLookupStr(&mdok, formats, "FPA.RA"); // Format for RA
     433            psString dec = psMetadataLookupStr(&mdok, formats, "FPA.DEC"); // Format for Dec
     434            if (ra && strcasecmp(ra, "HOURS") == 0 && dec && strcasecmp(dec, "DEGREES") == 0) {
     435                sexagesimal = true;
     436            }
    435437        }
    436438    } else {
     
    450452        small = 3600.0 * coords;
    451453        small = (float)((int)(small * 1000.0)) / 1000.0;
    452         if (negative) {
    453             big *= -1;
    454         }
    455454        psString coordString = NULL;        // String with the coordinates in sexagesimal format
    456         psStringAppend(&coordString, "%d:%02d:%06.3f", big, medium, small);
     455        psStringAppend(&coordString, "%s%02d:%02d:%06.3f",
     456                       negative ? "-" : (strcmp(concept->name, "FPA.DEC") == 0 ? "+" : ""),
     457                       big, medium, small);
    457458        coordItem = psMetadataItemAllocStr(concept->name, concept->comment, coordString);
    458459        psFree(coordString);
Note: See TracChangeset for help on using the changeset viewer.