Jump to content

[1.11–1.12] Planning Node 0.1.4


HebaruSan

Recommended Posts

Planning Node

This mod's goal is to create a stock-alike method for planning interplanetary transfers that preserves the flexibility and "learn by doing" approach of stock maneuver nodes.

Download

The latest version is available on Github.

The source code is in the same repo:  https://github.com/HebaruSan/PlanningNode

The bug tracker is there as well:  https://github.com/HebaruSan/PlanningNode/issues

The license is GPL-3.0.

Installation

Unzip the PlanningNode folder into your GameData folder. The structure should look like this:

Kerbal Space Program
+-- GameData
    +-- PlanningNode
        +-- Icons
        +-- Localization
        +-- Plugins

Usage

Planning nodes can be edited in the map view and viewed in the tracking station.

  1. Launch or switch to a vessel.
  2. Open the map view.
  3. Set your target body so you will be able to see the close approach markers.
  4. Click the Planning Node icon in the toolbar (icon). A planning node will be created and opened for editing, and the view will zoom to display it.
    created
  5. Use the node editing tools to set up the transfer you wish to perform (drag the node, add prograde/normal/radial components, etc.). You can also choose a name and color for this transfer and determine whether it should be shown for all vessels or just the current vessel in the editing window next to the toolbar button.
    transfer

    renamed
  6. Click the close button in the Planning Node window or click the toolbar button again. The view will zoom back to your craft, and a three-ring marker will appear showing the time and excess V needed to execute your transfer. (Note that the excess V is not your burn delta V, but rather how much faster than escape velocity you need to go.)
    marker
  7. Create a stock maneuver node and increase its delta V until you are escaping the current sphere of influence; the planning node's timing and excess V displays will switch from absolute values to the difference between them and your current escape.
  8. It's usually easiest to match the excess V first, so do that. This step is somewhat forgiving; you can often get within a few dozen m/s and call it good enough.
  9. Adjust the time and normal/antinormal handles till your point of escape lines up with the planning node's bulls-eye marker. This tends to be a bit forgiving as well, so don't worry about hitting the exact center. Excitedly use the phrase "five by five" in a sentence.
  10. Right click the node and use the planning node button to adjust the maneuver's time to "hit" the planning node's escape marker.

    autotime autotimeHover

    escape
  11. Zoom out to solar orbit to see how close you are to your plan. You may already have an encounter!

Other notes:

  • You can click the text labels for a planning node to edit it.
  • You can use the "New" button in the dialog to create multiple nodes for the same vessel, and the < and > buttons next to the name field to switch to other nodes.
  • Editing in the tracking station would be desirable but is not possible because the stock maneuver editor crashes outside of the flight scene's map view.
  • Blizzy's toolbar is not and will not be supported. 0.23.5 was a long time ago.

References

This was 5thHorseman/@Superfluous J's idea:

Three years later I started promoting the same concept. I thought that I came up with it on my own, but it is possible that I saw some of the above posts at some point and they sank into my subconscious.

I have a rule that if I catch myself pining for something on the forum multiple times, and no one else starts working on it, I have to; hence this mod.

How to draw orbits!

Acknowledgements

  • Thanks to @Superfluous J for originating and tirelessly advocating for the idea
  • Thanks to @Booots for posting about how to render your own orbits
  • Thanks to the good folks of the Discord for random help when I needed it
  • Thanks to my wife for assistance with the icon
  • Thanks to @AllenLi for the Chinese translation
Edited by HebaruSan
Link to comment
Share on other sites

I'm trying to remove mods from my install, and you go and pull something like this. I've got too many mods already, I don't need another one.  SIGH Fine then.  Downloads furiously ;p

Edited by vardicd
Link to comment
Share on other sites

Wow, @HebaruSan.  Just, wow.

I've never gone interplanetary in KSP.   More from my careers being restarted along with so much to do within the Kerbin SOI.  I certainly understood it well, from my study years ago of von Braun's _The Mars Project_.

But this is a major advancement.  All the explicit things in interplanetary transfer made implicit in a series of simple steps.  Bravo!

I've just started getting back into KSP and have yet to settle on a version to run.  Likely will be one of 1.9.1, 1.10.1, 1.11.0, or 1.11.1.

To the best of your immediate knowledge, do you think there will there be an issue running Planning Node on either 1.9.1 or 1.10.1 if I use them?  Thanks!

Link to comment
Share on other sites

On 2/15/2021 at 6:17 PM, Jacke said:

To the best of your immediate knowledge, do you think there will there be an issue running Planning Node on either 1.9.1 or 1.10.1 if I use them?  Thanks!

Naïvely, I would guess that this mod probably would run OK back to the last big compatibility break with KSP 1.8, but that would be "use at your own risk" territory, as I have no plans to switch to older versions to fix bugs.

Edited by HebaruSan
Link to comment
Share on other sites

Planning Node v0.1.1 is released!

I noticed the first release was really quite buggy, so I focused on tracking down as many bugs as I could find. Then I felt bad about only doing fixes, so I tried to brainstorm some new features to balance it out. This should move us a good portion of the way from proof-of-concept to usable tool.

Features:

  • Marker color editing, defaulted from target orbit (marker colors were random previously)
  • Auto-rotate camera to look at the marker you were editing after close
  • Show where off-screen markers are at screen edges
  • Button to warp to a planning node, with a healthy buffer interval

Fixes:

  • Better input locking (e.g., you can now set your target while editing a planning node)
  • Optimize trig calls
  • Don't throw exceptions for normal maneuvers
  • Don't randomly zoom in on the Sun
  • Don't tab to ghost maneuvers in map view
  • Update maneuver when switching bodies
  • Make TS button responsive when all nodes are vessel-specific
  • Make markers smaller in small SOIs and bigger in big SOIs
  • Remove Sun from list of allowed start bodies

https://github.com/HebaruSan/PlanningNode/releases/tag/v0.1.1

Edited by HebaruSan
Link to comment
Share on other sites

On 2/15/2021 at 3:30 AM, vardicd said:

I'm trying to remove mods from my install, and you go and pull something like this. I've got too many mods already, I don't need another one.  SIGH Fine then.  Downloads furiously ;p

same here buddy

Link to comment
Share on other sites

On 2/15/2021 at 5:59 AM, Superfluous J said:

You are a wonderful human being. Can't wait to try this!

Edit haha I didn't know I said this so many times over the years!

Congratulations, you finally got your wish! Still agree it needs to be stock, though.

Link to comment
Share on other sites

Planning Node v0.1.2 is released!

After the last release, I began to worry that Kottabos might stumble upon this mod at any moment and make a very embarrassing video, so I concentrated on glaring annoyances and big missing features. Primarily, clicking the plus-orbit button hundreds of times isn't fun, so now we have a button that adjusts the burn time for you in one click, assuming you've already matched up the delta V.

Enhancements:

  • Chinese localization thanks to a generous contribution by @AllenLi!
  • Auto-adjust maneuver time button; with this change, additional maneuver-manipulation mods are no longer needed:

    autotimeHover.png

Fixhancements:

  • Zoom in when switching SOI (previously only zoomed out)

Fixes:

  • Suppress one of the error messages at start (from the Rendezvous achievement)
  • Better off screen marker positioning

https://github.com/HebaruSan/PlanningNode/releases/tag/v0.1.2

Link to comment
Share on other sites

  • 2 weeks later...

Holy! Well done! I liked the post because I saw you'd had success drawing orbits. But after reading what you'd actually used it for makes me wish I could like the post multiple times! This is superb! Adding it to my 'must-have' list.

Link to comment
Share on other sites

1 hour ago, Booots said:

Holy! Well done! I liked the post because I saw you'd had success drawing orbits.

Thanks! Your linked post got me from "I have a toolbar button with the mod's name on it" and trying to find something comprehensible in the API docs to "It's drawing something! This might actually work!" So thanks again for helping us all with whatever random projects we think of that need that knowledge.

1 hour ago, Booots said:

But after reading what you'd actually used it for makes me wish I could like the post multiple times!

Well, I have posted a few more replies here... ;p (j/k)

Link to comment
Share on other sites

I have installed the mod, but writing this message before the first use of the mod, based just on OP, so sorry about that.
I believe putting text above  this marker about the encounter (then it will be happening) would be very useful (with the option to disable it)

T6EWddu.jpg

Edited by flart
Link to comment
Share on other sites

3 hours ago, flart said:

I believe putting text above  this marker about the encounter (then it will be happening) would be very useful (with the option to disable it)

Interesting idea. Can you elaborate on how it would be useful? What would you use it for?

Link to comment
Share on other sites

15 minutes ago, HebaruSan said:

Interesting idea. Can you elaborate on how it would be useful? What would you use it for?

I would know about the encounter without going to the map view. It is a flight-scene burn-time visual marker, that everything is ok.

Link to comment
Share on other sites

10 minutes ago, flart said:

I would know about the encounter without going to the map view. It is a flight-scene burn-time visual marker, that everything is ok.

No, you wouldn't, and no, it's not; the screenshot that you edited is from map view, because Planning Node markers only appear in map view.

3 hours ago, flart said:

I have installed the mod, but writing this message before the first use of the mod, based just on OP, so sorry about that.

That was not particularly respectful of my time, frankly.

Link to comment
Share on other sites

yea, that was probably brain runtime error on my side, and explanation wasn't right.  It's not about the flight/map scene, but about focusing target body via scaling up view to the whole system.

With the described feature, it would be convenient to see target body SOI periapsis (and inclination) just there, in the map view in the orbit around origin body with the prograde-y direction of the camera.

You could say,  that one doesn't need to scale up, focus view on target, and scale down, the encounter already there somewhere around the ecliptic (all planets are usually there), but the described feature still need less camera movement, the star overshadow the encounter, and an inclination in the target body could be added there.

Spoiler

1P9TH9X.jpg

x0TU1Sr.jpeg


 

Link to comment
Share on other sites

15 minutes ago, flart said:

see target body SOI periapsis (and inclination) just there

Same follow-up question as always: Why are you suggesting this? What would you use it for?

15 minutes ago, flart said:

in the map view in the orbit around origin body with the prograde-y direction of the camera.

Sorry, but I don't understand what this means.

15 minutes ago, flart said:

You could say,  that one doesn't need to scale up, focus view on target, and scale down, the encounter already there somewhere around the ecliptic (all planets are usually there), but the described feature still need less camera movement, the star overshadow the encounter, and an inclination in the target body could be added there.

Same, I don't know what you're trying to say here.

Again as always, it really helps if you can approach a suggestion in terms of: 1.) The problem it is trying to solve, 2.) The idea, and 3.) How the idea solves the problem. All I understand so far is that you suggested adding text about an encounter to the markers in the map view, but I don't know why I would want to do that.

Link to comment
Share on other sites

2 minutes ago, HebaruSan said:

1.) The problem it is trying to solve, 2.) The idea, and 3.) How the idea solves the problem.

  • The task: put SCANsat satellite in the polar 89° inclination, 1500 km orbit around Duna. 
    I create the planning node. I create the maneuver node, for achieving this orbit. I start the burn. The burn is finished, I remove the maneuver node.
    Now I need to check the achieved orbit inside Duna SOI. I don't remember where you get the inc. in the stock game, but for knowing achieved Pe. I need to scale up into whole star system, focus Duna, scale in to Duna SOI, and check the Periapsis. It is the problem, it's to many mouse movement.
  1. Problem: necessity to focus Duna for knowing parameters of achieved orbit.
  2. Idea: put parameters of achieved orbit (Pe and inc) in the discussed place.
  3. How the idea solves the problem: user will not be needed in focusing to the Duna SOI for knowing the parameters of the orbit.

Generalization:

  • if a mod, related to the some aspect of the game also already add number/graphics to the screen, I could ask to add other related to this aspect info.
    It give more information to an user, that is always nice.

    The desire to know the achieved orbit inside target body SOI after the burn is not so rare.
    The mod that makes the flying to other bodies easier, could also make easier knowing parameters of the orbit around these bodies. 

 

Link to comment
Share on other sites

34 minutes ago, flart said:
  • The task: put SCANsat satellite in the polar 89° inclination, 1500 km orbit around Duna. 
    I create the planning node. I create the maneuver node, for achieving this orbit. I start the burn. The burn is finished, I remove the maneuver node.
    Now I need to check the achieved orbit inside Duna SOI. I don't remember where you get the inc. in the stock game, but for knowing achieved Pe. I need to scale up into whole star system, focus Duna, scale in to Duna SOI, and check the Periapsis. It is the problem, it's to many mouse movement.

Oh, I see now, thanks. I won't be working on this because the concept of this mod is not about fine tuning future arrival orbits. Maybe some other mod could do this.

Link to comment
Share on other sites

This is a really great mod idea, but I got NRE.  I have several other mods installed but they're fairly common.  KSP 1.11.1 on Win10 . Installed v0.1.2 from CKAN.

I did not follow the OP steps the first time.  I did this: 

  1. Pilot a ship in polar LKO
  2. Made a man node on the existing orbit and dragged prograde so it would exit Kerbin SOI
  3. zoomed out and placed another man node later when it's out of Kerbin SOI
  4. pressed the yellow compass icon
  5. got EXC
  6. exit game normally
[EXC 15:54:20.691] NullReferenceException: Object reference not set to an instance of an object
	OrbitTargeter.DropInvalidTargets () (at <2afc64dea36946459d4707808bdac511>:0)
	OrbitTargeter.UpdateNodesAndVectors () (at <2afc64dea36946459d4707808bdac511>:0)
	OrbitTargeter.LateUpdate () (at <2afc64dea36946459d4707808bdac511>:0)
	UnityEngine.DebugLogHandler:LogException(Exception, Object)
	ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
	UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)
[EXC 15:54:20.691] NullReferenceException: Object reference not set to an instance of an object
	Orbit.Init () (at <2afc64dea36946459d4707808bdac511>:0)
	OrbitDriver.Start () (at <2afc64dea36946459d4707808bdac511>:0)
	UnityEngine.DebugLogHandler:LogException(Exception, Object)
	ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
	UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)

KSP log

Then I followed the directions and it still gave EXC when I pressed the compass icon but with extra log spam this time.  Here's the abridged log:

2nd KSP log

I tried starting a new save game too and it behaved the same.  I'll try something else if it will help. 

Link to comment
Share on other sites

14 hours ago, Krazy1 said:

[EXC 15:54:20.691] NullReferenceException: Object reference not set to an instance of an object
	Orbit.Init () (at <2afc64dea36946459d4707808bdac511>:0)
	OrbitDriver.Start () (at <2afc64dea36946459d4707808bdac511>:0)

That may be normal/expected. Does the rest of the mod appear, the dialog box and the maneuver node as shown in the screenshots?

The stock maneuver editor doesn't like running without a vessel (since that never happens in the base game), so one of the tricks that makes this mod work is to create a hidden dummy vessel behind the scenes to appease it. And the Orbit.Init exception is part of that; if that exception isn't thrown, then the OrbitDriver finishes initializing, and it realizes that it's a dummy vessel and deletes it, and then deletes everything else in the mod, including the toolbar button. So if the only problem you're seeing is some red text on the screen, you should be safe to just ignore it.

Edited by HebaruSan
Link to comment
Share on other sites

OK. It does show the dialog box and node. I'm a bit nervous about ignoring EXC. Another dev said they are always bad in flight and should be fixed. But I see what you're saying so I'll ignore it. But I can't ignore the log spam .  It's writing about 1 MB per second in the KSP log and I'm sure KSP would crash if I didn't exit quickly. 

Spoiler

[LOG 19:17:05.756] Packing DUMMY for orbit
[EXC 19:17:05.764] NullReferenceException: Object reference not set to an instance of an object
	OrbitTargeter.DropInvalidTargets () (at <2afc64dea36946459d4707808bdac511>:0)
	OrbitTargeter.UpdateNodesAndVectors () (at <2afc64dea36946459d4707808bdac511>:0)
	OrbitTargeter.LateUpdate () (at <2afc64dea36946459d4707808bdac511>:0)
	UnityEngine.DebugLogHandler:LogException(Exception, Object)
	ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
	UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)
[EXC 19:17:05.765] NullReferenceException: Object reference not set to an instance of an object
	Orbit.Init () (at <2afc64dea36946459d4707808bdac511>:0)
	OrbitDriver.Start () (at <2afc64dea36946459d4707808bdac511>:0)
	UnityEngine.DebugLogHandler:LogException(Exception, Object)
	ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
	UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)
[LOG 19:17:05.791] [PlanetariumCamera]: Focus: Sun
[LOG 19:17:05.807] dT is NaN! tA: NaN, E: NaN, M: NaN, T: NaN
  at System.Environment.get_StackTrace () [0x00000] in <ad04dee02e7e4a85a1299c7ee81c79f6>:0 
  at Orbit.GetDTforTrueAnomaly (System.Double tA, System.Double wrapAfterSeconds) [0x00000] in <2afc64dea36946459d4707808bdac511>:0 
  at Trajectory.UpdateFromOrbit (Orbit orbit, System.Int32 sampleCount) [0x00000] in <2afc64dea36946459d4707808bdac511>:0 
  at PatchRendering.UpdatePR () [0x00000] in <2afc64dea36946459d4707808bdac511>:0 
  at PatchedConicRenderer.LateUpdate () [0x00000] in <2afc64dea36946459d4707808bdac511>:0 
[LOG 19:17:05.807] dT is NaN! tA: NaN, E: NaN, M: NaN, T: NaN
  at System.Environment.get_StackTrace () [0x00000] in <ad04dee02e7e4a85a1299c7ee81c79f6>:0 
  at Orbit.GetDTforTrueAnomaly (System.Double tA, System.Double wrapAfterSeconds) [0x00000] in <2afc64dea36946459d4707808bdac511>:0 
  at Trajectory.UpdateFromOrbit (Orbit orbit, System.Int32 sampleCount) [0x00000] in <2afc64dea36946459d4707808bdac511>:0 
  at PatchRendering.UpdatePR () [0x00000] in <2afc64dea36946459d4707808bdac511>:0 
  at PatchedConicRenderer.LateUpdate () [0x00000] in <2afc64dea36946459d4707808bdac511>:0 
[LOG 19:17:05.807] dT is NaN! tA: NaN, E: NaN, M: NaN, T: NaN
  at System.Environment.get_StackTrace () [0x00000] in <ad04dee02e7e4a85a1299c7ee81c79f6>:0 
  at Orbit.GetDTforTrueAnomaly (System.Double tA, System.Double wrapAfterSeconds) [0x00000] in <2afc64dea36946459d4707808bdac511>:0 
  at Trajectory.UpdateFromOrbit (Orbit orbit, System.Int32 sampleCount) [0x00000] in <2afc64dea36946459d4707808bdac511>:0 
  at PatchRendering.UpdatePR () [0x00000] in <2afc64dea36946459d4707808bdac511>:0 
  at PatchedConicRenderer.LateUpdate () [0x00000] in <2afc64dea36946459d4707808bdac511>:0 
[LOG 19:17:05.807] dT is NaN! tA: NaN, E: NaN, M: NaN, T: NaN
  at System.Environment.get_StackTrace () [0x00000] in <ad04dee02e7e4a85a1299c7ee81c79f6>:0 
  at Orbit.GetDTforTrueAnomaly (System.Double tA, System.Double wrapAfterSeconds) [0x00000] in <2afc64dea36946459d4707808bdac511>:0 
  at Trajectory.UpdateFromOrbit (Orbit orbit, System.Int32 sampleCount) [0x00000] in <2afc64dea36946459d4707808bdac511>:0 
  at PatchRendering.UpdatePR () [0x00000] in <2afc64dea36946459d4707808bdac511>:0 
  at PatchedConicRenderer.LateUpdate () [0x00000] in <2afc64dea36946459d4707808bdac511>:0 

Thanks

Link to comment
Share on other sites

I very much like this mod and its concept.  I'll download it and check it out in order to try and give some constructive feedback and throw in my two cents.

I'm a big fan of mods that fit with the stock (or re-stock) aesthetic and gameplay, so this mod looks like it will easily find a home in my GameData folder.

 

I will likely wait until it's closer to 1.0 to use it as part of a mod setup for a full playthrough though.

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...