What is suppose to happen when aircraft reach 90 degree of pitch #924
Replies: 5 comments 2 replies
-
Hmm, so the roll angle toggles between 0 and pi when passing through +-90 degrees of pitch. Possibly due to 'gimbal lock' during conversion from quaternions to Euler angles. jsbsim/src/math/FGMatrix33.cpp Lines 156 to 190 in 6c1abbe |
Beta Was this translation helpful? Give feedback.
-
So just double-checking, I logged the roll rate So with a roll rate so small there is definitely no way that the aircraft is actually rolling through 180 degrees in a couple of simulation frames. So I'm pretty sure the issue is related to converting between quaternions and Euler angles. Notice the same issue with the yaw, also switches virtually instantly between 0/360 (north) and 180 (south) each time the pitch attitude passes through +-90 degrees. |
Beta Was this translation helpful? Give feedback.
-
So what does your graph output look like now?
Ignore that comment, yaw should be switching between north and south at the top and bottom of the loop. |
Beta Was this translation helpful? Give feedback.
-
In terms of the yaw, as shown in the graphs above do you agree that the output is correct? Just take into account the wrap-around 0/360 deg. |
Beta Was this translation helpful? Give feedback.
-
It's a well-known problem. The moment you use Euler angles for visualization you get this. If you use a visualization function that directly handles the aircraft attitude quaternion, the motion should be correctly displayed |
Beta Was this translation helpful? Give feedback.
-
I am initializing aircraft with 0,0,0 pitch roll yaw and gives it 1 in throttle and -1 in elevator.
the aircraft pitch rise until it reach 90 and then it changes continuously making a very fast non physical roll (I visualize it using opengl).
Is it expected?
Although from the graph it seems immediate, the change is not immediate
gifs:
Beta Was this translation helpful? Give feedback.
All reactions