IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 28690


Ignore:
Timestamp:
Jul 19, 2010, 4:05:28 PM (16 years ago)
Author:
bills
Message:

Fix sign error in reading FPA.DEC where 0 > dec > -1 (and the rarely seen 0 > RA > -1)

File:
1 edited

Legend:

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

    r25930 r28690  
    449449            int big, medium;
    450450            float small;
     451            bool negative =  *((char *)concept->data.V) == '-'; // check for sign explicitly since -0 is not less than 0
     452
    451453            // XXX: Upgrade path is to allow dd:mm.mmm
    452454            if (sscanf(concept->data.V, "%d:%d:%f", &big, &medium, &small) != 3 &&
     
    457459            }
    458460            coords = abs(big) + (float)medium/60.0 + small/3600.0;
    459             if (big < 0)
     461            if (negative)
    460462            {
    461463                coords *= -1.0;
Note: See TracChangeset for help on using the changeset viewer.