Skip to content

Changing state variables used in JSBSim linearization model #1083

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

You must be logged in to vote

@viniciusrottolo You could add new classes inheriting from FGStateSpace::Component for each of the variable you need. Similar to the class FGStateSpace::Theta below:

class Theta : public Component
{
public:
Theta() : Component("Theta","rad") {};
double get() const
{
return m_fdm->GetPropagate()->GetEuler(2);
}
void set(double val)
{
m_fdm->GetIC()->SetFlightPathAngleRadIC(val-m_fdm->GetIC()->GetAlphaRadIC());
//m_fdm->GetIC()->SetThetaRadIC(val);
}
double getDeriv() const
{
return m_fdm->GetAuxiliary()->GetEulerRates(2);
}
};

and…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by viniciusrottolo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants