Jump to content

[WIN/MAC/LINUX] KSP Trajectory Optimization Tool v1.6.10 [Major LVD Improvements!]


Recommended Posts

Thank you for saving us math-impaired folks from ourselves. This is the best tool yet made for KSP. If people consider MechJeb "cheating" then your calculator is the KSP equivalent of the mafia bribing the referee of a football game so their bets pay off. Thank you, again!

You're welcome! Mind if I take an excerpt from what you wrote there for use as an advertisement? :)

Minor suggestion.

Could you have a way to click somewhere on the porkchop plot to center and recalculate?

Done. :) I'll have it out in the next 0.9 pre-release version.

EDIT: Decided to skip another pre-release and go right to 0.9 itself. See below.

Edited by Arrowstar
Link to comment
Share on other sites

I'm happy to announce the release of the 0.9 release of KSP TOT! Here's the change log:

Version 0.9

  • Changes to the departure calculation code and the flyby maneuver sequencer in order to better determine burn times and true anomalies when provided with an orbit epoch and mean anomaly at that epoch.
  • Right-clicking on the porkchop plot will now bring up a context menu that will allow you to recenter the plot on a particular point on the graph.
  • A few minor bug fixes and tweaks.

It's a fairly minor release, as you can see. Release v0.10 (or v1.0, not sure what I'm calling it yet :P) will primarily feature a new item, the Maneuver Execution Assistant! The purpose of the MEA is two-fold:

  1. To allow more precise execution of long burns with significant changes in spacecraft mass; and
  2. to dispel the idea that centering the burn time about the maneuver node will balance the burn correctly. Instead, one needs to balance the delta-v about the maneuver node, and the MEA will do this for you.

It should be fairly straight-forward to implement, give me about a week or so to see how it works. :)

EDIT: Hey, creative people! I need your help with something! KSP TOT is pretty awesome, but it's still lacking a logo. If someone would be so kind as to whip something up, I would be greatly appreciate it! Feel free to upload submissions to imgur or something and PM me the link. If I get something I like, I'll let the luckily individual know. I'm afraid I can't offer anything other than a big thank-you in the (soon to be coming) documentation. But if that's enough for you and you've got the skills, let me know. :)

Some specifications:

  1. PNG format, please.
  2. 300x300 px size
  3. Should "look the part." KSP TOT is a trajectory optimization and mission design application; the logo should reflect that.
  4. If possible, should be simple enough that if shrunk down a bit, it won't lose too much detail.
  5. Should have the words "KSP Trajectory Optimization Tool" somewhere on it. :)

Thanks!

Edited by Arrowstar
Link to comment
Share on other sites

Hi everyone,

Just a quick update on what version 0.10/1.0 is going to have. Over the past two days I've been putting together the maneuver execution assistant. It's quite straight-forward actually.

k2fj6fr.png

Basically you enter your current orbit, some delta-v parameters, and system-level propulsion properties of your spacecraft. "System-level" means the combination of all active engines on your ship. Thrust here would be the sum of the thrust of all running engines, and Isp here would be an average Isp that will have a quick tool to help you compute it. Initial mass is the mass at the start of the burn and you can get from MechJeb or Engineer.

Notice the start and end times: they are not the same T+/-. This is because you actually need to start a bit earlier to center your delta-v around the maneuver node. For long burns on heavy spacecraft, the assumption that the midpoint in time is also the midpoint in delta-v becomes worse and worse. This application helps with correcting that.

Any thoughts or comments? :) Everything is very WIP right now, but I'm open to suggestions!

EDIT: And here's a mock-up of the System-Level Parameters calculator. It will be accessible by right-clicking anywhere in the System-Level Parameters box of the MEA and selecting the appropriate menu option.

CnZiJ8m.png

Edited by Arrowstar
Link to comment
Share on other sites

I like the "System-Level Parameters" GUI. If you ever want to start expanding this tool into design optimization (or make a separate one), send me a message. I got a solver working for single-stage mixed-engine minimum-mass engine/tank combinations given minimum delta-V and TWR constraints, and I've been considering ideas for extending it to multiple stages. I can't stand making interfaces, but if people are already downloading the MCR to run your code then you've mostly solved that problem.

Link to comment
Share on other sites

Nicely done, and I'm looking forward to the Maneuver Execution Assistant.

If I had to make one suggestion for future features, I'd like to see calculations for aerodynamic drag added. Alterbaron's Aerobraking Calculator is excellent when you have a desired "final orbit" already in mind, but it unfortunately doesn't seem to have a mode where you can just plug in an orbit with a periapsis inside the atmosphere and then see what it will look like if you just let your ship continue on its course. I'd also imagine that if you could implement that, we could combine that with the features already in the program to calculate interplanetary transfers to aerocapture, which would be extremely handy.

Link to comment
Share on other sites

I like the "System-Level Parameters" GUI. If you ever want to start expanding this tool into design optimization (or make a separate one), send me a message. I got a solver working for single-stage mixed-engine minimum-mass engine/tank combinations given minimum delta-V and TWR constraints, and I've been considering ideas for extending it to multiple stages. I can't stand making interfaces, but if people are already downloading the MCR to run your code then you've mostly solved that problem.

Thanks! At the moment I don't have any plans for a vehicle optimization code. I'm really more interested in the trajectories than how people go about achieving them. :) However, if you're like to put something together as a compliment to KSP TOT, I'd be more than happy to see it on the forums. :)

Nicely done, and I'm looking forward to the Maneuver Execution Assistant.

If I had to make one suggestion for future features, I'd like to see calculations for aerodynamic drag added. Alterbaron's Aerobraking Calculator is excellent when you have a desired "final orbit" already in mind, but it unfortunately doesn't seem to have a mode where you can just plug in an orbit with a periapsis inside the atmosphere and then see what it will look like if you just let your ship continue on its course. I'd also imagine that if you could implement that, we could combine that with the features already in the program to calculate interplanetary transfers to aerocapture, which would be extremely handy.

I have considered this and I won't rule it out. It's a lot of work, and since KSP's drag model is apparently not particularly "normal" I'd need some pointers on where to look for that sort of thing. We'll just have to see.

Arrowstar, do you have plans to include flight constraints like maximum flight time for high energy transfer orbits?

Not at the moment, but I suppose I could if I thought there was demand for it. Can you give me a few precise examples of what you're looking for?

Link to comment
Share on other sites

Not at the moment, but I suppose I could if I thought there was demand for it. Can you give me a few precise examples of what you're looking for?

I was thinking of this Maximum Total Flight Time constraint highlighted in the red rectangle from your Optimization Tool for Orbiter:

jpwO5td.png

Edited by wingnut
Link to comment
Share on other sites

Thanks! At the moment I don't have any plans for a vehicle optimization code. I'm really more interested in the trajectories than how people go about achieving them. :) However, if you're like to put something together as a compliment to KSP TOT, I'd be more than happy to see it on the forums. :)

What I have so far is pretty simple, just a single-stage mixed-engine optimization (see http://forum.kerbalspaceprogram.com/showthread.php/45155-Mass-optimal-engine-type-vs-delta-V-payload-and-min-TWR?p=584543&viewfull=1#post584543), but I didn't put together an interface of any kind. Would be quite simple to just do string-replacement on the relevant parameters like payload mass, min TWR, min delta-V, max number of engines with a little Python script or even just sed, but if I ever get around to writing the multi-stage version of this then a more sophisticated interface will be needed.

Link to comment
Share on other sites

I'm doing something wrong...

I installed MCR v8.1, then extracted KSPTOT. But when I run the application, it asks for mclmcrrt8_1.dll, even though it is present in the runtime folder(MCR's). I even tried putting it in the same directory as KSPTOT.exe. No luck...

Could it be that MCR is installed in Program Files (x86)? I'm running 64-bit...

Link to comment
Share on other sites

I have considered this and I won't rule it out. It's a lot of work, and since KSP's drag model is apparently not particularly "normal" I'd need some pointers on where to look for that sort of thing. We'll just have to see.

Fair enough. I've had a devil of a time trying to wrap my head around aerobraking math myself whenever I've delved into it on my own, and I'm not really sure I'm closer to figuring it out than I was when I started -- which, funnily enough, is the reason I asked for it in the first place. Then again, the extent of my formal math education pretty much stops at college algebra, plus a little bit of geometry, so I'm probably at a bit of a handicap to start with. Now I'm kicking myself for taking the easy way out for my math credits in college...

If it helps, the KSP drag and terminal velocity equations are listed on the Wiki here, and the scale height equations are listed on the appropriate pages for the planets and moons.

Link to comment
Share on other sites

Arrowstar, first let me thank you for your hard work and dedication to the community. The TOT is a beautiful and much needed addition to the KSP toolkit. I just happened to stumble upon it at the same time I am taking my first steps in interplanetary travel and I look forward to using it,

Unfortunately I seem to have an issue no one else has reported in this thread. When I open TOT the windows look like this,

2XwMozo.jpg

wQRleAN.jpg

l7uhIUz.jpg

As you know the windows cannot be resized so the only thing I could think to try was changing my screen resolution and that had no effect.

Any suggestions?

Link to comment
Share on other sites

I was thinking of this Maximum Total Flight Time constraint highlighted in the red rectangle from your Optimization Tool for Orbiter:

Perhaps in a later build, yes. For now it doesn't seem to be needed much, but I'll keep it in mind for future releases. :)

I'm doing something wrong...

I installed MCR v8.1, then extracted KSPTOT. But when I run the application, it asks for mclmcrrt8_1.dll, even though it is present in the runtime folder(MCR's). I even tried putting it in the same directory as KSPTOT.exe. No luck...

Could it be that MCR is installed in Program Files (x86)? I'm running 64-bit...

Hmm. Can you try uninstalling and resintalling the MCR? Can you ensure you're running the KSPTOT executable from the same logical drive you've got the MCR installed on?

Fair enough. I've had a devil of a time trying to wrap my head around aerobraking math myself whenever I've delved into it on my own, and I'm not really sure I'm closer to figuring it out than I was when I started -- which, funnily enough, is the reason I asked for it in the first place. Then again, the extent of my formal math education pretty much stops at college algebra, plus a little bit of geometry, so I'm probably at a bit of a handicap to start with. Now I'm kicking myself for taking the easy way out for my math credits in college...

If it helps, the KSP drag and terminal velocity equations are listed on the Wiki here, and the scale height equations are listed on the appropriate pages for the planets and moons.

Interesting. An aerobraking planner would be a nice addition to KSP. I'll think about it. :)

Arrowstar, first let me thank you for your hard work and dedication to the community. The TOT is a beautiful and much needed addition to the KSP toolkit. I just happened to stumble upon it at the same time I am taking my first steps in interplanetary travel and I look forward to using it,

Unfortunately I seem to have an issue no one else has reported in this thread. When I open TOT the windows look like this,

<snip>

As you know the windows cannot be resized so the only thing I could think to try was changing my screen resolution and that had no effect.

Any suggestions?

It's probably not anything on your end. Can I get some information on your OS and graphics card? I have an idea of a possible fix, but I'll have to investigate. When I've got something put together, I'll shoot you a PM with a link and you can try it out and see if the problem is resolved. (If you want to, of course!)

Link to comment
Share on other sites

Interesting. An aerobraking planner would be a nice addition to KSP. I'll think about it. :)

Besides the MechJeb one there is already alterbaron's here, and I think he's got a Matlab version somewhere that he may be okay with you incorporating, can't hurt to ask.

Link to comment
Share on other sites

Besides the MechJeb one there is already alterbaron's here, and I think he's got a Matlab version somewhere that he may be okay with you incorporating, can't hurt to ask.

Hmm, indeed. Thanks for the suggestion! I'll look into it!

In other news, I decided to work on something a bit different tonight. As some here know, I am professional astrodynamicist for a major provider of commercial communications spacecraft. While planning maneuvers in the transfer orbit phase of the mission, we generate what are called "maneuver messages" which are used to tell the mission team and the spacecraft how to perform a particular type of maneuver.

I decided to do something similar in KSP TOT. I thus present a new feature, "Reports." Reports will eventually be generated from each of the main applications embedded within KSP TOT and generate predefined data (usually a subset of what's shown in the application itself) that is to be used for executing a maneuver.

Tonight I created the general GUI and implemented Reports for the ballistic transfer application (the Compute Departure button the main GUI). Here's what it looks like:

UWCdHsI.png

The top header block is filled in partially by the application generating the report and partially by the user. The middle section will always contain two text blocks and two image blocks, which the application will fill in or not as needed. A notes block that users can fill in with notes is also included. Finally, the footer block is for role-playing. If you're pretending to be in a mission control environment, then typically various people would be responsible for generating the report/maneuver message, checking and approving it, executing it, and observing the execution (this is how we do it in the Real World). I've included this in case anyone wants to get a group together and do things a bit more formally. :)

The report is designed to be printed, which is why you seen a printer icon in the upper left. Pushing this will generate a high-res PNG of the report (I couldn't get PDF to work and look nice or even readable), which you can then print for your own devices. :)

So, thoughts? :)

Also, an update on the progress of v0.10: the maneuver execution assistant is complete. I've also added the ability to load custom celestial body information into TOT, so all you people who want to use this to do Earth solar system calculations now finally can. :) Finally, I added a bunch of tool-tips to help clarify some inputs. The only outstanding feature I need to start is a rendezvous application that will also work as a transfer orbit package if you're going to a moon of the body you're currently orbiting. :)

Link to comment
Share on other sites

[quote name=Arrowstar;612784

It's probably not anything on your end. Can I get some information on your OS and graphics card? I have an idea of a possible fix' date=' but I'll have to investigate. When I've got something put together, I'll shoot you a PM with a link and you can try it out and see if the problem is resolved. (If you want to, of course!)

Sounds Great

OS: Win 7

Graphics card(s): Dual Nvidea GTX 765s in SLI

Link to comment
Share on other sites

...I thus present a new feature, "Reports." Reports will eventually be generated from each of the main applications embedded within KSP TOT and generate predefined data (usually a subset of what's shown in the application itself) that is to be used for executing a maneuver.

Nice! I like the idea and the layout. Looking forward to seeing it in the next version of the app!

The report is designed to be printed, which is why you seen a printer icon in the upper left. Pushing this will generate a high-res PNG of the report (I couldn't get PDF to work and look nice or even readable), which you can then print for your own devices. :)

Have you thought about exporting the data to a spreadsheet file? I know both Microsoft Excel and Apache OpenOffice have features that allow you to export spreadsheets in PDF format (and I think both programs can read the other's file formats as well). I don't know what sort of coding or formatting would be necessary to make it turn out looking like an "official" document would, though.

Also, an update on the progress of v0.10: the maneuver execution assistant is complete. I've also added the ability to load custom celestial body information into TOT, so all you people who want to use this to do Earth solar system calculations now finally can. :) Finally, I added a bunch of tool-tips to help clarify some inputs. The only outstanding feature I need to start is a rendezvous application that will also work as a transfer orbit package if you're going to a moon of the body you're currently orbiting. :)

Sounds awesome on all fronts. Keep up the good work!

Link to comment
Share on other sites

A great big thank you to Arrow star for his persistence in resolving my display issues!

He put in a lot of work, all because this old man won't let "the man" tell me what my default fonts should be.

Thank You Arrowstar!

Link to comment
Share on other sites

Nice! I like the idea and the layout. Looking forward to seeing it in the next version of the app!

Have you thought about exporting the data to a spreadsheet file? I know both Microsoft Excel and Apache OpenOffice have features that allow you to export spreadsheets in PDF format (and I think both programs can read the other's file formats as well). I don't know what sort of coding or formatting would be necessary to make it turn out looking like an "official" document would, though.

Sounds awesome on all fronts. Keep up the good work!

Thanks! Not sure about the Excel export, though. There's no reason I couldn't (MATLAB can actually do it easily enough), but I'm not sure it would actually add any value. What I really need to do is figure out how to get MATLAB to render true type fonts, which doesn't seem to work too well. I'll keep investigating though.

A great big thank you to Arrow star for his persistence in resolving my display issues!

He put in a lot of work, all because this old man won't let "the man" tell me what my default fonts should be.

Thank You Arrowstar!

No problem. :) You're undoubtedly not the only person that will encounter this issue, so I'm glad we got it figured out!

Link to comment
Share on other sites

Hi everyone,

One more progress update here. I've been working on getting reports implemented for the other "applications" within KSP TOT. Tonight I've completed the 2 burn orbit change and the (new!) rendezvous module reports. This just leaves the flyby maneuver sequencer. The maneuver execution assistant (also new) may or may not get a report. Here's a picture:

VfuDjDo.png

A few things I've been thinking about for v0.11:

1) There's been lots of interest in an aerobraking application, so I'll take a look into that. It sounds like a fun challenge for this weekend lol.

2) Lots of people have been asking about the ability to save the location where SFS files are retrieved from when pulling orbits from them. I've been refactoring code to make that much easier and something like this should land in 0.11 (if I don't just up and do it for 0.10).

3) Probably some more bug fixes as well. 0.10 has two good fixes and I'm looking forward to finding more.

Open question to the KSP TOT community: what else do you guys want to see that we haven't already discussed? If, after 0.11, I run out of ideas, I'll probably take this to the v1.0 level. But you guys use the tool, so suggestions are always welcome. :)

Link to comment
Share on other sites

I'll second the maximum total flight time suggestion - sometimes I don't want to wait a year to get to jool. I had some other thoughts, but I read through the thread again and I understand how this thing works a bit better now. This thing is amazing!

Link to comment
Share on other sites

I'll second the maximum total flight time suggestion - sometimes I don't want to wait a year to get to jool. I had some other thoughts, but I read through the thread again and I understand how this thing works a bit better now. This thing is amazing!
Thanks! I'm really glad you like it, that's why I made it. :) I'll consider your request for this constraint for a future version. It's going to be somewhat low priority, but it's on the list. :)

-----------------------------------------------------------------------------------------

On that note, I'm pleased to announce the release of KSP TOT v0.10! Here's the change log:

  1. New application: Maneuver Execution Assistant. This helps pilots properly time the start of burns to center the delta-v across the maneuver node.
  2. New application: Rendezvous Maneuver Sequencer. Useful for meeting up with other craft in orbit, as well as moons.
  3. KSP TOT can now ingest custom celestial bodies files and parse them. Useful for doing stuff in other solar systems you define.
  4. Added some tooltips to input fields.
  5. Bug fix: Fixed issue where GUI elements could become distorted and/or shift position
  6. Bug fix: Fixed issue with code that converts r/v vectors to keplerian elements: now handles 0 eccentricity and inclination much better
  7. Bug fix: Code now remembers where last opened SFS file was retrieved from.
  8. Bug fix: Optimization runs now include some scaling of constraints and the objective function.
  9. Lots of backend changes to support the above.

Download link in the OP has been updated. Please let me know if you find any bugs. Comments, suggestions, and questions welcome! Thanks for being awesome users, everyone. :D

Edited by Arrowstar
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...