hpr calculations

New Message Reply Date view Thread view Subject view Author view

Eric Heft (eheft++at++dnaco.net)
Thu, 6 Feb 1997 21:19:31 -0500 (EST)


Hello all,

   I've got yet another question. (I've been saving them up <g>)

   *Short form*

   How does one go from rotations about the fixed x,y,z axis to the
hpr that's needed by pfChanViewOffsets?

   *Long form*

   We using performer and a MCO to drive a Helmet Mounted Display. The
HMD optics require us to use a FOV of 80 x 60 deg for each
channel. There is a 40 deg overlap between the two. So we have
something like this to setup the channels:

pfChanViewOffsets(LftChan,<0,0,0>,<-20,0,0>);
pfChanViewOffsets(RgtChan,<0,0,0>,<+20,0,0>);

   We can run the town demo and everything looks good. The images fuse
nicely. However, the person using the HMD can't really "look" around
because the view is slaved to the mouse.

   **THE PROBLEM**

   To let the user look around we want to slave the ViewOffsets to the
outputs of our head tracker. From the tracker we can get both the
look_at and look_up vector. To get the left and right channels to
fuse we have to rotate the offsets +20 deg about the look_up
vector . However when we do all the transforms instead of
getting a h,p,r we really have rotations about RotZ,RotX,RotY. So ...

How does one go about converting rotations about the fixed world axis
to get the h,p,r values the pfChanViewOffsets is expecting?

The effect of this shows up when the person is looking forward and
tilts their head to the side. Each channel ends up rotating along
the rotated heading , instead of along the Y axis.

For those interested in seeing this a little better, visit

<A HREF="http://www.dnaco.net/~eheft/hmd.html"> Web Site </A>

Thanks for reading.
Eric.

Heres twhat the code looks like:

main()
{
  ...

  Poll_Bird(Look_at,Look_up); /* Get the sensors vectors */
  Rotate(Look_at,Look_up,+20,Lft_look_at); /* Rotate look at +20deg */
                                             /* about Look_up direction */
  AtUp_to_HPR(Lft_look_at,Look_up,Lft_HPR); /* Calculate HPR values from */
                                               /* up and at */
  pfChanViewOffsets(LftChan,<0,0,0>,Lft_HPR);/* Set the view offsets */
  ...
}

Thanks,
Eric
=======================================================================
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:54:36 PDT

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