DCS problem summary (thanks!)

New Message Reply Date view Thread view Subject view Author view

Daniel Delgado (renata++at++eos.arc.nasa.gov)
Wed, 7 Aug 1996 09:41:04 -0700


Hi all,

Thanks to all the help with my DCS problem. Especially to
Gene Koh, Don Tidrow, and Veraart (rioj7++at++fel.tno.nl).

To summarize :

How does one convert a point in a DCS coordinate system to the
original coordinate system after translating and rotating the DCS one?

What I mean is that I did this with a DCS:

   /* update vehicle DCS */
   pfDCSRot(vehicle[0].dcs,
                 vehicle[0].hpr[PF_H],
                 vehicle[0].hpr[PF_P],
                 vehicle[0].hpr[PF_R]);

   pfDCSTrans(vehicle[k].dcs,
                   vehicle[0].xyz[PF_X],
                   vehicle[0].xyz[PF_Y],
                   vehicle[0].hpr[PF_Z]);

Now I have a point that is in the original Performer Coordinate system
(vehicle[ 1].xyz) and I want to find out what its value is in the
rotated and translated DCS system.

What works is the following:

        /**
        Get the Intrusion pos but with respect to the ownship
        **/

        /* Get the ownships position into a matrix */
        pfGetDCSMat(vehicle[0].dcs, Matrix);

        /**
        Use the ownship matrix to get the intrusion position with
        respect to the ownship
        **/
        pfInvertAffMat(Matrix, Matrix);
        pfXformPt3(IntrusionVect, vehicle[1].xyz, Matrix);

I have no idea why one uses a pfInvertAffMat instead of a
pfInvertMat... but Don Tidrow suggested this function and it works
(I also liked his words of encouragment re learning matrices!!)

Thanks again!! Incidently, Why do I want to do this? So that
I can 'follow' one ship with respect to other like this....

        /**
        So with respect to ownship...
        get the bearing of the intrusion.
        **/
        vehicle_angle = fatan2(IntrusionVect[PF_Y],
                               IntrusionVect[PF_X]);

With this... I know that if the angle is negative the ship is behind the
ownship and I now now the bearing of the other ship.

Daniel Delgado
renata++at++eos.arc.nasa.gov
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
            Submissions: info-performer++at++sgi.com
        Admin. requests: info-performer-request++at++sgi.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:53:19 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.