Jump to content

[1.8.x] Where Can I Go? The Opposite of a problem 2.1 (30/01/2020)


severedsolo

Recommended Posts

On 9/3/2019 at 6:53 PM, Gordon Dry said:

One thing, this typical stockish Unity-ish green and red on dark grey stuff - the red on dark grey I just even do not try to decipher. It lacks a proper contrast.
Some coloring like the Kerbalism UI does would be very helpful.

 

On 9/25/2019 at 8:22 PM, glibbo said:

I also have to agree with this, if you could make it more "eye friendly" would be good, otherwise a great mod, thank you.

Where Can I Go 1.2 Released

  • Added ability to pick the colour of the readouts.
  • Fixed Eve landing figures in JNSQ

You can now pick the colour of the readouts with a MM Patch

@WHERE_CAN_I_GO
{
	@colorIfYes = green
    @colorIfMarginal = yellow
    @colorIfNo = red
}
//supported colours are any that Unity's Color class will accept (case insensitive). Namely:
                black
                blue
                cyan
                gray/grey (will accept either spelling)
                green
                magenta
                red
                white
                yellow```

 

 

Edited by severedsolo
Link to comment
Share on other sites

  • 1 month later...
  • 3 months later...
On 1/30/2020 at 4:03 PM, severedsolo said:

Where Can I Go 2.1 Released

  • Add "Payload Only" option in the Editor. This will remove the DV required to get to orbit from the calculations (useful if you want to see if the payload can do it's mission)
  • Upped DV to get to orbit in JNSQ

Getting a lot of good use out of payload only, thanks!

Link to comment
Share on other sites

  • 2 months later...

Heya. So, about those icons. I’ve been thinking. 

Why not use the same symbols as the dV map where applicable? Because the dV map covers most stages of flight and will be known by most. 

Alas, no example to show. I do far more thinking than actually doing. ;) 

Edit: With regards to the colors, I know they’re customizable now, but consider replacing red with greyed-out. After all, it’s not dangerous, it’s just not possible. (Though I guess that could be dangerous..)

Edited by Jognt
Link to comment
Share on other sites

8 hours ago, Jognt said:

Edit: With regards to the colors, I know they’re customizable now, but consider replacing red with greyed-out. After all, it’s not dangerous, it’s just not possible. (Though I guess that could be dangerous..)

Problem is, greyed out is difficult to read, the KSPSkin is already pretty grey (I know come people think red is hard to read too, but this would be worse)

In regards to the icons - I haven't forgotten, I just don't have time at the moment, and it's pretty far down the list.

Having said that, my new PC for work is coming at some point this week, so I can reclaim my gaming PC, so normal service should be resumed shortly.

Link to comment
Share on other sites

  • 4 months later...
On 8/28/2019 at 11:48 AM, severedsolo said:

You could try this:

I need to do an update anyway though, as I noticed a couple of issues. I might have it handle rescales automatically

If this holds true, it should be fairly easy to make a "universal" MM patch for simple rescales (e.g. Sigma Dimensions + RESCALE! mods)

I'ma take a crack at this - this looks like a cool mod, but it's currently useless to me since I run 10.625x myself. :D

Link to comment
Share on other sites

@severedsolo = And hey, here we go:

@WHERE_CAN_I_GO:NEEDS[SigDim2&RESCALE]:LAST[WhereCanIGo]		// Needs to be LAST, in case of other planet packs that don't have an inherent rescale, e.g. OPM
{
  @notes = Automatically Generated Rescale
  @warning = Note - these values may be grossly inaccurate.

  dvScaleMult = #$@SigmaDimensions/Resize$

  @dvScaleMult != 0.5


  @BODY,* // This edits all "BODY" entries.
  {
        @flybyDV *= #$../dvScaleMult$				//-1 indicates that the task is impossible and will display "N/A" in the UI.
        @orbitDV *= #$../dvScaleMult$				//Figures should always include DV to get to orbit of the homeworld. (mod will handle removing those itself when needed)
        @synchronousDV *= #$../dvScaleMult$			//this will replace landDV in the UI if used. Probably only want to use this for the homeworld
        @landDV *= #$../dvScaleMult$
        @returnFromFlybyDV *= #$../dvScaleMult$		//return figures are for the return trip only. They will be added to the figures provided in the previous stage.
        @returnFromOrbitDV *= #$../dvScaleMult$
        @returnFromLandingDV *= #$../dvScaleMult$
  }
}

Only problem I have is the following:

https://www.dropbox.com/s/8px537ucaiwsrgq/WCIGBaddvReadings.png?dl=0

Basically, all of my Delta-V values are equivalent to my craft's dV, and none of the values from the config seem to be read.

A snip of the modified config after MM gets done with it looks like this - it's definitely inserting the values as expected:

UrlConfig
{
	parentUrl = WhereCanIGo/WhereCanIGo.cfg
	WHERE_CAN_I_GO
	{
		notes = Automatically Generated Rescale
		warning = Note - these values may be grossly inaccurate.
		colorIfYes = green
		colorIfMarginal = yellow
		colorIfNo = magenta
		dvScaleMult = 3.25960120260132
		BODY
		{
			name = Kerbin
			flybyDV = -3.25960120260132
			orbitDV = 12386.484569885
			synchronousDV = 16020.9399107855
			landDV = -3.25960120260132
			returnFromFlybyDV = -3.25960120260132
			returnFromOrbitDV = 325.960120260132
			returnFromLandingDV = -3.25960120260132
			requireChutes = true
		}
		BODY
		{
			name = Mun
			flybyDV = 15189.7416041222
			orbitDV = 16200.2179769286
			landDV = 18090.7866744373
			returnFromFlybyDV = 0
			returnFromOrbitDV = 1010.47637280641
			returnFromLandingDV = 2901.04507031518
			requireChutes = false
		}
		BODY
		{
			name = Minmus
			flybyDV = 16526.1780971887
			orbitDV = 17047.7142896049
			landDV = 17634.4425060731
			returnFromFlybyDV = 0
			returnFromOrbitDV = 521.536192416211
			returnFromLandingDV = 1108.26440888445
			requireChutes = false
		}

Based on some experimentation, it looks like it REALLY doesn't like the long decimals, and that's what causes it to go wonky - making a patch manually from the MM cache, truncating the values, and applying that instead makes it work as expected. So consider that a bug report. :sticktongue:

 

With ALL that said... the dV values are WAY too high. Multiplying by the square root of the rescale seems to give values about 2000-3000m/s above what I'd expect. This patch may not be viable after all. :(

I'll do a bit of poking around and see if I can find something more reliable - I'm sure it's something that RESCALE! is doing that I'm not taking into account in some way, shape, or form (or maybe it just needs to be 10.625x minus 1 before I square root it... hmmm)

 

Also, this needs to go in the OP:D

On 9/29/2019 at 10:11 AM, severedsolo said:

You can now pick the colour of the readouts with a MM Patch


@WHERE_CAN_I_GO
{
	@colorIfYes = green
    @colorIfMarginal = yellow
    @colorIfNo = red
}
//supported colours are any that Unity's Color class will accept (case insensitive). Namely:
                black
                blue
                cyan
                gray/grey (will accept either spelling)
                green
                magenta
                red
                white
                yellow```

 

Link to comment
Share on other sites

@etmoonshade coincidentally I've also being working on this yesterday when I saw the discussion about it get brought up. I made something similar to yourself but it seems to work, as severedsolo mentioned above, due to my patch converting the floats to ints.

// Where Can I Go? - Universal Sigma Dimensions Rescale
// - Poodmund
 
@WHERE_CAN_I_GO:LAST[SigDim2]
{
	// rescaleFactor determines the orbital radius parameter
	rescaleFactor = #$@SigmaDimensions/Rescale$
	@rescaleFactor != 0.5
	
	// resizeFactor determines the celestial body radius parameter
	resizeFactor = #$@SigmaDimensions/Resize$
	@resizeFactor != 0.5
	
	@BODY[*]:HAS[#flybyDV[-1],#landDV[-1],#returnFromFlybyDV[-1],#returnFromLandingDV[-1]]
	{
		// multiply values by rescale/resize parameters
		@orbitDV *= #$../rescaleFactor$
		@synchronousDV *= #$../rescaleFactor$
		@returnFromOrbitDV *= #$../rescaleFactor$
		
		// turn floats into integers for mod compatibility
		@orbitDV = #$orbitDV[0,.]$
		@synchronousDV = #$synchronousDV[0,.]$
		@returnFromOrbitDV = #$returnFromOrbitDV[0,.]$
	}
	@BODY[*]:HAS[~flybyDV[-1],#landDV[-1],#returnFromLandingDV[-1]]
	{
		@flybyDV *= #$../rescaleFactor$
		@orbitDV *= #$../rescaleFactor$
		@synchronousDV *= #$../rescaleFactor$
		@returnFromFlybyDV *= #$../rescaleFactor$
		@returnFromOrbitDV *= #$../rescaleFactor$
		
		@flybyDV = #$flybyDV[0,.]$
		@orbitDV = #$orbitDV[0,.]$
		@synchronousDV = #$synchronousDV[0,.]$
		@returnFromFlybyDV = #$returnFromFlybyDV[0,.]$
		@returnFromOrbitDV = #$returnFromOrbitDV[0,.]$
	}
	@BODY[*]:HAS[~landDV[-1],~returnFromLandingDV[-1]]
	{
		@flybyDV *= #$../rescaleFactor$
		@orbitDV *= #$../rescaleFactor$
		@synchronousDV *= #$../rescaleFactor$
		@landDV *= #$../rescaleFactor$
		@returnFromFlybyDV *= #$../rescaleFactor$
		@returnFromOrbitDV *= #$../rescaleFactor$
		@returnFromLandingDV *= #$../rescaleFactor$
		
		@flybyDV = #$flybyDV[0,.]$
		@orbitDV = #$orbitDV[0,.]$
		@synchronousDV = #$synchronousDV[0,.]$
		@landDV = #$landDV[0,.]$
		@returnFromFlybyDV = #$returnFromFlybyDV[0,.]$
		@returnFromOrbitDV = #$returnFromOrbitDV[0,.]$
		@returnFromLandingDV = #$returnFromLandingDV[0,.]$
	}
}

I've sent the patch to serveredsolo anyway so something will probably make its way into the core mod at some point in the future. :D 

Link to comment
Share on other sites

2 hours ago, Poodmund said:

@etmoonshade coincidentally I've also being working on this yesterday when I saw the discussion about it get brought up. I made something similar to yourself but it seems to work, as severedsolo mentioned above, due to my patch converting the floats to ints.


// Where Can I Go? - Universal Sigma Dimensions Rescale
// - Poodmund
 
@WHERE_CAN_I_GO:LAST[SigDim2]
{
	// rescaleFactor determines the orbital radius parameter
	rescaleFactor = #$@SigmaDimensions/Rescale$
	@rescaleFactor != 0.5
	
	// resizeFactor determines the celestial body radius parameter
	resizeFactor = #$@SigmaDimensions/Resize$
	@resizeFactor != 0.5
	
	@BODY[*]:HAS[#flybyDV[-1],#landDV[-1],#returnFromFlybyDV[-1],#returnFromLandingDV[-1]]
	{
		// multiply values by rescale/resize parameters
		@orbitDV *= #$../rescaleFactor$
		@synchronousDV *= #$../rescaleFactor$
		@returnFromOrbitDV *= #$../rescaleFactor$
		
		// turn floats into integers for mod compatibility
		@orbitDV = #$orbitDV[0,.]$
		@synchronousDV = #$synchronousDV[0,.]$
		@returnFromOrbitDV = #$returnFromOrbitDV[0,.]$
	}
	@BODY[*]:HAS[~flybyDV[-1],#landDV[-1],#returnFromLandingDV[-1]]
	{
		@flybyDV *= #$../rescaleFactor$
		@orbitDV *= #$../rescaleFactor$
		@synchronousDV *= #$../rescaleFactor$
		@returnFromFlybyDV *= #$../rescaleFactor$
		@returnFromOrbitDV *= #$../rescaleFactor$
		
		@flybyDV = #$flybyDV[0,.]$
		@orbitDV = #$orbitDV[0,.]$
		@synchronousDV = #$synchronousDV[0,.]$
		@returnFromFlybyDV = #$returnFromFlybyDV[0,.]$
		@returnFromOrbitDV = #$returnFromOrbitDV[0,.]$
	}
	@BODY[*]:HAS[~landDV[-1],~returnFromLandingDV[-1]]
	{
		@flybyDV *= #$../rescaleFactor$
		@orbitDV *= #$../rescaleFactor$
		@synchronousDV *= #$../rescaleFactor$
		@landDV *= #$../rescaleFactor$
		@returnFromFlybyDV *= #$../rescaleFactor$
		@returnFromOrbitDV *= #$../rescaleFactor$
		@returnFromLandingDV *= #$../rescaleFactor$
		
		@flybyDV = #$flybyDV[0,.]$
		@orbitDV = #$orbitDV[0,.]$
		@synchronousDV = #$synchronousDV[0,.]$
		@landDV = #$landDV[0,.]$
		@returnFromFlybyDV = #$returnFromFlybyDV[0,.]$
		@returnFromOrbitDV = #$returnFromOrbitDV[0,.]$
		@returnFromLandingDV = #$returnFromLandingDV[0,.]$
	}
}

I've sent the patch to serveredsolo anyway so something will probably make its way into the core mod at some point in the future. :D 

Oh-ho. Okay, I see how you dealt with truncating the values now. I guess that means nobody needs to answer me in the MM thread now. :D

Yours is certainly more elegant. Is there a particular reason you bring in both Resize and Rescale though? And, for that matter, any insight into the actual exponent?

Based on some fiddling I did last night, a cube root multiplier is actually way closer to the truth than a square root multiplier. On 10.625x, I get ~12k for launch dV with a square root, but ~8.3k with a cube root. I ended up getting the following actual values:

Body Calculated dV (^0.333) Real dV
Kerbin 8354 8450
Mun 10926 11394
Minmus 11498 12121

The big issue is that I haven't tried this with other rescales, but a cube root being SO close makes me think that the post referred to is mistaken somehow.

Link to comment
Share on other sites

2 minutes ago, etmoonshade said:

Is there a particular reason you bring in both Resize and Rescale though?

Pood and I hashed this out this morning. There is an edge case where Resize and Rescale could be different values and WCIG would fail hard. I've chosen to take the easy route and WCIG will just refuse to do the calculation where that occurs.

Link to comment
Share on other sites

On 9/20/2020 at 2:11 PM, severedsolo said:

I've chosen to take the easy route

Well, I just changed lines 17-19:

		@orbitDV *= #$../resizeFactor$
		@synchronousDV *= #$../resizeFactor$
		@returnFromOrbitDV *= #$../resizeFactor$

 

On 9/20/2020 at 2:08 PM, etmoonshade said:

Calculated dV (^0.333)

I will also test it.

Link to comment
Share on other sites

  • 1 month later...
On 11/7/2020 at 9:33 AM, Wahgineer said:

@etmoonshadeTo think something I posted 4 years ago would come up again. Sorry if it's a little inaccurate, it was very off the cuff math that worked good enough for me at the time.

For what it's worth, I wasn't calling you out - just testing the values and found that it didn't match what MechJeb was saying. :D

Link to comment
Share on other sites

  • 7 months later...
  • 4 months later...

@theleg It does work on KSP 1.12.2. Somehow.

@severedsolo

I'm on JNSQ - which got configs - but after a sudden I get issues in VAB, no more calculations occurring and a "lie":
"Cannot find config in file : WHERE_CAN_I_GO".

A short time before this happened:

[EXC 23:53:49.386] StackOverflowException: The requested operation caused a stack overflow.

followed by exactly 1000 lines of

VesselDeltaV.ProcessDecouplePartInfoChildren (DeltaVPartInfo partInfoItem, VesselDeltaV+PartStageComparisonOperator comparisonOp, System.Int32 decoupleStage, System.Int32 activationStage, System.Boolean bypassFairings, System.Boolean bypassJettison, System.Boolean setToParentDecoupleStage) (at <cd473063d3a2482f8d93d388d0c95035>:0)

then followed by

    UnityEngine.DebugLogHandler:LogException(Exception, Object)
    ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
    UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
    VesselDeltaV:<CheckDirtyAndRun>b__68_0()
    <DelayedCallback>d__1:MoveNext()
    UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

This happened building a Luciole rocket - after I attached the "Honeybee" engine mount, which got 7 nodes for the "Mosquito" engine (1 center, 2x3 radial).

The logs:
https://www.dropbox.com/s/9w3xclcg71siwwo/KSP logs 2021-11-06-01.7z?dl=1

 

Edit: leaving VAB and reentering fixed the issue - for now

Edited by Gordon Dry
Link to comment
Share on other sites

Here is a patch for JNSQ_Rescale_10x which only works if you copy from JNSQ's "Optional Mods\JNSQ_Rescale\Rescale_10X\GameData\JNSQ_Rescale\" into GameData and then rename the folder to JNSQ_Rescale_10x

Put it into GameData\WhereCanIGo\Patches\JNSQ_Rescale_10x.cfg

see
https://github.com/severedsolo/WhereCanIGo/issues/8
https://github.com/severedsolo/WhereCanIGo/issues/9

 

Edited by Gordon Dry
moved to GitHub
Link to comment
Share on other sites

  • 2 weeks later...
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...