Closed wlbragg closed 9 years ago
I just noticed #123 is this the same or tied to this new issue I created?
Inflight, wing(s) can break because an excessive speed or by over-g's (excessive load factor). Both due to an excessive force in reality. But in FG not the same properties. /accelerations/n-z-cg-fpf_sec /fdm/jsbsim/accelerations/Nz, pilot-gdamped also accelerations along y and x axis I do not know if you need all of them. I should say that it is enough. Force limits are are difficult to estimate.
I'll do that, thanks.
Dany added some new FDM effects tied to these forces. We are currently testing them using a non-branched source. So far so good, they may need some fine tuning. It's a real sinking feeling to have a wing just quit working.
Wow, Dany, does our existing FDM Juanvvc:master have the same spin effects when you loose the flight envelope as you have in dany93? The one wing "damage", INCREDIBLE. I tried to limp along back to the airport and screwed around till I got into a spin at low altitude, oops! This is really nice. Again my question, does our existing Juanvvc:master FDM have the same spin effects when you loose the flight envelope as you have in dany93 FDM?
I'm ready to merge Dany's FDM into master along with this new FDM damage model. It is incredible gang. Any comments anyone?
does our existing Juanvvc:master FDM have the same spin effects when you loose the flight envelope as you have in dany93 FDM?
Yes. it is the same for the "spin and stall" effects. I have not changed the general FDM other than for damages on left or /and right wings. Easy to test: fly with the FDM from juanvvc (no damage effects), cut the throttle, hold the stick back, up to stalls. Worsen it with more or less rudder (see the slip ball). I wonder if you do not mix two effects:
Did I understand well and answer your question? mmh... pardon, what does "incredible gang" means?....
"incredible gang", means I really like your changes and also I really like the original spin modeling and I am telling our entire gang, working on this aircraft, that it is incredible work.:) Even though that spin was original, that is the first time I ever experienced "getting out of the flight envelope", other than meeting the ground, can you believe that! Yes, I believe I left the envelope because of the addition of the wing damage. I wish it happened at greater altitude so I would have had a chance to try to pull out of it, (or drop out of it).
"Did I understand well and answer your question?" Yes
Dany, I had to put your new FDM damage model on hold for a few days. I have to get the MP working first, I think it needs to take priority. I'm already sold on your changes though and want to replace any existing FDM damage modeling with it where appropriate (where the new and old overlap). I hope to get back to it by early next week. The MP is a big bite to swallow.
OK, thanks for the information, I had more or less understood that.
When you have made your mind and if you agree for the new controls, I can clean the physics.nas from the conditional FDMs and the previous useless properties. Also if you like, update the "original" FDM.
I will let you for the damages on the ground.
"I can clean the physics.nas from the conditional FDMs and the previous useless properties. Also if you like, update the "original" FDM."
Please do, thank you!
I'll do it as soon as I can. This night if I can. If not, not sure for sunday... Sorry.
Done. http://www.mediafire.com/download/3tbxwr9upunmu4j/C172p-original-FDM-damage-20150510.7z
<fdm>
<jsbsim>
<wing-damage>
<left-wing type="double">0</left-wing>
<right-wing type="double">0</right-wing>
</wing-damage>
</jsbsim>
</fdm>
When you have made your modifications in physics.nas, we will have to delete the
<wing>
<broken-one type="double">0</broken-one>
<broken-both type="double">0</broken-both>
</wing>
in c172p-detailed-set.xml (Not before, we would have nasal errors)
Still to observe if it works well for every features, I guess you have noticed that testing is not at all easy (almost stressful, you have to be quick on Ctrl-U and recovering...)
V > 158 kt and flight asymmetry ==> one wing damaged (can still fly, degraded) V > 180 kt and flight asymmetry ==> one wing broken V > 200 kt ==> both wings broken
g > 4.4 and flight asymmetry ==> one wing damaged (can still fly, degraded) g > 5.5 and flight asymmetry ==> one wing broken g > 6.6 both wings broken
at which we might add: (??) V > 180 kt and symmetric flight ==> both wings damaged (degraded lift)
Also connected to https://github.com/Juanvvc/c172p-detailed/commit/a8b98ccbcbe41df1c6f85528bf6d1f654c7220fd#commitcomment-11078203
"at which we might add: (??) V > 180 kt and symmetric flight ==> both wings damaged (degraded lift)"
I like the idea...
==> On the "To do" list (when it is stabilized, I will pull from juanvvc, modify and do a Pull Request)
V > 180 kt and symmetric flight ==> both wings damaged (degraded lift)"
Done (currently only on my disk).
Moreover, prior to adding this into my branch and doing a Pull request, I' d like to have your opinion about some form changes in physics.nas.
(I have taken max-positive-g for "Normal" category, which lowers it: 3.8 instead of 4.4)
Which gives, for the main changed lines:
# Specifications Vne=158 KIAS,
# Normal category: max positive-g=3.8, max negative-g=1.52,
# Utility category: max positive-g=4.4, max negative-g=1.76,
# structure holds at least 150% max g's
props.globals.initNode("limits/max-positive-g", 3.8, "DOUBLE");
props.globals.initNode("limits/max-negative-g", -1.52, "DOUBLE");
#Over-speed damages
if (getprop("velocities/airspeed-kt") > (getprop("limits/vne") * 1.14)) # 180 KIAS
{
if (roll_moment > -4000 and roll_moment < 4000 and getprop("/fdm/jsbsim/wing-damage/left-wing") == 0 and getprop("/fdm/jsbsim/wing-damage/right-wing") == 0)
{
setprop("/fdm/jsbsim/wing-damage/left-wing", 0.3);
setprop("/fdm/jsbsim/wing-damage/right-wing", 0.3);
screen.log.write("Overspeed. Both wing DAMAGED ");
gui.popupTip("Overspeed. Both wing DAMAGED", 5);
}
if (getprop("velocities/airspeed-kt") > (getprop("limits/vne") * 1.225)) # Vne x sqrt(1.5) ~ 200 KIAS
#Over-g damages
if (g > (max_positive * 1.25))
if (g > (max_positive * 1.5))
Also,
if(getprop("position/altitude-agl-m") < 10 and (getprop("/fdm/jsbsim/crash") or getprop("/fdm/jsbsim/wing-damage/left-wing") or getprop("/fdm/jsbsim/wing-damage/right-wing")))
killengine();
Another criteria should be chosen for "killing" the engine (at least one wing broken? nose wheel broken? very strong g's?).
Also if you prefer, the engine can be killed thanks to the (new) Float chamber, Systems/Fuel.xml, with
fdm/jsbsim/propulsion/tank[2]/priority = 0
Can you give me your opinion and, possibly, your agreement on these changes, for a Pull request?
I good with all of it. I'll rework the kill-engine condition for nose gear broke and wing "broken". Plus I'll give it some more thought as to the original reason I kill it.
Right, thanks wlbragg. Also, see my Pull request comments https://github.com/Juanvvc/c172p-detailed/pull/197#issuecomment-104210991
This can be closed?
Yes, IMO.
I noticed though it is very hard to break the gears while keeping the wings not broken. Should we open a new issue for this?
True.
In physics.nas, lines 227 and 231 (break threshold for each gear)
if(getprop(gears~"unit[1]/compression-ft") > 0.49 or getprop(gears~"unit[1]/broken"))
if(getprop(gears~"unit[2]/compression-ft") > 0.49 or getprop(gears~"unit[2]/broken"))
A break threshold (compression-ft) of 0.25 seems enough in practice (to be tested at full load, which I have done). Even a bit less (0.22 ?) might be enough.
Not obvious from the calculation: FDM: spring coefficient 5400 LBS/FT for each main gear; 0.25 ft compression corresponds to 5400 x 0.25 =1350 lbs per gear. If we assume both gears at touching: 2700 lbs for 0.25 ft compression. Which, with at full load = 2400 lbs, gives 2700 / 2400 = 1.125 g. Not much... should be easily attained... But I guess the damping helps to avoid reaching the compression threshold in such a short time. Or is the compression threshold a good criteria? Wouldn't the g's be a better one for the forces on the gears (damping included)? But the compression has the advantage of "measuring" the stress separately on each gear... Better IMO. Decrease the damping in order to reach the compression threshold on a hard landing?
Anyway, if the result is plausible in practice, it can be considered as acceptable...
I let you think about it (no errors?) and do the tests.
Decrease the damping in order to reach the compression threshold on a hard landing?
I think we should decrease the damping instead of the compression-ft. Do you agree?
If I add a co-pilot and some baggage (2200 lbs gross weight), it becomes much easier to break some gear. But I think that even with just the pilot, a user should be able to break the gear when the aircraft is deliberately dived into the ground :stuck_out_tongue_closed_eyes:
hey now! I resemble that comment :laughing: but I'm actually trying to land decently... not bend and break things... but I'm getting better :wink:
I think we should decrease the damping instead of the compression-ft. Do you agree?
Yes, I think that would be be a good thing. I've not tested it, I had this idea just at the end, after my small calculations.
The nose gear compression to break it is a bit problematic, as I think the gear can sustain a compression to the end, if the force is straight, the nose gear arm is facing a bit forward.
What I am trying to test is the porpoise, where you land with excessive speed and often the aircraft starts leaping wiht increasing amplitude if you don't immediately arrest the movement by pulling back on the wheel and maybe add a bit of throttle to smoothen the next touchdown. If you do the very common mistake of pushing when the aircraft bounces (because you want to land! natural instinct) it will increase the size of the next bounce and eventually this leads to collapsing the nose gear.
This is the very common case when the gear breaks and it would be nice to be able to model that. I tried to test this by reducing the needed compression value a bit, and got it somewhat there, since I think it is a bit too strong initially, but then the problem is, that it also breaks if you put full throttle with parking brake on and push the stick forward. This compresses the gear too, and it collapses too. This is a bit unexpected, even though you usually don't hold brakes and push forward anyway. But maybe the compression ratio is a bit wrong parameter to check alone for gear collapsing. Side loads would be interesting to check too, like on crosswind landings with nasty bounces, it could collapse. But I don't know if those are available that easily from the FDM?
//T
Should we perhaps compute the force on the nose gear by computing pitching moment divided by distance from center to nose gear? (Or can we get the force directly from JSBSim?)
What do you mean by pitching moment (which property)?
fdm/jsbsim/moments
?
I have not found the forces on gears directly from jsbsim.
A rigorous way should be (if I understand well)
Force = (compression-ft) x (spring_coeff) + (compression-velocity-fps) x (damping_coeff)
I have not tested it.
I'm struggling with this breaking threshold for the main gears. I would prefer using properties directly available than swamping the (slow) nasal with these calculus for such a secondary behavior. But that's trial and error and compromises.... Maybe the above calculus will be the best solution.... If it is so simple, not having this done by JSBSim is weird.... JSBSim would do it much faster than nasal. Unless using switches, but we still add xml lines just for this....
I meant the moment around the y-axis. M = F * d.
I understood, but which property do you take for this moment?
Perhaps /fdm/jsbsim/moments/m-gear-lbsft
?
That was my first question here, with this possibility. https://github.com/Juanvvc/c172p-detailed/issues/134#issuecomment-107653548.
I don't understand well what this moment is. From which axis? To counteract which moment when stopped on the ground?
If we have to do a calculus, I prefer
Force = (compression-ft) x (spring_coeff) + (compression-velocity-fps) x (damping_coeff)
It is direct, easy to understand and rigorous. It can easily be applied separately on each gear.
I will try this, to see if I've understood well and if it works.
Ok, your equation seems better.
I have a test file (working file). http://www.mediafire.com/download/wud4yvfdtbp80hq/C172-gear-damage-force-20150602.7z
Only for the principles, kind of feasibility, to get your opinion.
Instead of breaking the gears and having to repair each time, I have made the forces on gears printed in the console above a threshold, which can be considered as the future breaking-threshold. By lowering the threshold, it can be used as a tool to measure these forces rather than doing trial and error. The first values to be fiddled are the threshold forces. For the nose, 1350 lbs is necessary to not break it on strong and long braking. It "breaks" on a strong nose contact. For the main gears, I hesitate between 1500 and 2000 lbs. It must hold at full load and for crosswind landing.
More difficult to break at default loading, but if FG works well, the principle seems realistic.
Some more complication in the nasal file because of the calculation lines, but after that the breaking criteria is obvious and the same as IRL.
Promising IMHO.
@tigert, if you can? Also, I have found a global gear-Y-force in the FDM. It might be used to break the gear in crab landing or bad crosswind landing. I've not still tested.
@dany93 Just create a branch in your own repository:
git checkout -b gear-changes
git push -u origin gear-changes
~~How can I recover the content I had in my branch "master" before these changes?
I've done git checkout master
then git pull
but, in my working directory, the files that I see on my disc inside my github folder are still with my last changes (physics.nas).~~
Sorry. I was mistaken by the recent file-dates but the file contents are the initial ones. OK
@dany93 Thanks. I'll test this tomorrow, it's night time currently.
I have added a "print" in the console for the side force on gears (along Y-axis). tigert wrote:
Side loads would be interesting to check too, like on crosswind landings with nasty bounces
@tigert: what do you think we should set as the breaking threshold for this side force? I'd say between 700 and 1000 lbs. It must hold crosswind landings at full load (not easy).
@wlbragg I have not understood well your links between the damages on wings and the 3D representation. As well as the damage names, the "var" in physics.nas
What I have seen:
Will you take care of this when the breaking thresholds on the ground are set? If I have to do it, I will need the properties or nasal variables in connection with the 3D results. And to agree, on the ground, which gear damage (or over-g's on the ground) makes which 3D wing damage.
When you define a variable for the first time, you should add var
so that it is a local variable. When you later assign a new value to it, you don't need to use var
again.
Yes, but this is a working file. I did not want to write everywhere.
In the "good" version, the variables will be defined as var =
at the top of the file, like those for wing damages. Inside the loop, only the name of the variable will be called.
Ok, I'll start testing your branch in an hour or so.
@dany93 I have tested your branch. The forces are nicely printed in the console. I think gear should break > 2000. Can you implement this in the current version? (Your master branch is 32 commit behind) We can later tune the 3 numbers (the forces) if necessary.
OK, the important was your agreement on the principle. I update my master branch, introduce the gear breaking instead of the printing, and I do a pull request. (Tomorrow, now that's for me that it is late and I do not like make things in a hurry)
I was just playing with the current version and testing if the wings would fall off from overspeed... this is not with @dany93 stuff you have been talking about in recent posts... I got up to ~10000 and threw her into a dive... from chase or heli view, I saw "wing damage" reported but couldn't see anything... ok... then I saw the wings break outboard of the struts and the wings broken report... I kept on going looking to see if they'd come off but they didn't... it was a dance try to recover and she dived into the ground only to bounce some 2000 back up into the air :laughing: I did get into some spins but I don't know enough about how to recover from them... is quite freaky seeing everything spinning around from inside the cockpit and not knowing which way is which... I hope I never experience it in RL...
The wings can be heavily damaged, but cannot be separated. That would be cool though :smile:
The wings are broken "in the FDM", but the 3D wing representation do not completely break them, it is a matter of animation. This is the subject of my question to wlbragg in this message https://github.com/Juanvvc/c172p-detailed/issues/134#issuecomment-108431906.
I this situation, the "Repair" option is miraculous. If you are too close to the ground, Ctrl-u and some touch (pull gently) can help. No parachute is simulated... Even with "Repair", try slowing down the aircraft before repair (by strongly pulling the yoke until being below the bad speed) or the wings will break again. Stressful, isn't it? :smile:
hahaha, i played the CTRL-U card numerous times, yes... as for slowing down, a lot of times after the breakage i was close to stall speed...
speaking of which, i haven't heard the stall horn in a while... i have to have my engine sounds turned down to hear the radios clearly... is the stall sound in the same ""voice"" as the engine sound? yeah, i now... probably another issue ;)
dany, "What I have not seen: one or both wings really broken inflight " I think we can do that, you want from the support strut to the tip "gone" broken off, yes?
This is one I really want to do. We have the modeled effect and the consequent FDM effect in place. I need the force calculations from the FDM?