NASSP
NASSP copied to clipboard
Subsystem Failures
This is a rough implementation of subsystem failures. Currently it can fail G&N systems in the CM by having circuit breakers randomly fail open at different rates set through the new "SYS" button on the PAMFD failure page. The failures default to "off" and all failures are printed into the Orbiter log. The .Failed valued is placed in the scn second field for each switch to allow for saving and loading.
You can create a lot of contingency situations just by essentially unplugging stuff and it creates the effect of the failure, but it has its limitations (for example Apollo 16's degraded TVC Motor). Doing it another way looks like it would involve a lot more code in each individual subsystem.
Short term to do: -Allow failed breakers to still be manipulated without supplying voltage (done) -Place all CSM (done)/LM circuit breakers into a class array to make the code cleaner -Change the "realistic" failure rate to be realistic based on historical data.
Long term: -Allow thrusting, extreme maneuvering, or extreme temperatures to effect failure rate (if any data supports this) -Allow for tanks to leak
GetState() is used properly in Voltage() and the breakers can now be manipulated when failed.
@abr35 you've pushed an additional commit since marking this ready for review. Do you have more to add or do you want us to look at it now?
I've tagged this as a Future Release. While I love that there is the ability to fail circuit breakers I think a more future proof solution that does not depend on a static list of CBs but uses a more generic interface to let systems register their failure states and triggers would be more viable.
This is a good starting point for more advanced systems but I think it needs more time to mature before being merged to mainline NASSP.
A bunch of ideas from this PR have been taken up in my own version of a failure simulation overhaul (#1121). As this has become quite dated I will go ahead and close this. Hopefully my version fulfulls most ideas that this PR was meant to improve. Thanks @abr35 !