IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 6, 2012, 6:32:19 PM (14 years ago)
Author:
watersc1
Message:

merge from trunk. Preliminary versions of stacktool/warptool updates and regenerate_background.pl script. The warp code is finished and tested, and I still need to get the stack version resolved.

Location:
branches/czw_branch/20120906/psModules
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/czw_branch/20120906/psModules

  • branches/czw_branch/20120906/psModules/src/objects

    • Property svn:ignore
      •  

        old new  
        77pmSourceIO_CMF_PS1_V1.c
        88pmSourceIO_CMF_PS1_V2.c
         9pmSourceIO_CMF_PS1_V2.v1.c
        910pmSourceIO_CMF_PS1_V3.c
         11pmSourceIO_CMF_PS1_V3.v1.c
         12pmSourceIO_CMF_PS1_V1.v1.c
        1013pmSourceIO_CMF_PS1_V4.c
        1114pmSourceIO_CMF_PS1_SV1.c
         15pmSourceIO_CMF_PS1_SV2.c
        1216pmSourceIO_CMF_PS1_DV1.c
        1317pmSourceIO_CMF_PS1_DV2.c
         18pmSourceIO_CMF_PS1_DV3.c
         19
  • branches/czw_branch/20120906/psModules/src/objects/pmSourceOutputs.c

    r34403 r34772  
    227227    *pltScale = 0.5*(pltScale_x + pltScale_y);
    228228
     229    float posAngle_x, posAngle_y;
    229230    float crossProduct = dTPx_dCHx * dTPy_dCHy - dTPx_dCHy * dTPy_dCHx;
    230231    if  (crossProduct > 0.) {
    231232      *pltScale *= -1.0;
    232     }
    233 
    234     float posAngle_x = atan2 (+dTPy_dCHx, +dTPx_dCHx);
    235     float posAngle_y = atan2 (-dTPy_dCHy, +dTPx_dCHy);
     233      posAngle_x = atan2 (dTPy_dCHx, dTPx_dCHx);
     234      posAngle_y = atan2 (dTPy_dCHy, dTPx_dCHy) - M_PI_2;
     235    } else {
     236      posAngle_x = atan2 (dTPy_dCHx, -dTPx_dCHx);
     237      posAngle_y = atan2 (dTPy_dCHy,  dTPx_dCHy) - M_PI_2;
     238    }
     239
     240    // with errors, these may end up on opposite sides of the M_PI boundary. 
     241    if (posAngle_x - posAngle_y > M_PI) {
     242      posAngle_y += 2.0 * M_PI;
     243    }
     244    if (posAngle_y - posAngle_x > M_PI) {
     245      posAngle_x += 2.0 * M_PI;
     246    }
    236247    *posAngle = 0.5*(posAngle_x + posAngle_y);
    237248
Note: See TracChangeset for help on using the changeset viewer.