Is a vibrating aircraft normal? #906
-
Heya! I'm working with JSBSim in Unreal Engine 5.1, following the Antoinette project tutorial, and I'm just wondering whether the vibrations of the aircraft at higher speeds I'm showing in the gif below is a normal behavior? It happens on several aircraft models and increases with the speed. Cheers! |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 6 replies
-
It's difficult to tell from the animation you're showing if the problem lies in UE or in JSBSim. It could be the flight dynamics model (FDM) that is designed to reproduce the behavior of an airplane towards its max speed or it could be the autopilot that is not well tuned and which is struggling to maintain the aircraft attitude at high speed.
Not sure what you mean by that but you need to change the FDM (i.e the JSBSim XML files) to alter the flight behavior. Assuming that the problem lies in the FDM then modifying the 3D models alone will not make the problem vanish. We need more details about the actual behavior of your model to be more specific in our answer. Check the discussion #897 for example to see what kind of details are needed to make progress towards resolution. |
Beta Was this translation helpful? Give feedback.
-
Yes, FDM as you call it is what I meant.
There is no autopilot. I have followed this tutorial and the |
Beta Was this translation helpful? Give feedback.
-
I think this discussion should stay open in case someone else has some insight, same issue, or solution in the future. There are two problems/concerns: First problem is that Unreal Engine has some issues rendering objects in sync with camera when there is any vibration or jitter. Even if the camera is attached directly to object, you can still notice the object is vibrating. Possible reasons could be related to the fact that the engine allows the render thread to be one frame behind the game thread. Meaning the camera and object are not in sync. Or that UE5 now uses double float precision but rendering is single float and some bug might have been introduced in this area. I have tested the issue separately without JSBSim and vibration/jitter is noticeable in some cases but not all cases. I have not yet tested in UE4. Second problem is that the plugin is producing vibration jitter. It should be easy to confirm is jsbsim is the source or if the plugin is at fault. I'll do some more testing in the future and share my findings when I have any. |
Beta Was this translation helpful? Give feedback.
-
It's most definitely a bug with UE5 relating to the double precision changes from UE4. I tested UE4 and there's no jitter. |
Beta Was this translation helpful? Give feedback.
-
I investigated my issue further and found that the jitter isn't occurring close to the origin. It begins to appear when further away than around 3 km from the origin (which made me initially inaccurately believe it was related to the movement speed). I believe I've isolated the issue to reside in the transformation between UE-coordinates and Georeference coordinates with the Georeference plugin, at least with ECEF coordinates that JSBSim use. I've recreated the issue in an empty 'simulator template' in both UE 5.1 and 5.2. Updating the position of a pawn, moving it, using only UE-coordinates is working as intended with no jitter. But when transforming the UE-coordinates to ECEF-coordinates, adding an offset to the ECEF-coordinates, and transforming back to UE-coordinates and updating the pawn's position - results in a jittering mesh when further away from the origin than 3 km. (see this blueprint for what I mean https://blueprintue.com/blueprint/fawa-4si/) Video of no jitter when translating only with UE-coords: https://drive.google.com/file/d/11BwLDFOWbFlYCW6SzmobX9acDBIMbk8h/view So precision is seemingly lost when transforming the positional vector in the steps UE-ECEF-UE using the Georeference plugin. I sent a bug report to UE. Will post issue number here when available. Personally I've temporarily fixed it by rebasing the origin. |
Beta Was this translation helpful? Give feedback.
-
Hi Indeed, this behavior is not normal, but it's a known issue, which is not related to your code or to jsbsim. First, I'm puzzled by your first video. Are both of them using the same georeferencing? The probleme here is on the GPU/Render side. Since GPUs are operating in floats, we have a integer+float solution in our shaders that we thought would be sufficient enough, but which is not. We improved it in 5.2 I think, but some edge cases like yours (attached to a shape + far from the origin) are exposing this imprecision. As of today, to solve it, you'll have to lower the tile size and do a custom build as suggested in the forum. However, our engineering team is on it, and have a solution based on a different approach. It requires quite big changes in the engine core, so it will be for the next version or maybe the one after depending on QA results. I hope it helps |
Beta Was this translation helpful? Give feedback.
Hi
Indeed, this behavior is not normal, but it's a known issue, which is not related to your code or to jsbsim.
First, I'm puzzled by your first video. Are both of them using the same georeferencing?
Because all maths computations for transformations are done on the CPU, with enough precision to be agnostic from the local/absolute frame. I could do additional tests, but I doubt this makes a difference.
The probleme here is on the GPU/Render side. Since GPUs are operating in floats, we have a integer+float solution in our shaders that we thought would be sufficient enough, but which is not. We improved it in 5.2 I think, but some edge cases like yours (attached to a shape + far from the or…