IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 10383


Ignore:
Timestamp:
Dec 1, 2006, 12:10:25 PM (20 years ago)
Author:
magnier
Message:

fixed sign errors : finally correct??

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/math/psEllipse.c

    r10254 r10383  
    1414    moments.x2 = +0.5*f1 + 0.5*f2*cos(2*axes.theta);
    1515    moments.y2 = +0.5*f1 - 0.5*f2*cos(2*axes.theta);
    16     moments.xy = -0.5*f2*sin(2*axes.theta);
     16    moments.xy = +0.5*f2*sin(2*axes.theta);
    1717
    1818    assert (isfinite(moments.x2));
     
    3333
    3434    axes.major = sqrt (0.5*(g1 + g3));
    35     axes.theta = 0.5 * atan2 (-2.0*moments.xy, g2); // theta in radians
     35    axes.theta = +0.5 * atan2 (+2.0*moments.xy, g2); // theta in radians
    3636
    3737    // long, thin objects are likely to have a poorly measured minor axis
     
    8484
    8585    axes.minor = sqrt (2.0 / (f1 + f3));
    86     axes.theta = 0.5 * atan2 (-2.0*shape.sxy, f2);
     86    axes.theta = -0.5 * atan2 (+2.0*shape.sxy, f2);
    8787
    8888    // long, thin objects are likely to have a poorly measured major axis
Note: See TracChangeset for help on using the changeset viewer.