You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix survival chance per timestep calculation (#287)
TF consistently interprets the 'momentary failure rate' curve as
'instantaneous hazard rate' - the proportional failure rate of systems
still working at the current time - for display purposes (e.g. the
'Reliability' and 'MTBF' displays are calculated as if it is the hazard
rate). However, the conversion to a failure chance per update cycle
wasn't done correctly, and the actual failure rate over time didn't
match the instantaneous MTBF when the failure rate is not constant.
Now, the cycle reliability curve directly specifies the hazard rate h(t)
(which is the same as the 'failure rate' λ(t)), and the chance to fail
over a timestep Δt is h(t)*Δt.
@@ -206,7 +197,7 @@ public override void OnUpdate()
206
197
// Debug.Log(String.Format("TestFlightReliability: Survival Chance at Time {0:F2} is {1:f4} -- {2:f4}^({3:f4}*{0:f2}*-1.0)", (float)operatingTime, survivalChance, Mathf.Exp(1), (float)currentFailureRate));
207
198
if(verboseDebugging)
208
199
{
209
-
Log($"Part has failed after {operatingTime:F1}secodns of operation at MET T+{vessel.missionTime:F2} seconds with roll of {failureRoll:F4}");
200
+
Log($"Part has failed after {operatingTime:F1}seconds of operation at MET T+{vessel.missionTime:F2} seconds with roll of {failureRoll:F4}");
0 commit comments