IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 18, 2005, 12:14:47 PM (21 years ago)
Author:
drobbin
Message:

Made changes to sphereOps, but errors still exist, especially in galactic transf.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/astro/psSphereOps.c

    r5343 r5368  
    88 *  @author Dave Robbins, MHPCC
    99 *
    10  *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2005-10-15 01:42:46 $
     10 *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2005-10-18 22:14:47 $
    1212 *
    1313 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    105105        out = psSphereAlloc();
    106106    }
    107 
     107    //    double r = -coord->r;
    108108    // apply the transform by creating a new psSphereRot from the input coord
    109109    // and combining it with the input transform (see ADD)
     
    114114                                 sin(coord->d),
    115115                                 0.0);
     116
    116117    //    psSphereRot* coordQuatConjugate = psSphereRotQuat(
    117118    //                                       coordQuat->q0, coordQuat->q1, coordQuat->q2, coordQuat->q3);
     
    131132    psSphereRot *inv = (psSphereRot*)psAlloc(sizeof(psSphereRot));
    132133    *inv = *transform;
    133     psSphereRot *result = psSphereRotCombine(NULL, transform, coordQuat);
    134     psSphereRotInvert(inv);
    135     psSphereRotCombine(result, result, inv);
     134    //    psSphereRot *result = psSphereRotCombine(NULL, transform, coordQuat);
     135    //    inv = psSphereRotInvert(inv);
     136    //    psSphereRotCombine(result, result, inv);
    136137    //    psSphereRot *result = psSphereRotCombine(NULL, inv, coordQuat);
    137138    //    psSphereRotCombine(result, result, transform);
     
    139140    //    psSphereRotCombine(result, inv, result);
    140141
    141     //    out->r = atan2(result->q1, result->q0);
     142    psSphereRot *result = psSphereRotCombine(NULL, coordQuat, transform);
     143    inv = psSphereRotInvert(inv);
     144    //    *(psSphereRot**)&transform = psSphereRotInvert( *(psSphereRot**)&transform);
     145    result = psSphereRotCombine(result, inv, result);
     146    //    *(psSphereRot**)&transform = psSphereRotInvert( *(psSphereRot**)&transform);
     147
     148    //        out->r = atan2(result->q0, result->q1);
    142149    out->r = atan2(result->q1, result->q0);
    143150    out->d = asin(result->q2);
     
    198205    rot->q2 = -rot->q2;
    199206
     207    //    rot->q3 = rot->q3;
    200208    return rot;
    201209}
Note: See TracChangeset for help on using the changeset viewer.