Original Post
Hi, I have the following problem and would appreciate any help. Thanks. I have a spaceship with 6 degrees of freedom, indicated at any given time by yaw, pitch, and roll angles. I have a camera attached to the spaceship with the ability to move in a limited FOR. For simplicity, the camera is at the center of the spaceship and doesn't have the spaceship model in its view. I don't keep track of the camera's yaw, pitch, roll angles with respect to the spaceship, but I do calculate them with respect to the global coordinate system (XYZ axes). I also know the global az/el values. What I want to know is the az/el values with respect to the spaceship. For instance, no matter which way the spaceship is facing or rotated toward, the camera is still 10 degrees down and 10 degrees right because it is attached to the spaceship. I know it has something to do with a transformation. Please tell me if my idea is right or wrong if you can. I take the global az/el values, create a vector from them, transform that vector by the inverse of the spaceship's roll/pitch/yaw matrix, then convert the new vector back to az/el. Is it that simple? Do I have the order of rotations right? Thanks!