   flight sim rotation order
  hi Guys,i'm making simulation that needs rotations i thought about the typical rotations present in flight sims ( yaw, pitch, roll ). these rotations are done to the aircraft's frame of reference. but when the same rotations are combined in different orders there are different autcomes.my question is:what is the order that these rotations are done in and especially why.symbiote   
  I strongly suggest - don't work in roll/pitch/yaw. Store everything as rotation matrices or quaternions, and do all your calculations based on these. If you need to extract roll/pitch/yaw (e.g. for debugging or GUI stuff) then that's easy enough later.   ;  if i store it in matrices / quarternions doesn't it still need to be put in them in a specific order?   ;  1) Pick and order and stick with it. It doesn't really matter what order you do them in.2) The reason it doesn't matter is that you don't want to be storing "yaw 90, pitch 25, roll 45".  You want to store a quaternion or rotation matrix that represents the current orientation of your plane.  You then update the current rotation incrementally per frame ( orientation.RotateLocalYaw( rotspeed * dt ) ).  Since you do everything incrementally with small values, you never risk getting into the situation where you gimble lock (caused by rotation order mattering if you end up rotating one axis onto another). And thusly, order doesn't matter.3) If you need the current yaw/pitch/roll for some indicator, just decompose the matrix for the values.;  The multiplication of rotation matrices (so as quaternions) do not commute in general.  When you multiply (or "combine" in your words) a number of rotation matrices in different order, you have a different rotation in general.  I don't think there is any room for discussion about it.For Euler Angles, there are a lot of different definition about the axis and their ordering.  The following link shows some of them.http://www.euclideanspace.com/maths/geometry/rotations/euler/index.htmAmount those definitions, there is no good reason why a particular one is better than the others numerically.  In general, we need three axis to define Euler Angle.  However, the criterion of these axis is very loose indeed.  As long as the consecutive axis are not parallel to each other (NOT EVEN orthogonal), they can be used.  That's why we have some funny definition like {z,y,z}.As mentioned earlier, no one is particularly better than the others numerically.  So, when you decide using which definition, any one of them is just fine as long as you using it consistently.  However, you are trying to implement a flight sim, right?  So, you probably want to follow the definition of the real world gimbals device.[Edited by - ma_hty on May 18, 2009 5:34:12 AM];  i'm playing with ODE it's all very basic and it won't be a flight sim. but i was wondering how flexible the rotations are that it offers compared to those that would be needed in flight sims.it keeps track of a rotation/orientation matrix so i started wondering. i guess i could have it create a matrices for the rotations i want and apply the orientation matrix to them to produce a new orientation matrix.thanks for the info.   