Jump to content

[1.8.1] TestLite: TF replacement for RO


soundnfury

Recommended Posts

I think all you need to do is to use reflection to get the TestLiteGameSettings type, then (somehow) the equivalent of:

TestLiteGameSettings settings = HighLogic.CurrentGame.Parameters.CustomParams<TestLiteGameSettings>();
if (settings != null) {
	/* Do things with:
	 * settings.preLaunchFailures;
	 * settings.determinismMode;
	 * settings.disabled;
	 */
}

as per the code in TL that does this.

However I don't know exactly how one does that in looking-glass-land, as I've never really used reflection.

Link to comment
Share on other sites

  • 1 month later...
  • 4 months later...
On 1/7/2020 at 6:51 PM, Galland1998 said:

Does this work in Stock at all or does it require RO to function?

It has a hard dependency on RealFuels (≥12.6).  Strictly speaking it doesn't require RO, but such setups are untested and might break in unexpected ways.

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...

hi! I wondered if there was any way of using Kerbal Konstructs launch sites with TestLite. I am working on very big spaceplanes that do not take off from the short & buggy stock runway and I would like to test them by taking off from a bigger KK runway. Thanks in advance!

Link to comment
Share on other sites

18 hours ago, hypervelocity said:

hi! I wondered if there was any way of using Kerbal Konstructs launch sites with TestLite.

Haven't used KK so maybe I'm missing something obvious, but could you explain why you expect either mod to be affected by the other's presence?

Link to comment
Share on other sites

hey @soundnfury, thank you for your reply! KK enables the placement of statics, which in turn can be configured as lunch sites, just like the stock launch pad or runway. regarding TestLite, I am referring to the option of selecting where to start the simulation from (launchpad, runway, orbit). it would be great if TestLite could pick up these KK-configured launch sites and allow for the simulation to start from one of these. in my particular case I am working in SSTO spaceplanes in RO/RSS and required vessel dimensions are prohibitive for the stock runway (which is not only short, but bumpy)

Edited by hypervelocity
Link to comment
Share on other sites

  • 2 months later...

Hi @soundnfury, I'm putting together a spreadsheet so that I can compare engine choices easily instead of hunting through PAWs and I was hoping to include Testflite reliability as part of that. I had a look at the code and notes, but I'm still struggling to find the formula to calculate the MTBF from just the ignition failure rate, full burn failure rate, and rated burn time (so that I can calculate it from the values in the config files, as opposed to going through the PAWs in game for each of the engine variants). I was wondering if you could help with the exact formula for MTBF given just those values.

Many thanks in advance!

Link to comment
Share on other sites

  • 1 month later...

@soundnfury, would you be interested in having this listed on CKAN? I noticed it mentioned as a manual step on the RP-0 wiki, whereas most of the rest of RP-0 is in CKAN already. I've got some changes teed up, and they seem to work; if you give the go-ahead, we can merge these and work with the RP-0 team to get it listed there as well:

Link to comment
Share on other sites

@nepphhh TestLite 0.3.0 now released, compiled for KSP 1.8.1.

@pt1243 Not quite sure I follow your question, but here goes.  Ignition failure rate doesn't show up in MTBF at all.  The MTBF is 1/(2Sum(f*(t)), where the sum is over the four different failure types and f* is the instantaneous failure probability (pdf divided by complement cdf).  failureRate is the full-burn failure probability, p = 1 - cycleReliability.  There's a 0.15p probability of failure in the first 5 seconds, so λ = -⅕ln(1 - 0.15p), and f*(t) = λ so MTBF = 1/(2λ) for those first five seconds.  Then over the next B (burn time) seconds there's a 0.85p probability of failure, so κ = -ln(1 - 0.85p) / B and MTBF = 1/(2κ).  (Technically this is an approximation, because each failureType has its own kappa value.  If you want to calculate it exactly, you need to do what the code does and handle each failureType separately.)  Calculating the overburn MTBF is a bit harder, because the Permanent Shutdown failure has a bathtub curve (f*(t) = 1 / (2B + 5 - t)) whereas the other three just continue on the exponential curve defined by κ.  So Sum(f*(t)) = (1-0.18p) / (2B +  + 5 - t) - ln(1-0.7p) / B, and then plug that into MTBF = 1/(2Sum(f*(t)).  Hopefully I've done all my algebra correctly there!

Though tbh I think in most cases the MTBF isn't really the figure of interest; what you actually want to know is "what's the probability of a failure in the first x seconds", and that's just the cdf, P(T < x) = 0.15p + (0.85p)(x-5)/B if 5 ≤ x ≤ B + 5; (0.15p)x/5 if 0 ≤ x ≤ 5; and some ugly mess bounded below by p + (x - B - 5)/B if x ≥ B + 5.

@HebaruSan thanks, appreciated!

Link to comment
Share on other sites

  • 4 weeks later...
On 5/14/2019 at 2:30 PM, soundnfury said:

At least in RO, the reliability configs were all written on the assumption that "0 du" is after static firing.  TestLite does not accrue du until you leave PRELAUNCH.

So if you want additional testing before launching payloads, the realistic thing to do is test flights with boilerplate payloads, battleship upper stages etc.  Those are usually quite quick & cheap to build (payloads are expensive!) and you can turn on Extra Telemetry to get even more du.  Historically, most rockets were first tested in this manner — one of the better-known exceptions was Ariane 5, and we all know how that turned out.

After watching the scrubbed static fire testing of the SN-5 Raptor engines this afternoon, it occurred to me i could possibly do this in rss/ro to improve engine reliability before using for launching rockets.

While you correctly state the old school testing techniques, would it be possible to have an entry for static testing somewhere in the tech tree to allow this ability later on? Or is this too complex a task?

I'm still new to modding games so just tell me to shut up but as you say, boilerplate test flights were the realistic test method of choice but we do now have the static flights as a realistic test method.

[SNIP]

 

And thanks for the effort you have already put into this mod, along with many others, it has vastly increased my enjoyment (and frustration at times) of ksp!

Edited by Kerbalnaut #55487
Snip - requested functionality already implemented
Link to comment
Share on other sites

  • 6 months later...
  • 4 months later...

I am having issues with Testlite. I cannot see the icon in the tray and I've tried it on 1.8.1, 1.9.x, and 1.10.1. I installed via CKAN and manually from GITHub. There is no errors in the main screen or in my KSP log. Any ideas?

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...