Jump to content

[1.2.0] Precise Node 1.2.4 - Precisely edit your maneuver nodes


blizzy78

Recommended Posts

Updated to 0.8.1, should take care of the node update during burn issue. This happened because I need to do a lot more testing than I have been before releasing.

I also added diomedea's quality-of-life request and made the option buttons have toggle functionality.

Link to comment
Share on other sites

I have a rather large feature request: The ability to merge two subsequent nodes.

Often I find myself in a situation where I want to do a combined inclination adjustment + Pe/Ap change. Doing this in one single node is a pain, as changing the prograde direction will also change the inclination of the resulting orbit, and changing the normal direction will change the Pe/Ap.

One solution is to create two nodes: One to adjust the inclination, and one immediately afterwards to adjust the Pe/Ap.

The problem is that actually doing these two burns separately is extremely inefficient, so my request would be for PreciseNode to sum the two nodes together (This is a non-trivial task, as the prograde/normal/radial directions of the second maneuver are not identical to those of the first maneuver, and depend on the changes of the first maneuver...)

Link to comment
Share on other sites

Often I find myself in a situation where I want to do a combined inclination adjustment + Pe/Ap change. Doing this in one single node is a pain, as changing the prograde direction will also change the inclination of the resulting orbit, and changing the normal direction will change the Pe/Ap.

I feel your pain. My Kethane Operation constantly had me needing to change my inclination and orbital speed (and changing inclination changes your orbital speed anyway so even if you don't want it to change, you end up fiddling with it anyway) a lot, and something like this would have helped. However, after a few times, I found an easy way to get it to work.

One solution is to create two nodes: One to adjust the inclination, and one immediately afterwards to adjust the Pe/Ap.

The problem is that actually doing these two burns separately is extremely inefficient.

A second solution (what I did) is to do it the way you've done everything else up to this point. Gravity turns, rendezvous, docking, landing... you learned all of it by screwing up a dozen times or more until suddenly it clicked and you could do it. This is exactly the same. One tip: Don't do the entire maneuver. Tug the normal vector 5-10 degrees, then use prograde or retrograde to re-aim at about where you want to go. Go back to normal, then back to pro/retrograde. Repeat until you've got it. If you're doing a really huge Normal burn, eventually the pro/retrograde will affect the normal more and the normal will affect the pro/retrograde more. Just get used to how they interact and you'll be making the nodes in no time.

Just always, always stair step 'em. No matter how comfortable I get with it, Going to fast on one totally throws me off and end up having ot start over.

Link to comment
Share on other sites

I'm having trouble downloading it....

Regular-click the download link in the OP, then select File > Download in the menu on that page. In the Google Drive menu, not the right-click menu of your browser.

Granted, the system to download from Google Drive is idiotic at best.

Link to comment
Share on other sites

Granted, the system to download from Google Drive is idiotic at best.

It's pretty unintuitive for the web, that's for sure. I might still have a Dropbox account, I'll see if my old login works and switch over to that if so.

This is a non-trivial task, as the prograde/normal/radial directions of the second maneuver are not identical to those of the first maneuver, and depend on the changes of the first maneuver...

This is very true. I'm not even sure if the math would work as you expect it. I'm not even sure where to start. 5thHorseman explained the same method I do; adjust both, in-turn, slowly.

Edited by regex
Link to comment
Share on other sites

I also added diomedea's quality-of-life request and made the option buttons have toggle functionality.

Many thanks. Works exactly as desired.:D

I have a rather large feature request: The ability to merge two subsequent nodes.

Often I find myself in a situation where I want to do a combined inclination adjustment + Pe/Ap change. Doing this in one single node is a pain, as changing the prograde direction will also change the inclination of the resulting orbit, and changing the normal direction will change the Pe/Ap.

One solution is to create two nodes: One to adjust the inclination, and one immediately afterwards to adjust the Pe/Ap.

The problem is that actually doing these two burns separately is extremely inefficient, so my request would be for PreciseNode to sum the two nodes together (This is a non-trivial task, as the prograde/normal/radial directions of the second maneuver are not identical to those of the first maneuver, and depend on the changes of the first maneuver...)

I join 5thHorseman as experience with manual maneuvers is invaluable here. Do it a few times, and you develop a sense of how the orbit will develop.

Well, PreciseNode is precisely the kind of tool that lets you do so in a better way, rather than just grabbing the maneuver gizmo around. I always go for the perfect burn by adjusting the velocity components in PreciseNode, and then continue to move the timing with those components until I set the maneuver with the minimal total DV bringing the orbit exactly where I want it to be.

So, my end result is exactly what you want but is done by hand. I actually move all velocity components at the same time.

Now, you certainly know some maneuvers are best executed at periapsis, some at apoapsis, while inclination corrections at the nodes. So, matching different maneuvers together actually means to have a sense for timing with all those single maneuvers. If mixing, e.g., a change in inclination with a raise in apoapsis, those are unlikely to be more convenient when combined, even if one node is at periapsis (because you would spend more DV to change inclination while your speed is greater, so it is best done with a node next to apoapsis). Instead, for changing inclination and periapsis, they go together very well and perfect when the apoapsis is aligned with a node. So, if timing for both single maneuvers is the same, joining them together is just as simple as to add the single velocity components. If timing for the two maneuvers is different, it may not be convenient to do them together at all. But I believe you know when not to join those maneuvers.

Link to comment
Share on other sites

I have been moving in the slow lane and just now using plugins and mods. I do not see anywhere in this thread the installation instructions. I am guessing you just put the dll file in the plugin directory. Could a short blurb be added to the 1st post and perhaps the change log.

As a newbie, I greatly appreciate the depth of work the community has put into this awesome game. This plug in is my next step in learning the game. I want the refined inputs for the maneuver nodes.

Thanks

Link to comment
Share on other sites

I do not see anywhere in this thread the installation instructions.

That's because it's pretty common knowledge, sorry for assuming that. I just rearranged the package in order to help with this.

Open the zip file you downloaded and drop the GameData directory into your KSP root directory, allowing overwrite. Wham, plugin installed. Where your KSP root directory resides depends entirely on whether you have a Store copy or a Steam copy. Steam copies will be in "<main drive>:/Program Files (x86)/Steam/common/steamapps/Kerbal Space Program" (I think, or something similar) on Windows.

E: This is how most, if not all, plugins and parts packs will be installed.

Link to comment
Share on other sites

That's because it's pretty common knowledge, sorry for assuming that. I just rearranged the package in order to help with this.

Open the zip file you downloaded and drop the GameData directory into your KSP root directory, allowing overwrite. Wham, plugin installed. Where your KSP root directory resides depends entirely on whether you have a Store copy or a Steam copy. Steam copies will be in "<main drive>:/Program Files (x86)/Steam/common/steamapps/Kerbal Space Program" (I think, or something similar) on Windows.

E: This is how most, if not all, plugins and parts packs will be installed.

I downloaded the actual dll within the zip instead of the zip file itself! That added more to my confusion. Dropping the dll in the main plugin directory worked btw.

Awesome tool.

Link to comment
Share on other sites

Dropping the dll in the main plugin directory worked btw.

This will probably work for a bit longer, but it won't always be the case. Support for the Parts and Plugin directories will be dropped at some point in the future. Just a note. :)

Link to comment
Share on other sites

This will probably work for a bit longer, but it won't always be the case. Support for the Parts and Plugin directories will be dropped at some point in the future. Just a note. :)

I also moved over to Dropbox so this will be less of a problem in the future.

Link to comment
Share on other sites

I'm not even sure if the math would work as you expect it. I'm not even sure where to start.

Here's a line of code that will give you the burn vector (In world coordinates) of maneuver 0:

vessel.patchedConicSolver.maneuverNodes[0].GetBurnVector(vessel.orbit);

(proudly copy/pasted from kitoban's Enhanced Navball code).

To get the summary burn vector, use

vessel.patchedConicSolver.maneuverNodes[0].GetBurnVector(vessel.orbit) + vessel.patchedConicSolver.maneuverNodes[1].GetBurnVector(vessel.orbit);

Now the remaining problem is to convert the summary burn vector back to maneuverNode[0] prograde/normal/radial components. After some research into mechjeb's code, I believe it's simply this:

vessel.PlaceManeuverNode(vessel.orbit, summaryBurnVector, time);

So at all, at the press of the 'merge maneuvers' button, sum up the burn vectors of maneuvers 0 and 1, memorize the maneuver 0 UT, delete maneuvers 0 and 1, and add a new maneuver with the summed-up burn vector and memorized UT.

edit: Oh wait, placeManeuverNode is actually a mechjeb-specific function. However, you can find it here.

Also, maybe, just maybe vessel.patchedConicSolver.maneuverNodes[1].GetBurnVector() requires a different orbit as its argument, such as vessel.patchedConicSolver.maneuverNodes[1].patch. The fact that none of the API functions is properly documented and it's just a pain in the *** to manually test every single one is the main reason I don't do a lot of KSP plugin writing.

Edited by mic_e
Link to comment
Share on other sites

...snip...

I'm not sure if simply summing the vectors would work as you expect, but I'll give it a try. I'm also not going to spend any more time on the GUI than adding a button to "Collapse Nodes" or something because I can see it getting very complicated very quickly.

edit: Oh wait, placeManeuverNode is actually a mechjeb-specific function. However, you can find it here.

E: In retrospect, I kind of went off there. Suggestions of integrating GPL code into my projects sets me off. Sorry for being harsh, just wanted to let you know that I'm perfectly willing to try out your idea.

Edited by regex
Link to comment
Share on other sites

KSP TOT has code for getting the pro grade, radial, and normal representation of a DV vector. Feel free to use. :)

I see you have plugin code, I'll check that out. Thank you!

Link to comment
Share on other sites

I didn't really suggest to copy/paste the code from mechjeb, it's just that it is probably the best KSP API documentation you'll ever find. I feel there is no need to re-spill the blood, sweat and tears that others already have, redoing such a time-consuming and frustrating job as finding out which data field and method of which class does what you want.

Also, I think that simply summing up the (world-space) vectors will do exactly what you need, as long as the nodes are close together in time.

And, a simple 'collapse maneuver nodes' button is exactly what I want :)

Edited by mic_e
Link to comment
Share on other sites

Also, I think that simply summing up the (world-space) vectors will do exactly what you need, as long as the nodes are close together in time.

And, a simple 'collapse maneuver nodes' button is exactly what I want :)

I'll probably take it a step further and do something in the Trip Info screen. That keeps the main GUI uncluttered while giving me more room to play around. Right now I'm thinking of "merge down" and "merge up" buttons for individual nodes, and probably a "cut" button that would just "paste" right back to its UT as has been previously requested. I'm also prototyping a part module (wrote it last night) that will save a vessel's nodes and reload them on switch. We'll see how all that goes.

Link to comment
Share on other sites

The linux version of unity apparently has some issues handling separation of input focus between GUI controls and hotkeys, so the new keypad hotkeys end up triggering when an edit field is focused, including PreciseNode's own fields. The main keyboard number keys are already unusable because of action groups.

However, I tried adding this to processKeyInput as a workaround, and it appears to work perfectly so far:

// Ignore if an edit field is active

if (GUIUtility.keyboardControl != 0)

return;

Link to comment
Share on other sites

The linux version of unity apparently has some issues handling separation of input focus between GUI controls and hotkeys, so the new keypad hotkeys end up triggering when an edit field is focused, including PreciseNode's own fields. The main keyboard number keys are already unusable because of action groups.

However, I tried adding this to processKeyInput as a workaround, and it appears to work perfectly so far:

Nice, thanks. I don't have a keypad on my laptop and I only run Linux at work so I never ran into this; I imagine it might be an issue with Windows and Mac systems too. Or not. Either way, I'll add that into the next version.

Link to comment
Share on other sites

Is this already Toolbar compatible? :)

Yes, it should work with Toolbar installed.

Thanks guys, I think you'll like the next version, some nice features in the pipe.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...