IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 9, 2009, 8:41:52 AM (17 years ago)
Author:
eugene
Message:

changing RA & DEC search options to accept degrees, not radians (human interface)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/pxtools.h

    r23918 r24733  
    231231}
    232232
     233// convert the supplied value from degrees (external) to radians (internal)
     234#define PXOPT_COPY_RADEC(from, to, oldname, newname, comment) \
     235{ \
     236    bool status = false; \
     237    psF64 var = psMetadataLookupF64(&status, from, oldname); \
     238    if (!status) { \
     239        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for " oldname); \
     240        return false; \
     241    } \
     242    if (!isnan(var)) { \
     243        if (!psMetadataAddF64(to, PS_LIST_TAIL, newname, PS_META_DUPLICATE_OK, comment, PS_RAD_DEG*var)) { \
     244            psError(PS_ERR_UNKNOWN, false, "failed to add item " newname); \
     245            psFree(to); \
     246            return false; \
     247        } \
     248    } \
     249}
     250
    233251#define PXOPT_COPY_F32(from, to, oldname, newname, comment) \
    234252  PXOPT_COPY_F(from, to, F32, oldname, newname, comment)
Note: See TracChangeset for help on using the changeset viewer.