IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 30480


Ignore:
Timestamp:
Feb 3, 2011, 9:36:49 AM (15 years ago)
Author:
eugene
Message:

values like FWx, Mxx, measure.theta are now converted to/from internal formats with "To/From Short Pixels/Degrees" functions; update some usage info

Location:
branches/eam_branches/ipp-20101205/Ohana/src/libohana
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20101205/Ohana/src/libohana/include/ohana.h

    r29537 r30480  
    286286int     hstgsc_hms_to_deg      PROTO((double *h0, double *h1, double *d0, double *d1, char *string));
    287287
     288short   ToShortPixels          PROTO((float pixels));
     289short   ToShortDegrees         PROTO((float degrees));
     290float   FromShortPixels        PROTO((short value));
     291float   FromShortDegrees       PROTO((float value));
     292
    288293/* IO Buffer functions */
    289294int     InitIOBuffer           PROTO((IOBuffer *buffer, int Nalloc));
  • branches/eam_branches/ipp-20101205/Ohana/src/libohana/src/time.c

    r19935 r30480  
    468468    return (result);
    469469}
     470
     471short ToShortPixels (float pixels) {
     472
     473    short value;
     474
     475    value = 100*pixels;
     476
     477    return value;
     478}
     479
     480short ToShortDegrees (float degrees) {
     481
     482    short value;
     483
     484    value = ((float)0xffff/360.0) * degrees;
     485
     486    return value;
     487}
     488
     489float FromShortPixels (short value) {
     490
     491    float pixels;
     492
     493    pixels = value / 100.0;
     494
     495    return pixels;
     496}
     497
     498float FromShortDegrees (float value) {
     499
     500    float degrees;
     501
     502    degrees = (360.0 / (float)0xffff) * value;
     503
     504    return degrees;
     505}
Note: See TracChangeset for help on using the changeset viewer.