Skip to content

Ground trim from a python script? #1219

Answered by bcoconni
clolsonus asked this question in Q&A
Discussion options

You must be logged in to vote

Ground trim can be done with Python by setting the initial conditions properties then by setting the property simulation/do_simple_trim to 2.
In the example below, the pitch angle theta-deg is set to 0 then the ground trim is triggered.

fdm['ic/theta-deg'] = 0.0
# If the trim fails, it will raise an exception
fdm['simulation/do_simple_trim'] = 2 # Ground trim

Note that an exception jsbsim.TrimFailureError will be raised if the trim fails.

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
4 replies
@clolsonus
Comment options

@bcoconni
Comment options

@clolsonus
Comment options

@bcoconni
Comment options

Answer selected by clolsonus
Comment options

You must be logged in to vote
1 reply
@bcoconni
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants