Jump to content

[WIN/MAC/LINUX] KSP Trajectory Optimization Tool v1.6.9 [New MATLAB Version!]


Recommended Posts

okay I got a good azimuth direction for a satellite orbiting Kerbin, but for Minmus it still tells me to launch in the opposite direction

Okay, strange. Any ideas why? What's special about the Minmus orbit that isn't special about the satellite orbits?

Also, I forgot a request - copying X and Y values from data points in the graphs. Possible in any way? Part convenience, part insurance against typos.

Probably not, because it's a standard MATLAB figure window, but I can check to make sure.

also also, still get an error when closing the Constraint dialog with values the same in upper/lower when using the Enter key

Will fix, thanks for reporting! :)

Aaaaaand is it possible to display labels next to Other Spacecraft in the Mission Animator? Would be better than me having to put up a color key on the video in post

I'll see how much work that would be. Textboxes in MATLAB don't always play nice.

An additional drop-down list to the Other Spacecraft window in order to select dotted, dash-dot or dashed lines would be good as well for when you run out of colors. Speaking of colors, Brown and Pink should be two good contrasting additions (Pink would be good with Black backgrounds, like Yellow is)

I can add brown and pink, I think. I did originally choose to leave the line type (dashed, etc) alone so that other spacecraft would be clearly visible as such. Do you think that's not a problem?

Why does Advance Script do this when you choose to move up to a state change?

http://i.imgur.com/edRyCXz.png

Shouldn't it just set Event 1 to the state?

The first event in an event list must be a Set State event by definition. The code depends on that in order to begin populating the state log before event propagation starts in full. :)

Link to comment
Share on other sites

Okay, strange. Any ideas why? What's special about the Minmus orbit that isn't special about the satellite orbits?

Not a clue, but that's what's happening. Very basic testing tho, just Minmus and the one satellite. I will look into this more if I get some time but right now my lead-time on twitter is dwindling again and I need to push forward. I'd list it as a Known Issue for now so people are aware to double-check.

I did originally choose to leave the line type (dashed, etc) alone so that other spacecraft would be clearly visible as such

I got that, I agree and I don't think the dotted or dash-dot lines will be any less distinctive. Additionally, dashed could still be the default setting, so given that the user needs to change it they should then be aware of what type of line refers to what. The same would go for including a solid-line option, even.

Additionally, I just realized I can "hide" the orbit of the main craft inside a body like Kerbin by setting the orbit inside the planet and just render Other Spacecraft with the Mission Animator to show off orbital trajectories like

without having to go through the trouble of setting things up in Universe Sandbox. Having the ability to render solid line orbits in this case would prevent the need to hide the single solid-line orbit of the video.

Speaking of the Mission Animator, I've wondered why the < > buttons for the scroll bars jump forward and back several values. If you want big jumps you can click along the scroll bar or click and drag the bar itself. If that's not fine enough, you can manually enter in a value. It would be nice if the < > buttons offered a smoother movement of the camera, unless the 7.2 value jump is a limitation of some sort.

The first event in an event list must be a Set State event by definition

I realize this, but what I'm asking is why are there two state events instead of one? I advanced the script up to a state event so shouldn't that then be the first state event by itself?

Edited by Gaiiden
Link to comment
Share on other sites

Hello all!

I am looking for help with a problem with the MCC Real Time System tool in KSP TOT

I have the plugin installed and all, as well as firewall rules set, along with my ip set in the txt file in the plugin. However, I get This error when I try and connect.

zXN33lF.jpg

Any ideas? Also if this is in the incorrect place for this let me know, Thanks!

Edited by Arlin_
Link to comment
Share on other sites

I've discovered with the latest pre-release KSPTOT doesn't seem to be saving my bodies and always reverts back to bodies.ini rather than the file I picked to import bodies from. Honestly not sure though whether it ever did save my changes to body settings...

It's also come to my attention that the X/Y custom line drawing is only happening for a single graph - whether I choose to use sub plots or multiple graph windows the line will only appear on the graph rendered last (in order of the list). I mentioned sub-plot support earlier but for now it would be okay to just ensure it's drawn on every graph, I can ignore it on the graphs I don't need it on

Edited by Gaiiden
Link to comment
Share on other sites

I've got a new pre-release for you that addresses the following. Please see my comments below...

Not a clue, but that's what's happening. Very basic testing tho, just Minmus and the one satellite. I will look into this more if I get some time but right now my lead-time on twitter is dwindling again and I need to push forward. I'd list it as a Known Issue for now so people are aware to double-check.

Okay, I'll try to investigate tomorrow as time allows. If you find something, let me know...

I got that, I agree and I don't think the dotted or dash-dot lines will be any less distinctive. Additionally, dashed could still be the default setting, so given that the user needs to change it they should then be aware of what type of line refers to what. The same would go for including a solid-line option, even.

Additionally, I just realized I can "hide" the orbit of the main craft inside a body like Kerbin by setting the orbit inside the planet and just render Other Spacecraft with the Mission Animator to show off orbital trajectories like

without having to go through the trouble of setting things up in Universe Sandbox. Having the ability to render solid line orbits in this case would prevent the need to hide the single solid-line orbit of the video.

I've added the ability to set the line type of other spacecraft. The default is still dashed (--) but the other three options are now available. I did some initial testing and everything seems to work, but let me know if you find any bugs.

Speaking of the Mission Animator, I've wondered why the < > buttons for the scroll bars jump forward and back several values. If you want big jumps you can click along the scroll bar or click and drag the bar itself. If that's not fine enough, you can manually enter in a value. It would be nice if the < > buttons offered a smoother movement of the camera, unless the 7.2 value jump is a limitation of some sort.

Just the way it was set up (I never really configured it). The code is now configured to step one state log entry when you push the slider buttons, but the larger jump is preserved for tapping on the slider itself. Good suggestion!

I realize this, but what I'm asking is why are there two state events instead of one? I advanced the script up to a state event so shouldn't that then be the first state event by itself?

Because I never considered the case where you would advance to a Set State event. :P The code now checks to see if the event being advanced to is a set state, and if it is, doesn't create the extraneous Set State event.

I've discovered with the latest pre-release KSPTOT doesn't seem to be saving my bodies and always reverts back to bodies.ini rather than the file I picked to import bodies from. Honestly not sure though whether it ever did save my changes to body settings...

I have no idea to be honest. I haven't touch any of that code in a while. Could you send me a *.mat file that demonstrates the issue. I wasn't really able to reproduce anything over here.

It's also come to my attention that the X/Y custom line drawing is only happening for a single graph - whether I choose to use sub plots or multiple graph windows the line will only appear on the graph rendered last (in order of the list). I mentioned sub-plot support earlier but for now it would be okay to just ensure it's drawn on every graph, I can ignore it on the graphs I don't need it on

Could not reproduce:

fXB9nlm.png

Note that Y line doesn't show up in the bottom plot because the Y value is outside of the data range there.

Any thoughts as to why you're not seeing what you should be? Maybe the lines are outside of the data range?

- - - Updated - - -

Hello all!

I am looking for help with a problem with the MCC Real Time System tool in KSP TOT

I have the plugin installed and all, as well as firewall rules set, along with my ip set in the txt file in the plugin. However, I get This error when I try and connect.

http://i.imgur.com/zXN33lF.jpg

Any ideas? Also if this is in the incorrect place for this let me know, Thanks!

Not sure, to be honest. That error means that the code couldn't connect to the KSPTOTConnect client. Are you trying to connect to your local computer or another computer?

Link to comment
Share on other sites

I was connecting to my same computer but will eventually want to do this between two computers if thats possible.

I have been successful since this post to connect. I think the only thing I changed was that the first time I was not in a vessel the next time I was.

Link to comment
Share on other sites

I was connecting to my same computer but will eventually want to do this between two computers if thats possible.

I have been successful since this post to connect. I think the only thing I changed was that the first time I was not in a vessel the next time I was.

That will do it. You have to be in the flight scene to connect to KSPTOTConnect. I should have a warning about that somewhere, I think.

Link to comment
Share on other sites

I've added the ability to set the line type of other spacecraft. The default is still dashed (--) but the other three options are now available. I did some initial testing and everything seems to work, but let me know if you find any bugs.

Looks good, although hopefully you will change the dropdown list text to actually say "solid line", "dashed line", etc (since there is no list description text anywhere) - I think anyone new to the program would be confused by its purpose.

I see the spacecraft location is now being marked in the MA render box as well. Can that be toggled on/off? When presenting these figures to my twitter audience craft positions don't always play any relevance and could just be confusing/distracting.

Just the way it was set up (I never really configured it). The code is now configured to step one state log entry when you push the slider buttons, but the larger jump is preserved for tapping on the slider itself. Good suggestion!

Ah crap you latched on to my earlier suggestion and I did another .... poor job explaining this one. I was referring not to the << >> buttons but the < > slider buttons that control the camera position. They bump the values by 7.2, which seems an odd number so it made me wonder if that was a limitation and the movement didn't render that well any smoother. Ideally it would be increments of 1 so the camera doesn't seem so jerky when you move it around (for when recording video to do some smooth pans, rotations, zooms, etc). My argument for making this such a fine movement was that people can click on the scroll bar or just enter in numbers for larger movements.

I have no idea to be honest. I haven't touch any of that code in a while. Could you send me a *.mat file that demonstrates the issue. I wasn't really able to reproduce anything over here.

I figured it out - KSPTOT is always looking for just bodies.ini when it loads. When you ask it to load new bodies it lets you select your own bodies file that you may have generated with it, but it either does not update bodies.ini with the new data, or does not save the name of the bodies file you selected so it can load that file next time it runs. IMO the second option is the better one so it preserves the default bodies.ini that came with the program.

Could not reproduce [the custom line graph bug]

I just tried it and it seems to be working. No idea why it didn't work the last time but I'll keep an eye on it... I maybe typo'd the value I was giving it - was looking for 2500 and maybe my 0 key stuck (as it is wont to do lately) and I only entered 250 and didn't notice. The graph for that axis starts at 0 when you see the results but if there wasn't any data plots below 250 (which there wasn't) it wouldn't have rendered, right?

p i s s got filtered by the forums but not crap. Ok :P

Edited by Gaiiden
Link to comment
Share on other sites

Looks good, although hopefully you will change the dropdown list text to actually say "solid line", "dashed line", etc (since there is no list description text anywhere) - I think anyone new to the program would be confused by its purpose.

Yep, will do tomorrow. Good call.

I see the spacecraft location is now being marked in the MA render box as well. Can that be toggled on/off? When presenting these figures to my twitter audience craft positions don't always play any relevance and could just be confusing/distracting.

I'd rather not make it toggle-able, I'm running out of GUI space to be honest. Could I just turn the markers off on that render?

Ah crap you latched on to my earlier suggestion and I did another .... poor job explaining this one. I was referring not to the << >> buttons but the < > slider buttons that control the camera position. They bump the values by 7.2, which seems an odd number so it made me wonder if that was a limitation and the movement didn't render that well any smoother. Ideally it would be increments of 1 so the camera doesn't seem so jerky when you move it around (for when recording video to do some smooth pans, rotations, zooms, etc). My argument for making this such a fine movement was that people can click on the scroll bar or just enter in numbers for larger movements.

Ah! Okay, got it. This is the az/el offset sliders? Yeah, I can set it so it's 1 degree.

I figured it out - KSPTOT is always looking for just bodies.ini when it loads. When you ask it to load new bodies it lets you select your own bodies file that you may have generated with it, but it either does not update bodies.ini with the new data, or does not save the name of the bodies file you selected so it can load that file next time it runs. IMO the second option is the better one so it preserves the default bodies.ini that came with the program.

Right, when you restart KSPTOT it actually pulls a bodies.ini file that's stored internally (not ideal, but there are annoying technical limitations here). Hence you need to re-specify the bodies.ini file each time you open KSPTOT. Now, MA actually stores the bodies.ini file used to create a MA mission with the *.mat file, so you shouldn't need to reload the bodies.ini file when you re-open an MA mission save.

I just tried it and it seems to be working. No idea why it didn't work the last time but I'll keep an eye on it... I maybe typo'd the value I was giving it - was looking for 2500 and maybe my 0 key stuck (as it is wont to do lately) and I only entered 250 and didn't notice. The graph for that axis starts at 0 when you see the results but if there wasn't any data plots below 250 (which there wasn't) it wouldn't have rendered, right?

Yep, the line markers only render if the data set you're plotting would otherwise show them. I intentionally don't expand the plots to show the marker lines on all plots.

issue:

http://i.imgur.com/FM77Vv8.png

Repro:

1) Open MA

2) Select "Show SOI Radii"

3) Select "Show Children of Central Body"

That should give you the result above.

Got it. This was a bug I introduced yesterday, whoops! It's been fixed now, thanks for the report. :)

Link to comment
Share on other sites

I see the spacecraft location is now being marked in the MA render box as well. Can that be toggled on/off? When presenting these figures to my twitter audience craft positions don't always play any relevance and could just be confusing/distracting.

Actually I think this may not be an intended feature? But if it is then there's also an issue with it:

zUXQrfN.png

The two should not match up exactly, but the spacing between the satellites should be the same

Link to comment
Share on other sites

Are the epochs of the other spacecraft different? They're rendered at their individual epoch times at the moment.

oh, that would explain it.

- - - Updated - - -

crap I totally missed your earlier post

I'd rather not make it toggle-able, I'm running out of GUI space to be honest. Could I just turn the markers off on that render?

Turning the markers off would be good, but I do think it could be a useful feature at times. Another option since I agree you're running out of GUI space in the MA window would be to add it as a checkbox option to individual spacecraft in the Other Spacecraft window below the line selection dropdown list. This would add the benefit of being able to toggle the markers individually and perhaps also extend to what is shown in the Mission Animator as well. Making it a per-craft setting is also nice if you load up a bunch of Other Spacecraft just to perform measurements and stuff against them in the Graphical Analysis tool but then don't want them showing up in your mission animation and making the scene too busy. You can just toggle them off instead of deleting them.

Right, when you restart KSPTOT it actually pulls a bodies.ini file that's stored internally (not ideal, but there are annoying technical limitations here). Hence you need to re-specify the bodies.ini file each time you open KSPTOT. Now, MA actually stores the bodies.ini file used to create a MA mission with the *.mat file, so you shouldn't need to reload the bodies.ini file when you re-open an MA mission save.

Got it.

And cool beans and thank yous on all the other stuff!

Link to comment
Share on other sites

Turning the markers off would be good, but I do think it could be a useful feature at times. Another option since I agree you're running out of GUI space in the MA window would be to add it as a checkbox option to individual spacecraft in the Other Spacecraft window below the line selection dropdown list. This would add the benefit of being able to toggle the markers individually and perhaps also extend to what is shown in the Mission Animator as well. Making it a per-craft setting is also nice if you load up a bunch of Other Spacecraft just to perform measurements and stuff against them in the Graphical Analysis tool but then don't want them showing up in your mission animation and making the scene too busy. You can just toggle them off instead of deleting them.

Actually, if you wanted to revert the MA options under the graph render back to just the SOI and Child Bodies, you could include two options in the Other Craft menu - "Show Spacecraft Orbit" and "Show Spacecraft Marker" that would be individually applied per ship and affect what is rendered in the MA graph and the Mission Animator.

OR, since this all got a bit complex now, just go with your original suggestion to disable the craft markers in the MA render :)

Link to comment
Share on other sites

OR, since this all got a bit complex now, just go with your original suggestion to disable the craft markers in the MA render :)

I'm just going to do this, lol. :-)

I need to remove the old stock aero model and replace it with the new one tonight. I've got ksptotconnect compiled for 1.0. Is there anything missing from your perspective before I can this version final?

Link to comment
Share on other sites

alright I will check it out - if you don't hear from me I've got nothing to report.

I'm just going to do this, lol. :-)

Heh I figured. But if you find yourself bored and stuck inside on a rainy day... :)

Also, a late suggestion that is also an old one (and not originally mine) so you may have already considered and discarded it but I don't recall hearing from you on it - making planetary bodies more visible in the MA graph renders. Just in the case of the Kerbin system you have to enable SOI Radii in order to see where Minmus is located when you Show Child Bodies

Link to comment
Share on other sites

Also, a late suggestion that is also an old one (and not originally mine) so you may have already considered and discarded it but I don't recall hearing from you on it - making planetary bodies more visible in the MA graph renders. Just in the case of the Kerbin system you have to enable SOI Radii in order to see where Minmus is located when you Show Child Bodies

Yeah, I understand that. The problem, of course, is that I render everything as "real size" on the same scale. This means that small objects, like Minmus, doesn't show up well when zoomed out. I'm open to suggestions on this front, of course. Any ideas on how to make small bodies more visible?

Link to comment
Share on other sites

Any ideas on how to make small bodies more visible?

Markers? Like the diamond, *, etc? I don't know how those are affected by scaling tho - they may just render as small as the bodies. Are they able to render at a fixed size regardless of the depth/distance the camera is at?

Also, I can't seem to zoom out far enough in the Mission Animator to see the full extent of my polar Molniya orbits:

ymmoT8p.png

Additionally, is it possible to have Other Spacecraft orbits draw around the proper bodies when Show Children is enabled? For example although my craft is orbiting around Kerbin if I add a spacecraft that orbits around Minmus the orbit is drawn around Kerbin

Edited by Gaiiden
Link to comment
Share on other sites

Markers? Like the diamond, *, etc? I don't know how those are affected by scaling tho - they may just render as small as the bodies. Are they able to render at a fixed size regardless of the depth/distance the camera is at?

Good suggestion actually, markers should not be impacted by zoom. I will try this out tonight before release.

Also, I can't seem to zoom out far enough in the Mission Animator to see the full extent of my polar Molniya orbits:

http://i.imgur.com/ymmoT8p.png

I don't understand I'm afraid. I see lots of room in the view angle and range offset sliders. Have you tried those?

Additionally, is it possible to have Other Spacecraft orbits draw around the proper bodies when Show Children is enabled? For example although my craft is orbiting around Kerbin if I add a spacecraft that orbits around Minmus the orbit is drawn around Kerbin

Now that's a bug, because I should be accounting for that. Is it just in animator? Can I get a mat file with the problem in it?

Link to comment
Share on other sites

Good suggestion actually, markers should not be impacted by zoom. I will try this out tonight before release.

Cool, I'm thinking just the * marker should look good enough

I don't understand I'm afraid. I see lots of room in the view angle and range offset sliders. Have you tried those?

Yup, they both do nothing to increase the view past what is shown. I also noticed some weird behavior when clicking on the scrollbar that it would just get stuck around the middle for the range offset.

Now that's a bug, because I should be accounting for that. Is it just in animator? Can I get a mat file with the problem in it?

Here, take this MAT file, which I've added a craft around Mun and Minmus in addition to all that I have around Kerbin. You can also use this MAT file to open the Mission Animator and see the previous issue with being unable to render the full range of the Molniya orbits

What do you think about black background rendering option for the MA graphs? (as in the planet graphs) I really do think the black background provides much better color contrast to all colors (except black of course :P) whereas the white background can make colors like yellow, pink and cyan a bit harsh on the eyes. It really hit me late last night working on graphs and feeling the strain in my eyes.

Xirposhl.png

Edited by Gaiiden
Link to comment
Share on other sites

Cool, I'm thinking just the * marker should look good enough

Okay, I added an option on the main MA GUI, by the other checkboxes, that will toggle this marker on and off. It's somewhat small, but you should be able to find it easily enough.

Yup, they both do nothing to increase the view past what is shown. I also noticed some weird behavior when clicking on the scrollbar that it would just get stuck around the middle for the range offset.

Okay, so this was actually an issue with how the maximum axis limits were being defined. I increased the multiplier by 50% which should solve the immediate problem. The better solution will be to allow the user to set this multiplier themselves, but I'm out of GUI room at the moment and I don't want a revamp of the Animator GUI to hold up release tonight. I'll tackle that for v1.3.1.

Here, take this MAT file, which I've added a craft around Mun and Minmus in addition to all that I have around Kerbin. You can also use this MAT file to open the Mission Animator and see the previous issue with being unable to render the full range of the Molniya orbits

Found the issue. Remember that check I thought was happening to filter out other spacecraft around other bodies? Yeah, I was accidentally overriding it in the MA render window. Opps. :blush:

What do you think about black background rendering option for the MA graphs? (as in the planet graphs) I really do think the black background provides much better color contrast to all colors (except black of course :P) whereas the white background can make colors like yellow, pink and cyan a bit harsh on the eyes. It really hit me late last night working on graphs and feeling the strain in my eyes.

http://i.imgur.com/Xirposhl.png

I like it! I've changed the default background color to black, actually. It looks quite nice. :)

I'm prepping v1.3.0 now. Should be out soon!

Link to comment
Share on other sites

Hi everyone,

I'm pleased to announce the release of the KSP Trajectory Optimization Tool v1.3.0! As usual, the download is available on the first post of this thread. Here's the change log:

  • Added the ability to specify the line style of Other Spacecraft orbits in Mission Architect when rendering.
  • Added ability to plot the orbits of Other Spacecraft in the main Mission Architect render window.
  • Added option to replace small children bodies with circular markers in main Mission Architect render window to improve their visibility.
  • Added ability to open MATLAB FIG files right from Mission Architect's file menu.
  • Added ability to close most Mission Architect windows using the Esc key (will not save any input, is equivalent to hitting the X in the window corner).
  • Updated KSPTOTConnect plugin for KSP v1.0!
  • Removed previous stock drag model from Mission Architect's aerobraking event code.
  • Many, many bug fixes and other small improvements/enhancements. Thanks to Gaiiden for his help in identifying many of these!

There is one known issue:

  • The Mission Architect launch window calculator occasionally gives you the wrong launch heading. Investigation is still pending.

Please let me know if you have any questions. Thanks!

Link to comment
Share on other sites

I like it! I've changed the default background color to black, actually. It looks quite nice. :)

I was just using the graphical analysis as an example of the black background, I was actually referring to the MA orbital renders:

What do you think about black background rendering option for the MA graphs? (as in the planet graphs)
Link to comment
Share on other sites

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