Jump to content

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


blizzy78

Recommended Posts

Suggestion:

The Pe and Ap buttons with regards to timing are a great addition to PreciseNode.

Could we also get buttons for the moment the craft reaches the prograde or retrograde conjunction point with regards to it's parent body? (This is often the ideal moment to do ejection burns).

Link to comment
Share on other sites

Could we also get buttons for the moment the craft reaches the prograde or retrograde conjunction point with regards to it's parent body? (This is often the ideal moment to do ejection burns).

What, like 90 and -90 ejection angle? The only conjunction I know about is in regards to orbital resonance.

Link to comment
Share on other sites

That's what it meant yeah...

I'll look into it but I think you're overstating the importance of those times. I have rarely seen an ejection angle from a porkchop plot that corresponds to a 90 or -90 angle.

Link to comment
Share on other sites

I thought I'd do an update post, mainly because I'm a bit excited about some upcoming features.

First, I added Majiir's version checking code found in this thread. I'm not disabling any features, it merely serves as a warning for the user if they're using a version of PreciseNode that isn't compiled for the KSP version it's running on. I didn't do this because I think PreciseNode really needs it (in the grand scheme of mods, it's pretty simple) but because I think more mod authors should include this sort of functionality and I want to promote it.

Second, node saving between craft switching/loading is now working. The PartModule idea worked like a charm and provided the quickest and easiest method of getting that functionality into the mod without requiring any additional files. The maneuver nodes are saved with the individual craft within the persistence file just like any other persistent field. You'll need a part attached to your craft for this to work and I was lucky enough to have Talisar provide an excellent model for this purpose. I changed the texture a bit, mainly because the Soviets painted their original in some garish bluish-teal and washed-out red, so I'll provide a separate download for the original alongside the modified. The part will show up under the Advanced Flight Control node in career mode and has some reasonable costs that will probably have to be adjusted in 0.24.

Third, node merging is now a thing, as requested. It's not perfect, and it never will be, but for very close nodes it should provide the functionality that was asked for, specifically creating a normal burn node followed by a circularize node and then merging them. It does this by finding the difference in velocity vectors between the previous orbit to the first node and the patch from the second node, then converting that to a delta-V vector for the first node and wiping out the second node. Again, it's not perfect because the differences do not take into account UT shifting, but it does seem work pretty darn well for the given use case. I'm calling it good at that.

Before I release all this I want to get the AN/DN buttons created and I already have some ideas on how to do that. My philosophy has usually been to let SQUAD's code do as much lifting as possible and I think they'll have the functions I need to get this functionality working fairly easily. After that we'll move towards the 1.0 release with ejection inclination, an additional time display on the clock window, locking magnitude, etc... Also, just dreaming, I might be tempted to put a Lambert solver into this thing for pork chop plots, but that's a bit down the road.

Link to comment
Share on other sites

(blah)

Sounds awesome. Can't wait to see it!

... Also, just dreaming, I might be tempted to put a Lambert solver into this thing for pork chop plots, but that's a bit down the road.

Beware the feature creep! I think such a feature should get its own Plugin.

But imagine the incredible awesomeness... I imagine it like this right now: You click Duna's orbit, and a PCP opens up. You click a point in the PCP, and the maneuver node is created.

Link to comment
Share on other sites

But imagine the incredible awesomeness... I imagine it like this right now: You click Duna's orbit, and a PCP opens up. You click a point in the PCP, and the maneuver node is created.

Yeah, that's why I'm dreaming about it. :) It's a lot of math I don't entirely understand, and math isn't one of those kinds of things I like to learn about in my spare time, but I really do want to see pork-chop plots in the game so I'll be giving it a go at some point, probably after the entire TODO list in the OP is finished.

Also, equatorial AN/DN functions are complete and tested as of last night, I'll be working on the target AN/DN functions in the coming days. The buttons will choose which function to use based on whether you have something targeted or not, unless someone has a better suggestion.

Link to comment
Share on other sites

That sounds right, if I have a target then I`ll want to be able to put a node exactly on the An/Dn but if I don`t have a target I`ll probably want to do it on the points relative to the body I am orbiting.

Looking forward to pork chops. You may find http://www.braeunig.us/space/ useful. It has some of the maths you will need (read that as a lot of the maths you will need)

Also node merging sounds great. I am looking forward to making two close nodes that give me the burn I want and combining them into one burn.

Link to comment
Share on other sites

I got to agree with John FX, the additional GUI chooser is probably utterly unneccesary - just use equatorial AN/DN if no target is selected, and target AN/DN if a target is selected.

On the topic of Lambert solvers, I'd recommend strongly against writing your own one. The issue is highly complex; researchers at NASA and other space agencies have been writing papers on it for 50 years, and yet there is no algorithm that is guaranteed to converge in absolutely every case. Designing your own algorithm would be similar to designing your own crypto algorithm for production use: Either you're an absolute genius, or you're an idiot (protip: the latter is more likely).

I'm currently in the process of porting this BSD-licensed MATLAB Lambert solver to python; it actually contains two separate algorithms, with the second one helping out when the first one fails to converge. The algorithms have been designed at NASA and ESA respectively, and so far it looks like they're doing their job pretty darn well.

Link to comment
Share on other sites

On the topic of Lambert solvers, I'd recommend strongly against writing your own one.

Oh, for sure. What I'm talking about is my own implementation, not rewriting a solver from scratch or trying to refine the equation. I just like having at least a passing understanding of the math I'm working with. Of course, there's also the drawing pane to consider and the input for that... It's not something I'm expecting to have written overnight, especially considering my current hobby coding speed, but at least all the information to do it is already in the game.

Anyway, AN/DN functions are finished for both equatorial and target. I'll need to test them and probably introduce a bit more logic. Expect a new release either tomorrow night or early next week.

Link to comment
Share on other sites

Yeah, that's why I'm dreaming about it. :) It's a lot of math I don't entirely understand, and math isn't one of those kinds of things I like to learn about in my spare time, but I really do want to see pork-chop plots in the game so I'll be giving it a go at some point, probably after the entire TODO list in the OP is finished.

It'd be pretty cool to have a porkchop plot in KSP directly. However, regex, if you're going to go down the rabbit hole of trying to get maneuver nodes from your porkchop plot, please be aware that this is a non-trivial task. KSP TOT is capable of something similar, but it did take me a long time to figure out, something on the order of a month or so. I don't want to discourage you (I think it's a neat idea), but you should be aware of what you're getting into before you start. :)

Link to comment
Share on other sites

It'd be pretty cool to have a porkchop plot in KSP directly. However, regex, if you're going to go down the rabbit hole of trying to get maneuver nodes from your porkchop plot, please be aware that this is a non-trivial task. KSP TOT is capable of something similar, but it did take me a long time to figure out, something on the order of a month or so. I don't want to discourage you (I think it's a neat idea), but you should be aware of what you're getting into before you start. :)

I consider it a "wish list" item; notice how it isn't on the TODO list. :) Anyway, there's still some work to be done on this mod before I think about setting it aside for a pork-chop generator.

Link to comment
Share on other sites

Okay, 0.9 is now available for download. Here's the changelog:

PreciseNode 0.9
- Added a PartModule to save and load Maneuver Nodes: ModuleNodeSaver.
- No additional parameters are needed, there are no right-click options.
- Talisar provided a part for ModuleNodeSaver.
- The RP-9f Craft Locator is available under the Control parts section.
- In career mode it is under Advanced Flight Control for 8000 unlock, 1200 price.
- a.g. provided code to fix an issue with Unity on Linux where hotkeys were being
activated even while a text field had focus.
- Added Majiir's compatibility checker for KSP version checking.
- This will not disable any functions, it is purely used for warning the user.
- Added the ability to merge a node with a previous node on the Trip Info screen.
- Replaced the +/-10K time buttons with AN/DN snap buttons.
- If you have a target the buttons will snap to AN/DN of the target, otherwise
they will snap to the equatorial AN/DN.

As always, please let me know if anything is wrong and enjoy! Also, thanks again for all the kind words and support, and most especially thanks to Talisar for creating a kick-ass part model for this plugin!

E: ugh, already have a bug of sorts. I didn't play around with the part in my big modded sandbox save until now, it seems to reload nodes on staging transitions and dockings. I'll have to play around with how and when it saves nodes to prevent this, but it's mainly just an annoyance. Patch will be out fairly soon.

Edited by regex
Link to comment
Share on other sites

Feel free to flush the idea...

Maybe add buttons left of the 3 axes to zero out the field? More of a convenience thing. Inadvertently pulling the wrong tab or forgetting to click out of the window and adding gibberish text because of window focus. Obviously these are user created nuisances and can be resolved with clicking in the fields and fixing the value.

Link to comment
Share on other sites

Just a random kudo's for creating this mod! :D

This mod has become one of my must haves. The first time I used it was planning an probe's trajectory into the Jool system. This mod not only allowed me to plot that encounter while still several hundred days out, it let me plan for a gravity assist off of Laythe into Jool orbit.

Suffice to say, my inner nerd was squealing with delight :sticktongue:

What I like most about the mod is it's simply a tool. It doesn't plan my nodes, it doesn't execute my burns, it just gives me the tools to plan out my trips myself. I can still screw up if I don't use it correctly, and send Jeb flying off into deep space. It doesn't correct me or try to change my plans. It's just a fantastic enhancement of a tool already in game.

So, thanks again for making it, it's a great tool, hopefully will one day be stock in the game, but till then I'll be keeping it in my KSP folder.

Link to comment
Share on other sites

So I just loaded my game and selected one of my craft to fly. I thought "Lets see what this craft was supposed to be doing, I`ll look at the name and the map and try to figure it out."

When I looked at the map, it had a node ready to burn for Minmus. I was surprised. I hadn`t told KSP to do anything, why was it doing exactly what I wanted?

Then I remembered the precisenode nodekeeper part I had fitted.

Nice implementation, I must say. I have Alarm clock but this works seamlessly. Have some Rep. I assume it will remember a string of nodes and not just the next one?

Link to comment
Share on other sites

Nice implementation, I must say. I have Alarm clock but this works seamlessly. Have some Rep. I assume it will remember a string of nodes and not just the next one?

Yes it will (at least it tested that way, you're the first person to notice it :P). There's a small error in the way it does things when staging, it'll bring up saved nodes inappropriately, but I don't consider that critical and I'm taking a small break from PN to play my RSS install and work on another mod I've been wanting to write. It'll eventually get fixed.

Link to comment
Share on other sites

A couple requests:

1. I would like to add another vote for Toolbar integration. A.) It would provide a more consistent UX for those of us using Toolbar. B.) It would be more user-friendly, in contrast to having another hotkey to remember. C.) It could include an option to create a maneuver node straight from the window, rather than having to click on the orbit (similar to the maneuver node creator in MechJeb). That being said, if that's outside the scope of what you'd like to do with this project, that's totally cool.

2. An option to use the KSP skin would be very appreciated.

And then I had a question as well:

I haven't played much in a while, so I don't really remember...how do I go about adding the part functionality to pods/probe cores? Do I just copy/paste the module?

This is the kind of functionality that should definitely be built in to stock, so this will now be added to my list of must-haves.

Link to comment
Share on other sites

1. I would like to add another vote for Toolbar integration. A.) It would provide a more consistent UX for those of us using Toolbar. B.) It would be more user-friendly, in contrast to having another hotkey to remember. C.) It could include an option to create a maneuver node straight from the window, rather than having to click on the orbit (similar to the maneuver node creator in MechJeb). That being said, if that's outside the scope of what you'd like to do with this project, that's totally cool.

I haven't looked into how easy it is to use the toolbar but I can't imagine it's that tough, so there's really no problem adding support for it. I'll see if I can come up with a good use case for it, you've given me some ideas.

2. An option to use the KSP skin would be very appreciated.

:ugh: It's so disgusting; feels like Win 95 layered in bubble-wrap... No GUI needs that much spacing.

I haven't played much in a while, so I don't really remember...how do I go about adding the part functionality to pods/probe cores? Do I just copy/paste the module?

What, you don't like Talisar's awesome part? Yes, just copy and paste the ModuleNodeSaver part of the config file to whatever other part you want it in. You can even add it with ModuleManager.

It cant work this plugin without extra part?

You can remove the part if you want, it won't affect the plugin.

Edited by regex
Link to comment
Share on other sites

Hello guys

Thank you Regex for this mod. I have been playing for a lot of time using Protractor for my interplanetary transferts. You mod seems very precise and it's great to see all maneuvers nodes we create and the effect on transfert and orbital insertion. I think it's a "must have".

I tried it for the mun, played a lot with it to see how it works, then i am trying for EVE and there's some things I do not understand. Please can you look at my image and tell me why precise node indicates Day 177 as on my time counter it seems to be Day 127. Hour is the same, adding the time from the node +21mn to the time of precise node 19:05, we got the hour on my KSP counter : 19:26, but not the right day!!! I must say I did some warping to get protractor 0° angle for Eve.

1tgx.png

Then if I launch when the Theta angle of protractor is 0, I should get the correct ejection angle, provided I burn prograde for Eve. Is there any mean to know the value of this correct ejection angle ? when I tried to place the maneuver around the correct UT time, for theta protractor angle to be 0, I never got any closest approach point on my trajectory to Eve, even when playing with all the increment for the burn or the time of burn.

I tried to place a second node and it gave me some closest approach points but at high DV cost. Then with a 3rd node I got some interesting periapsis on Eve but still at high DV cost.

I am sorry if i look not very experienced, but is there some tricks to get the right ejection angle and if it's right, should it give me closest approach points?

And what are the tricks to place the second and 3rd nodes ?

It seems far easiest for Mun and Minmus.

Thank's again for your patience to explain.

Oh I see another question: The dash line of my trajectory is purple and sometimes when playing with the burn and the UT time it becomes red: What does it mean?

Edited by gilflo
Link to comment
Share on other sites

snip

I usually use a launch window planner, which removes the need for Protractor.

http://alexmoon.github.io/ksp/

Or you can use Protractor with an earlier tool:

http://ksp.olex.biz

Otherwise you'll have to figure out the ejection angle and node on your own

Oh I see another question: The dash line of my trajectory is purple and sometimes when playing with the burn and the UT time it becomes red: What does it mean?

It's just the game denoting another patch. Usually the fourth(?) patch is red; they cycle from there.

Link to comment
Share on other sites

Not sure if you heard it, but the latest squadcast indicated that 0.24 will bring dynamic conics patch switching, dependant on planetary focus in map mode.

Hoping that won't create too many problems?

Link to comment
Share on other sites

Not sure if you heard it, but the latest squadcast indicated that 0.24 will bring dynamic conics patch switching, dependant on planetary focus in map mode.

Hoping that won't create too many problems?

I did hear that and I doubt it will cause any problems, aside from possibly the way I access the conics drawing method. Changing the draw mode on the fly is one of the least complicated things that PN does. Hopefully they'll also expose how many patches are being drawn; right now it's private to the solver which is, well, an oversight. Either way, we'll see.

E: Now, if you're talking about clamping the conics draw mode to a certain value, that might cause some issues because SQUAD code will take precedence, but I'm sure it'll be easy to immediately switch back to the mode the user preferred.

Edited by regex
Link to comment
Share on other sites

What, you don't like Talisar's awesome part? Yes, just copy and paste the ModuleNodeSaver part of the config file to whatever other part you want it in. You can even add it with ModuleManager.

Hehe...I was just wondering the same thing.

It's not so much not liking the part, as finding it really odd to have a part which is distinctly in-game, to provide out of game functionality like saving maneuver nodes.

One additional question I have with regards to this though is what happens if a vessel winds up with multiple parts that save the nodes (say for example if you assign the module to all command pods through module manager and have a vessel with multiple pods). Does the mod handle this situation or will you wind up with multiple copies of the nodes?

Edited by FlowerChild
Link to comment
Share on other sites

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