Changing state variables used in JSBSim linearization model #1083
-
Hello everyone, I'm currently working with JSBSim and I'm trying to understand how to modify the state variables used in the linearization model. Currently, the state vector used for linearization is composed of ['Vt', 'Alpha', 'Theta', 'Q', 'Beta', 'Phi', 'P', 'Psi', 'R', 'Latitude', 'Longitude', 'Alt']. However, I would like to change it to the standard set of variables [u, v, w, p, q, r, X, Y, Z, phi, theta, psi]. Could anyone guide me on how to make this modification? Is it possible to customize the state variables for linearization in JSBSim? Thank you in advance for your help! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
How are you planning on using the linearization model? Depending on your use case, you do realize that all the states you're looking for can be derived from the existing state vector right? |
Beta Was this translation helpful? Give feedback.
-
@viniciusrottolo You could add new classes inheriting from jsbsim/src/math/FGStateSpace.h Lines 402 to 419 in e26d03b and modify the constructor FGLinearization::FGLinearization to use the components that you have created (replace each occurrence of ss.x.add(new FGStateSpace::***) )jsbsim/src/initialization/FGLinearization.cpp Lines 28 to 63 in e26d03b |
Beta Was this translation helpful? Give feedback.
@viniciusrottolo You could add new classes inheriting from
FGStateSpace::Component
for each of the variable you need. Similar to the classFGStateSpace::Theta
below:jsbsim/src/math/FGStateSpace.h
Lines 402 to 419 in e26d03b
and…