Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FDM: Trimming with JSBSim trim routine #1316

Open
ikashraf opened this issue Feb 27, 2020 · 6 comments
Open

FDM: Trimming with JSBSim trim routine #1316

ikashraf opened this issue Feb 27, 2020 · 6 comments

Comments

@ikashraf
Copy link

The JSBSim model for c172p does not seem to trim except for on ground.

@wlbragg
Copy link
Collaborator

wlbragg commented Feb 27, 2020

Could you please explain in detail what your issue is? What trimming? What is the procedure you expect to be available?

@ikashraf
Copy link
Author

I want to reposition the aircraft model in a cruise flight configuration (mid air and wings level), for my research on flight controllers.

By trimming I mean to find the necessary inputs (throttle lever setting, aileron deflection, elevator deflection, rudder deflection, flap deflection, trim tab deflection e.t.c.) to have the model in equilibrium (Assuming no control/disturbing inputs, lift = weight; thrust = drag) at a given initial condition (pressure altitude and Indicated Air Speed).

The procedure already exists. JSBSim source code contains this algorithm that does what I want. This algorithm works for Bill Galbraith's example aircraft but not for C172p.

What I want is a reasonable model (at least conform to real aircraft's eigen motions with small tolerance) for C172p. So that I can develop my Controllers.

@dany93
Copy link
Collaborator

dany93 commented Feb 27, 2020

I don't understand well what you are meaning.

The c172p can be manually trimmed in the air.
One example (among an infinite number of possibilities):
160hp engine version, default load (pilot alone) 1700 ft, no flaps.
107 kts (Internal properties, velocities/airspeed-kt)
2304 rpm
aileron trim 0.019
elevator trim 0.101
rudder trim 0.02
Allows flying for about 1 mn or more with no action on joystick controls, very slow yawing deviation.

I've never seen the JSBSim algorithm trimming the aircraft in the air. I've seen the trimming algorithm working only at simulator start, for initializing the aircraft stopped on the ground.
My impression is that the JSBSim "trimming" that I've seen working is connected to the gear's spring coefficients and damping.
Which doesn't mean that there is no other one, that I don't know. The best should be asking Jon S. Berndt or Bertrand Coconnier (bcoconni) for that.
I've had a look at Bill Galbraith's publication but I didn't know this JSBSim possibility and, useless to say, I don't know how to use it. The trimming success or failure obviously depends on the tolerance and definition for "stable" and "steady" flight.
However, I'm not a JSBSim developer, only a user, with no C++ skills.

@wlbragg
Copy link
Collaborator

wlbragg commented Feb 28, 2020

Are you trying to do this under the FlightGear program or JSBSim standalone?
If in FlightGear this is done as @dany93 has indicated. You can pass startup switch settings through the launcher to achieve the trim at startup. There is at least one example of a startup state in the "states" folder I believe. It is on ground, but gives you the basics of the format to achieve what you want using a "state" solution, just configure for in air.

@wlbragg
Copy link
Collaborator

wlbragg commented Feb 28, 2020

The state solution is something we will eventually implement. There are plans to have startup states such as.
Cold and Dark
Parked Running
Ready for Taxi
Ready for Takeoff
Cruise
Approach
You get the idea.

@ikashraf
Copy link
Author

ikashraf commented Mar 2, 2020

Are you trying to do this under the FlightGear program or JSBSim standalone?
If in FlightGear this is done as @dany93 has indicated. You can pass startup switch settings through the launcher to achieve the trim at startup. There is at least one example of a startup state in the "states" folder I believe. It is on ground, but gives you the basics of the format to achieve what you want using a "state" solution, just configure for in air.

I am trying to do it under the JSBSIm standalone. I will try the example, and let you guys know. thanks for your quick replies!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants