Re: [Flightgear-devel] Re: Plea for help: geometry/trigonometry problem
On Wed, Nov 03, 2004 at 02:05:59PM -0500, David Megginson wrote: > theta, and psi (roll, pitch, and yaw). Given those three angles, I'd > like to determine which direction around the z axis is most directly > uphill and how steep the hill is. Elaborate please. Do you mean the angle between the plane and the z axis? The projection of the z axis onto the plane? What's the definition of ``uphill''? At least you'll need the z axis, and this is best obtained not from the Euler angles but from the corresponding rotation matrix directly (I guess one is available?) Cheers -Gerhard ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d
RE: [Flightgear-devel] Re: Plea for help: geometry/trigonometry problem
David Megginson writes: > > I've thought of a simpler way to approach this problem. Let's say > that I have a plane and the three Euler angles of rotation, phi, > theta, and psi (roll, pitch, and yaw). Given those three angles, I'd > like to determine which direction around the z axis is most directly > uphill and how steep the hill is. see sgEulerToQuat( sgQuat quat, const sgVec3 hpr ) ; HTH Norman ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d
Re: [Flightgear-devel] Re: Plea for help: geometry/trigonometry problem
On Wed, 03 Nov 2004 15:28:26 -0600 "Curtis L. Olson" <[EMAIL PROTECTED]> wrote: I think you're on the right track. I think you want to determine the orientation of the aircraft body Z axis w.r.t. the local vertical axis. That can tell you both the magnitude and direction of the most vertical ascent about the local vertical axis. Geez ... yes, it has been a long time ... :-) Jon ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d
Re: [Flightgear-devel] Re: Plea for help: geometry/trigonometry problem
David Megginson wrote: I've thought of a simpler way to approach this problem. Let's say that I have a plane and the three Euler angles of rotation, phi, theta, and psi (roll, pitch, and yaw). Given those three angles, I'd like to determine which direction around the z axis is most directly uphill and how steep the hill is. Thanks, and all the best, David I'm sitting here wiggling a cd around and thinking ... If you roll the cd only, the highest point on the disk will be straight out the left/right side depending on the roll direction. If you pitch the cd only, the highest point on the disk will be straight out the front/back depending on the pitch direction. It *seems* like if you combine roll and pitch, the highest point on the cd/disk will be a combination of the roll and pitch amounts ... perhaps simple trig functions would apply here, but that's based on shakey intuition only. The vertical component of disk edge movement is relative to sin(angle), if you pitch and roll identical amounts, then your highest point is at a 45 degree offset which seems to fall in line. Now playing fast and loose, what if you look straight down on a disk ... +X is "up", +Y is right, just a standard 2d cartesian system. Now map the amount of roll to "X" and the amount of pitch to "Y". The highest point on the disk should be x = sin(roll)*cos(pitch), y = cos(roll)*sin(pitch) and there's probably a - sign that goes in there someplace. I'm not sure if we can get away with directly mappy roll to X and pitch to Y ... might need some sort of trig function of roll/pitch to get X, Y? Then it seems like you could take the answer you get when isolating roll/pitch and add in the heading as an offset ... of course that would be dependant on the order your euler angles are designed to be multipled ... Once you have the most upward pointing vector on the surface of the disk, then it's easy to find the angle with horizontal. Project the most upward pointing vector onto a flat plane, and then figure out the angle between the projected vector and the original vector ... I'm probably way off here, but maybe this will spark someone else's brain cells to figure out the right way to do this ... Curt. -- Curtis Olsonhttp://www.flightgear.org/~curt HumanFIRST Program http://www.humanfirst.umn.edu/ FlightGear Project http://www.flightgear.org Unique text:2f585eeea02e2c79d7b1d8c4963bae2d ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d
Re: [Flightgear-devel] Re: Plea for help: geometry/trigonometry problem
On Wed, 3 Nov 2004 14:05:59 -0500 David Megginson <[EMAIL PROTECTED]> wrote: I've thought of a simpler way to approach this problem. Let's say that I have a plane and the three Euler angles of rotation, phi, theta, and psi (roll, pitch, and yaw). Given those three angles, I'd like to determine which direction around the z axis is most directly uphill and how steep the hill is. For JSBSim, the order of rotation is z, y, x (heading, pitch, roll). Given that, note that pitch and roll don't affect heading. I assume you are talking about the aircraft z axis in your last sentence. Also, I assume that you mean, which angle about the z axis is most vertical with respect to the local horizontal? I _think_ this answer might have something to do with constructing an omega rotation vector using the Euler angles, transforming it to the local frame, and taking a dot product, but I'd have to think about this one for a little bit. This is kind of a cool problem. Probably someone else will have figured this out by the time I post this email ... :-) Jon ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d
Re: [Flightgear-devel] Re: Plea for help: geometry/trigonometry problem
David Megginson wrote: I've thought of a simpler way to approach this problem. Let's say that I have a plane and the three Euler angles of rotation, phi, theta, and psi (roll, pitch, and yaw). Given those three angles, I'd like to determine which direction around the z axis is most directly uphill and how steep the hill is. Hmmm, that's a good mind bender ... I'm still thinking ... linear algebra was *sooo* long ago ... :-) Curt. -- Curtis Olsonhttp://www.flightgear.org/~curt HumanFIRST Program http://www.humanfirst.umn.edu/ FlightGear Project http://www.flightgear.org Unique text:2f585eeea02e2c79d7b1d8c4963bae2d ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d