Board index FlightGear Development New features

New Failure-Dialog: Make your flight more challenging

Discussion and requests for new features. Please note that FlightGear developers are volunteers and may or may not be able to consider these requests.

New Failure-Dialog: Make your flight more challenging

Postby Necolatis » Sun May 22, 2016 2:04 am

So you are a good pilot already, and want to challenge yourself?

Try this out:

https://github.com/NikolaiVChr/failure-dialog

Make some failures occur that will make your flight more interesting. You can set them to happen at waypoints, by timer, by altitude or the usual MCBF/MTBF. Also it will show ALL failure modes in the aircraft, also the custom added ones that the standard FG dialogs does not show.

If enough people try this out, and find it stable enough and there is no glaring bugs, I will make a merge request to get it added to Flightgear. If there is no interest I will probably just let it rot away in my repo.

Report bugs here: https://github.com/NikolaiVChr/failure-dialog/issues

I recommend using FG 2016.2.1 to test it with.

If you do try it out, please reply back here what you think about it, or report bugs to my issue tracker.

Notice 1: On slow machines it might take some seconds to show the dialog.
Notice 2: Some of the failure check occurs by polling, so you might have to wait something like 30 seconds for it to fail after the fail condition has been met.
Notice 3: The input fields does not accept 'Return/Enter' to accept the input, click on another button/field in the dialog, will do that though.
Notice 4: The waypoint trigger cannot reverse lookup the airport from the lat/lon, so once it updates, it will show the airport as ????. Will still work fine though.

Disclaimer: On installation you have to overwrite 3 files. It would be a good idea to back them up first. 2 are used to show the menu item, the last is to register 2 Canvas widgets used.

Happy crashing flying. :D
Last edited by Necolatis on Mon May 30, 2016 3:06 am, edited 1 time in total.
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2047
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2019.1.2
OS: Windows 10

Re: Make your flight more challenging

Postby Thorsten » Sun May 22, 2016 4:51 am

Also it will show ALL failure modes in the aircraft, also the custom added ones that the standard FG dialogs does not show.


Out of curiosity - how do you know how all failure modes are stored and what their convention is?

For instance, the Shuttle has a 'fail-on' mode for RCS thrusters implemented in which they can't be switched off by software command, you have to cut fuel. The trigger signal for this failure mode is a thruster condition > 1 - how would the script know of this convention?
Thorsten
 
Posts: 11375
Joined: Mon Nov 02, 2009 8:33 am

Re: Make your flight more challenging

Postby Necolatis » Sun May 22, 2016 5:49 am

I just query the failure manager and ask for all failure modes. I will then get all the standard (for the shuttle I get those, including 50 engine failure modes.) plus whatever ones you have added to the failure manager.

If some have a custom trigger, it will just show the trigger description, and display the failure state plus if the trigger is active or not, both which can be modified. Like this:

Image

I just loaded up the FGAddon Shuttle for 2016.2 release, and must admit I did not see any added failure modes. So either there is a bug in my code, or you did not add that/those failure modes to the failure manager in a standard way, not sure.
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2047
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2019.1.2
OS: Windows 10

Re: Make your flight more challenging

Postby Thorsten » Sun May 22, 2016 6:46 am

Ah, sorry - I missed the part where the standard failure manager is required. The Shuttle has failure modeling integrated into the JSBSim systems definitions with potential cascades of systems affected downstream and redundancy management.

I've just checked that whatever you do with the default manager is ignored - I can uncheck the OMS engines in the standard failure manager, but they still ignite properly unless I cause a He failure or an engine failure in the JSBSim model.

So perhaps it'd be worth checking somehow if the standard failure manager is even active for an aircraft?
Thorsten
 
Posts: 11375
Joined: Mon Nov 02, 2009 8:33 am

Re: Make your flight more challenging

Postby Necolatis » Sun May 22, 2016 6:57 am

Will try looking into that.
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2047
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2019.1.2
OS: Windows 10

Re: New Failure-Dialog: Make your flight more challenging

Postby Necolatis » Mon May 30, 2016 3:12 am

Well, I cannot check if Aircraft are using custom ways to start their engines, or if they respect serviceable properties when they modeled the plane. Unless I make a list of aircraft that respect those serviceable properties and use standard engine systems, I cannot really detect that. I think for most aircraft it will work though, or at least most of the failure modes will work.
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2047
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2019.1.2
OS: Windows 10

Re: New Failure-Dialog: Make your flight more challenging

Postby Thorsten » Mon May 30, 2016 5:11 am

I *suspect* the way this works for propulsion is that there's some automatic fallback defining the relation between throttle-cmd-norm and throttle-pos-norm in JSBSim that is used if you don't declare anything and knows of the serviceable, but you can explicitly define a relation, by-passing that. So that'd indeed be difficult to detect.

We could set a flag for aircraft to opt-out of the system-wide failure dialog I guess - which the aircraft maintainer can set.

Or it depends on how your dialog gets in - I can aircraft-side override menu items (for instance the Shuttle has a custom propellant dialog) - the same can of course be done for the failures.

Maybe this ought to be discussed in a wider circle to see what makes sense. But I suspect the best developed aircraft will have custom failure modes rather than using the boolean 'serviceable' the global system has - so there ought to be a way to manage this.
Thorsten
 
Posts: 11375
Joined: Mon Nov 02, 2009 8:33 am


Return to New features

Who is online

Users browsing this forum: No registered users and 2 guests