Jump to content

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


Arrowstar
 Share

Recommended Posts

1 hour ago, Kaduloso_007 said:

Hi!

 I was very interested in using this tool, I really liked what I saw.  I just have a question regarding the orbit simulations: In my case, I'm starting my first save with the RSS and Principia mods, I really like to carry out more complex missions together with kOS (like in real life), with this tool , does it have the ability to simulate the orbits that the Principia mod provides within the game?  For example, Lagrange points, gravitational perturbations between n-body and among others?
 If yes, I will be relieved and happy to have to use this wonderful tool!

 Thanks in advance!

Yes this allows you to simulate n-body physics

Link to comment
Share on other sites

17 hours ago, Kaduloso_007 said:

Hi!

 I was very interested in using this tool, I really liked what I saw.  I just have a question regarding the orbit simulations: In my case, I'm starting my first save with the RSS and Principia mods, I really like to carry out more complex missions together with kOS (like in real life), with this tool , does it have the ability to simulate the orbits that the Principia mod provides within the game?  For example, Lagrange points, gravitational perturbations between n-body and among others?
 If yes, I will be relieved and happy to have to use this wonderful tool!

 Thanks in advance!

As has been mentioned, KSPTOT can model N-body orbits.  You'll need to use Launch Vehicle Designer (LVD) to do your trajectory design work.  Please let me know if you have any questions.  There's a bit of a learning curve to LVD, but I'm always happy to help!

Link to comment
Share on other sites

On 7/22/2022 at 2:23 PM, Arrowstar said:

I've resolved the issue by making a few containers scrollable.  I'm not sure when I'm going to rebuild KSPTOT, but this will be in the next release!

Thank you for the help!

Link to comment
Share on other sites

6 hours ago, Jacktical said:

Hi! I've never tried this out before and I'm really interested in it and I was wondering if it worked in 2.5x KSRSS? 

Yes, you can!  You'll need to create a custom bodies.ini file and load it into KSPTOT.  The easiest way to do this is to open KSPTOT, then start KSP and get to the launch pad like you were going to fly a rocket.  Go back to KSPTOT, and in the File menu, you'll see an option for creating a bodies.ini file.  Push the button and tell KSPTOT where to save it.  Then just load it in KSPTOT by going back to the File menu, selecting the option to load a bodies.ini file, and select the file you just created.

Let me know if you have any questions!

Link to comment
Share on other sites

7 hours ago, Arrowstar said:

Yes, you can!  You'll need to create a custom bodies.ini file and load it into KSPTOT.  The easiest way to do this is to open KSPTOT, then start KSP and get to the launch pad like you were going to fly a rocket.  Go back to KSPTOT, and in the File menu, you'll see an option for creating a bodies.ini file.  Push the button and tell KSPTOT where to save it.  Then just load it in KSPTOT by going back to the File menu, selecting the option to load a bodies.ini file, and select the file you just created.

Let me know if you have any questions!

Thanks alot :) I'll try it now

Link to comment
Share on other sites

Hi, I'm having the issue whereby in the multi flyby maneavure sequencer the waypoints tab is way too small to be usable (cannot click on anything or type) and there doesn't seem to be a way to change the relative sizing of the tabs

Any suggestions for fixes would be greatly appreciated

(Windows 10 version)

 

Please see images for reference:

https://imgur.com/a/bXGtxOT

 

 

Link to comment
Share on other sites

On 8/3/2022 at 10:36 AM, Jacktical said:

Hey! I've been playing around with this and it seems really interesting, I was wondering if there was a way to change the colour of the orbit lines?

svGY4ZN.png

Yes and no.  There's no way to do it in the UI, but I can tell from your image that the bodies.ini file has the "bodycolor" entry for each body set to gray.  You can change this to change the color of the orbits.  You can find acceptable options for that field in the bodies.ini here: https://www.mathworks.com/help/matlab/ref/colormap.html#inputarg_map.

Note that the actual color that shows up will be the average of the color map colors shown on that webpage.  You will also need to restart KSPTOT to get those colors to load.  Let me know if you have questions or if you need help with any of this!

1 hour ago, SGTCarreras86 said:

Hi, I'm having the issue whereby in the multi flyby maneavure sequencer the waypoints tab is way too small to be usable (cannot click on anything or type) and there doesn't seem to be a way to change the relative sizing of the tabs

Any suggestions for fixes would be greatly appreciated

(Windows 10 version)

 

Please see images for reference:

https://imgur.com/a/bXGtxOT

 

 

You're not the first person to run into this.  I was going to wait until I had something more substantial to push out to rebuild KSPTOT, but since multiple people are having the issue, I'm building a new build of the application with the fix this morning.  I'll have a fixed new build out soon and I'll put a note here when it's done.

Link to comment
Share on other sites

The new build of KSPTOT with the fix for the Multi-flyby Maneuver Sequencer (MFMS) window size issue is now online.  Please go re-download KSPTOT from the original post, and let me know if you have any questions.  Thanks!

Link to comment
Share on other sites

Hello! I've been using this program for the past couple of hours and currently I am trying to do a fly by Eve and go to Duna from it, the maneuver shows fine in the program but when using the upload maneuver to KSP it just decides to send me out to perfectly orbit the sun away from Eve and Duna. Any help?

Link to comment
Share on other sites

13 hours ago, TheUntitledGoose said:

Hello! I've been using this program for the past couple of hours and currently I am trying to do a fly by Eve and go to Duna from it, the maneuver shows fine in the program but when using the upload maneuver to KSP it just decides to send me out to perfectly orbit the sun away from Eve and Duna. Any help?

There's a few things possibly going on.

First, you need to make sure that your initial orbit around Kerbin is exactly what it is in KSP.  If it's any different, you won't get a good answer.

Second, when you go to upload the maneuver, you need to make sure that your departure burn is given relative to universal time and not the periapsis time.  If it's not, that'll mess things up too.

Can you provide provide screenshots of the MFMS window after you get a solution, the upload maneuver window with the maneuver filled in, and the KSP window where you're seeing things fly off into space (with the current time in the game shown)?  I can tell me with all that.  Thanks!

Link to comment
Share on other sites

1 hour ago, Arrowstar said:

There's a few things possibly going on.

First, you need to make sure that your initial orbit around Kerbin is exactly what it is in KSP.  If it's any different, you won't get a good answer.

Second, when you go to upload the maneuver, you need to make sure that your departure burn is given relative to universal time and not the periapsis time.  If it's not, that'll mess things up too.

Can you provide provide screenshots of the MFMS window after you get a solution, the upload maneuver window with the maneuver filled in, and the KSP window where you're seeing things fly off into space (with the current time in the game shown)?  I can tell me with all that.  Thanks!

Yes, I have the exact orbit it is in KSP in the program, yes I input the UT as it said in UT not periapsis. Here's the 2 screenshots. https://imgur.com/a/V6UQD71 and here's in game, https://imgur.com/a/92QAVYI.

Sorry, couldn't figure out how to post images on here :(

Edit: In the maneuver uploader I am uploading both of the maneuvers but it doesn't matter if the first one send you to the void.

Edited by TheUntitledGoose
Link to comment
Share on other sites

Posted (edited)
1 hour ago, TheUntitledGoose said:

Yes, I have the exact orbit it is in KSP in the program, yes I input the UT as it said in UT not periapsis. Here's the 2 screenshots. https://imgur.com/a/V6UQD71 and here's in game, https://imgur.com/a/92QAVYI.

Sorry, couldn't figure out how to post images on here :(

Edit: In the maneuver uploader I am uploading both of the maneuvers but it doesn't matter if the first one send you to the void.

Okay thanks.  What happens if you adjust the time of the maneuver a bit forwards or backwards?  Keep in mind that MFMS is using a zero radius SOI assumption for Kerbin, so the timing may need a bit of tuning to work in KSP's finite radius SOI simulation.

EDIT: Okay, so I tried it myself in KSP.  When I put in your initial orbit exactly and then uploaded the maneuver node, it was close but not perfect.  However, I noticed that when I removed the node, did some time warping, and then re-uploaded the node, it was way off.  At this point something has probably shifted with the underlying orbit, which is why things went wrong.  Not having the correct RAAN (LAN), argument of periapsis, and inclination can really throw off the way the maneuver works, even if they're only off by a bit.

The only solution to your problem is to reoptimize your departure closer to your departure date, or to import the simulation into Launch Vehicle Designer (LVD), which can handle a higher fidelity dynamics model with real finite SOI sizes.  There's a much bigger learning curve to using LVD, though, but it can definitely accurately model your spacecraft's very well.

Edited by Arrowstar
Link to comment
Share on other sites

14 minutes ago, Arrowstar said:

Okay thanks.  What happens if you adjust the time of the maneuver a bit forwards or backwards?  Keep in mind that MFMS is using a zero radius SOI assumption for Kerbin, so the timing may need a bit of tuning to work in KSP's finite radius SOI simulation.

I've played around with the UT time for a bit and now it's a bit better but still waaaaay off. Images: https://imgur.com/a/ntqny50, what it thinks will happen vs the closest what I got to that image: https://imgur.com/a/UFW4qvr

Link to comment
Share on other sites

25 minutes ago, TheUntitledGoose said:

I've played around with the UT time for a bit and now it's a bit better but still waaaaay off. Images: https://imgur.com/a/ntqny50, what it thinks will happen vs the closest what I got to that image: https://imgur.com/a/UFW4qvr

Okay, after looking at your screenshots I do think we're running into the limitations of the "Zero Radius SOI" assumption.  As I said, MFMS does not model the fact that Kerbin or Eve have finite sized spheres of influence, and this can and will have a noticeable impact on the solution.  MFMS was designed for quick studies of the multi-gravity assist trade space and not for higher fidelity dynamics simulation (which you'll need LVD for, as I previously mentioned).  I think at this point you're just running into the limits of the tool.

If you'd like, you can get a bit more fidelity by importing your MFMS sim into LVD very easily:

  1. In MFMS, click the Save Results to File for LVD button.  Select a name and location to save the file and save it.
  2. Open up Launch Vehicle Designer from the main KSPTOT GUI.
  3. In LVD, File -> New Mission Plan from MFMS Output
  4. Optimization -> Optimize Mission to get all the various bits of the trajectory to line up.

The result from the optimization in LVD will be a continuous mission plan with higher fidelity that you can use in KSP.  You can get even more fidelity out of it if you put in your vehicle's masses, stages, tank information, engine information, etc, and then convert the impulsive delta-v to finite burns.  That's an advanced step, though, so one thing at a time.

Let me know if you have any questions!

Link to comment
Share on other sites

13 minutes ago, Arrowstar said:

Okay, after looking at your screenshots I do think we're running into the limitations of the "Zero Radius SOI" assumption.  As I said, MFMS does not model the fact that Kerbin or Eve have finite sized spheres of influence, and this can and will have a noticeable impact on the solution.  MFMS was designed for quick studies of the multi-gravity assist trade space and not for higher fidelity dynamics simulation (which you'll need LVD for, as I previously mentioned).  I think at this point you're just running into the limits of the tool.

If you'd like, you can get a bit more fidelity by importing your MFMS sim into LVD very easily:

  1. In MFMS, click the Save Results to File for LVD button.  Select a name and location to save the file and save it.
  2. Open up Launch Vehicle Designer from the main KSPTOT GUI.
  3. In LVD, File -> New Mission Plan from MFMS Output
  4. Optimization -> Optimize Mission to get all the various bits of the trajectory to line up.

The result from the optimization in LVD will be a continuous mission plan with higher fidelity that you can use in KSP.  You can get even more fidelity out of it if you put in your vehicle's masses, stages, tank information, engine information, etc, and then convert the impulsive delta-v to finite burns.  That's an advanced step, though, so one thing at a time.

Let me know if you have any questions!

Hello, I've ran the optimization for a bit, and now I don't know what do with it, I don't see any way I could import any maneuver into KSP.

Link to comment
Share on other sites

55 minutes ago, TheUntitledGoose said:

Hello, I've ran the optimization for a bit, and now I don't know what do with it, I don't see any way I could import any maneuver into KSP.

In the sequential events list box, select the event whose maneuver you want to upload, then right click it and select "Upload Impulsive Delta-V Action to KSP."

Link to comment
Share on other sites

1 hour ago, Arrowstar said:

In the sequential events list box, select the event whose maneuver you want to upload, then right click it and select "Upload Impulsive Delta-V Action to KSP."

Sorry for keeping on bothering you but it still is making me fly away from Eve even after letting it sit until the 15th iteration. Now after moving the UT time forward backwards a bit it still doesn't come into Eve's SOI. I can provide screenshots if needed.

 

Sorry I'm just really stupid.

Edited by TheUntitledGoose
I can't do simple rocket science
Link to comment
Share on other sites

6 hours ago, TheUntitledGoose said:

Sorry for keeping on bothering you but it still is making me fly away from Eve even after letting it sit until the 15th iteration. Now after moving the UT time forward backwards a bit it still doesn't come into Eve's SOI. I can provide screenshots if needed.

 

Sorry I'm just really stupid.

To be clear, did you figure it out?

Link to comment
Share on other sites

11 hours ago, Arrowstar said:

To be clear, did you figure it out?

Sadly no. I tried to play around more with the LVD and the time but at least this time it sent me pretty close to Eve, but just on the edge of it's SOI, not how it predicted on the program.

Link to comment
Share on other sites

23 hours ago, TheUntitledGoose said:

Sadly no. I tried to play around more with the LVD and the time but at least this time it sent me pretty close to Eve, but just on the edge of it's SOI, not how it predicted on the program.

That's probably as accurate as you can expect to be with impulsive delta v all the way from Kerbin.  For more accuracy, you need to model the mass and engine of the spacecraft and use finite duration burns.  You just can't achieve it with the impulsive delta v manuevers.

Link to comment
Share on other sites

@TheUntitledGoose let me also add in that even in real life, with the best predictive software that you would have to be doing course corrections. In fact, if you were NASA you would have several course corrections at key points planned for before you ever launched. You might not end up using them but it would planned for.

 

(fun fact: Mars Climate Orbiter, which was lost due to metric/imperial issues? They knew it was off course. Discussed the matter and decided that it would be dealt with at the next planned course correction. Then they kind of forgot to do it)

Link to comment
Share on other sites

2 hours ago, Starwaster said:

@TheUntitledGoose let me also add in that even in real life, with the best predictive software that you would have to be doing course corrections. In fact, if you were NASA you would have several course corrections at key points planned for before you ever launched. You might not end up using them but it would planned for.

As a professional astrodynamicist, not only can I confirm this, but we also spend forever getting our engine and mass models perfect so we actually get the accuracy we need.  Mass modeling in particular is almost as much work as the trajectory design problem lol, but making sure that your vehicle's mass is modeled correctly and making sure that that engine models (thrust and specific impulse, especially for start up and shutdown transients) are accurate is hugely important to actually getting the vehicle to where you want it to be.

Link to comment
Share on other sites

5 hours ago, Arrowstar said:

Mass modeling in particular is almost as much work as the trajectory design problem

ugghgh and you'd think this is easy in KSP but I found out way more often that I would have imagined that somehow I managed to get it wrong either from not properly checking the input I gave KSPTOT or improperly reading numbers from the game myself. Sometimes I couldn't even track down where the hell the mass discrepancy came from even when I thought I was being meticulous. So it's just a PITA no matter what :P

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.

 Share

×
×
  • Create New...