-
Notifications
You must be signed in to change notification settings - Fork 9
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
Simple damage system #328
Simple damage system #328
Conversation
- code ported over from c172p and adjusted voefficients accordingly to already present values - Added a simple damage handler (damage.nas) that informs the pilot via text of broken things. Now we could practice smooth landings without killing the front gear :) - Added a simple gui showing all damaged parts, so pilot can check it. TODOS: - It has no effect on flight dynamics yet. - Damage should be stored over sessions when initializing "saved" state.
@hbeni So, you are now going the c172p way? I wasn`t happy with this, since I experience a significiant lower fps with the c172p compared with the c182s. |
… the repairs triggers a pushup
…r tweaking once the damage model is set
Hi Heiko, i had the FPS in mind and that was the reason i implemented it (like c172p) using jsbsim, which should be quite fast. Its really just some really small calculations this far. I think the hiccups you experienced came from the effects with the 3d stuff. I could not trace performance issues here so far; do you have any now with the branch? Also, this was not soooo much of work so far, so if you have a better way and time to implement it, we can just easily throw away this implementation. Most of it is in |
Like Heiko, I'm not a huge fan of the c172p approach to adding very complex systems to what are fundamentally edge-cases and trying to model the impact of damage.. I think it's very good to notify the user when limits are exceeded that would damage the aircraft - wing G-loading, excess undercarriage loads, exceeding VNE. However I'm less convinced about trying to model that damage either graphically or in the FDM. In my mind it is sufficient to simply provide a warning message to the screen. Some users will ignore this, others will be trying to fly within the envelope. In terms of damage modeling itself:
I also don't think modeling damage to aircraft after they exceed Vne is accurate. As part of my annual check flight, my aircraft is flown as close to Vne as it can (e.g. steep dive, full power). So I do not think it would be damaged as soon as it exceeds it in any real way. -Stuart |
The problem is to detect that some value was exceeded. This is the part which was modelled in jsbsim, because it is simple and fast there. I agree that we really don't need some fancy 3D modelling of damage for now (however that would add the public value of the simulator in my eyes), but i think it is very useful that the plane will not be flyable anymore when the wings broke (they don't do it straight out and well above the Vne value currently), as well as a collapsed gear - it gives immediate visual feedback to the pilot. |
@hbeni @stuartbuchanan I am unsure, I like the way X-Plane handles it. Text messages are nice, but not realistic, as the real pilot has to find out himself what is going on. A bent leg or ruptured tyre won´t stop it within milliseconds, but will let the aircraft slide some time. Unfortunately I don`t have much time for flightgear due to my master studies and teaching nursing students - I just keep watching the developement of FlightGear (plus having already an eye on a certain known british helicopter fgfs sim group taking things from my work under their name.... 😡 ) |
No worries. I donÄt think it is done in stone, but i think what we have here is better than nothing. We may come back and improve anytime. |
I don't know XPlane - how does it handle it? |
@hbeni |
Animations would be nice but please stay sharp on performance... |
That is right. It's almost entirely the extra mesh. The j3 was even worse as it had unnecessary 4kX4k textures. I think had I to do it all over from scratch, I would use shaders for the damage visuals. Something akin to wingflex. |
Signed-off-by: Heiko Schulz <Heiko.H.Schulz@gmx.net>
Looks very good! |
@HHS81 Heiko, what do you think: The damage inspection GUI was introduced from me because i had the impression, damage will not be reflected in the model in the near timeframe. |
FYI: I noticed you may be using a "repairing" flag to use for settling damage when resetting damage, similar to what the c172p does. Note an unresolved issue with the repairing flag and timer on "Airport Relocation" using the GUI. |
Oh god, it worked. Poor plane... Good that its so cheap to repair :) |
I didn`t like the fact that you can fly through trees of a forest and still get up into the air. I don´t want to have a crash simulator, but also not an arcade game, where you get signalized "game over". |
First I want to find out, why the JSBsim structure points don´t recognize WOW. Then I will see... |
Hey Heiko,
i tried to figure out what exactly you are after, can you elaborate a bit so i can assist? |
Damage < 90ft AGL assumes that all trees are that high.
Looking through the regional material definitions, there are a lot of areas
where the height of trees is significantly lower than 90ft:
Here's a very rough distribution of heights:
10: 14
15: 24
20: 73
25: 63
30: 0
Obviously that is a count of regions, not the areas of the said regions.
I suggest lowering the limit to (say) 50ft (~15m). That would ensure you
are hitting the tree below the tree-tops (we generate some variation in the
tree-top height as well), account for the c182 being high-wing, and the
wing being strong enough to work as a leaf-strimmer for small branches!
(Personally, I'm not a fan of complicated damage systems, and particularly
the effort to animate a crashed aircraft. My experience IRL is that no-one
wants to look at a crashed aircraft except the accident investigator and
the engineer fixing it.)
…-Stuart
|
Would it be possible to get the current regions average tree height (or even the tree height from the actual area) from the property tree? If so, we could easily make it dynamically. |
Unfortunately not. They are not shown in the property tree, otherwise I would like have done it that way. 😞 |
Should we open a FR ticket on fgfs core to get the property? :) |
Yes, that sounds like a good compromise. |
You can do it if you want |
I don´t get any WOW-signal of the structure points, when the gear is crashed |
done: https://sourceforge.net/p/flightgear/codetickets/2389/ |
I think that too. The crash-feedback is extremely valuable tough, especially with the gear collapse we can train good landings. |
@HHS81 I tried it and can't reproduce (ie i get WOW contacts after crash) - is it this what you where looking after? |
Just deteced that the C182T is broken with these additions. We need to port it over... |
So, i just ported missing bits to the C182T :) @HHS81 Heiko, did my investigation above (#328 (comment)) help you already? |
…l tank rupture spills all fuel and breakage of navlights/strobe)
I just added a small enhancement: If the wings are damaged, fuel will leak out of the broken tank. I think, the last thing missing here is the model showing the wing damage. the other stuff seems to work fine, both on the S and the T variant; i did plenty of test flights already. |
Hmm... the Cessna 182s has fuel bladders- I don`t think that fuel will leak with low wing damage. |
Thanks for catching, i didn't know. The POH id not mention specifics :) Did my #328 (comment) help you? |
Not really- but I guess I do know why it behaves like that. I think we can merge |
@HHS81 should i, or do you want to do it yourself? |
Implemented a simple damage detection System (as foundation to #141):
Systems/damage.xml
)Nasal/damage.nas
) that informs the pilot via text of broken things.Now we could practice smooth landings without killing the front gear :)
noeffect on flight dynamicsyet. This could easily achieved by integrating the damage values to the fcs calculations,like it's done in the c172pAs said in #141, model/graphical stuff etc. is to be done separately; Heiko already has some ideas for that.