How to Trim Aircraft in JSBSim Plugin for Unreal Engine 5 #1232
-
Hello, I am currently integrating JSBSim into Unreal Engine 5 and working on simulating the Cessna T-37 aircraft. I want to use the Trim functionality to trim my aircraft. I am unsure how to properly implement trimming in the Unreal Engine environment. Could you please guide me on the correct approach |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
If you are getting output values from the trimming algorithm, this is meaning that it has succeeded finding a trimmed position. So what is exactly wrong in your example ? Have you some reasons to think that the trim conditions that it has found are incorrect ? |
Beta Was this translation helpful? Give feedback.
Disclosure, this is my brief understanding and a brief test trying to use trim in active flight, it may not be 100% correct:
In UE5 we can call
simulation/do_simple_trim
, with value 1 to do a full trim through the blueprint command console node, seen in this image. Unfortunately it crashes the editor if trim fails (trim is not always successful). In addition there are also extra steps needed for Trim to successfully apply it's results to UE5.-The editor crashes when/if trim fails because JSBSim throws an exception and UE5 editor does not handle exceptions, so it just crashes when using the blueprint node. The plugin can call Trim in c++ without crashing, so I'll have to see if I can app…