Jump to content

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


Recommended Posts

Wish list feature request.

When using the porkchop plotter to get a better approximation for an interplanetary transfer in RO/RP-1 than TWP, I would prefer if the porkchop plot reported both the departure dV and the arrival dV.  (Currently it reports the total dV, which is less useful than the 2 separate values, since for me departure and arrival are almost always separate stages). I would also like to see the inclination and RAAN/LAN of the 'nominal' departure orbit (not sure whether that is known at this stage)?   

Thanks for your work on this.

Link to comment
Share on other sites

Hi, I've been looking at getting Matlab myself for a while, and if I already am getting it, I'm interested in compiling KSPTOT for Mac, since running it through a Linux VM has some performance issues for me. (I tried running it in a headless VM and using x-forwarding to hopefully solve the performance issues, but the MCR really didn't like that.) Could you tell me which MATLAB modules are used by KSPTOT so I can make sure I include them in my setup when purchasing?

Link to comment
Share on other sites

  • 2 weeks later...
On 1/5/2022 at 8:48 PM, Alaygrounds said:

Is it possible to increase the numbercrunching rate (Multi-Flyby Maneuver)  by feeding it more computer resources? If so, how can I do this?

Unfortunately it is not, unless you begin using a faster CPU.

On 1/6/2022 at 2:58 AM, AVaughan said:

Wish list feature request.

When using the porkchop plotter to get a better approximation for an interplanetary transfer in RO/RP-1 than TWP, I would prefer if the porkchop plot reported both the departure dV and the arrival dV.  (Currently it reports the total dV, which is less useful than the 2 separate values, since for me departure and arrival are almost always separate stages). I would also like to see the inclination and RAAN/LAN of the 'nominal' departure orbit (not sure whether that is known at this stage)?   

Thanks for your work on this.

I could look into those changes.  Thanks for bringing them to my attention!

On 1/9/2022 at 6:27 PM, Dimitriye98 said:

Hi, I've been looking at getting Matlab myself for a while, and if I already am getting it, I'm interested in compiling KSPTOT for Mac, since running it through a Linux VM has some performance issues for me. (I tried running it in a headless VM and using x-forwarding to hopefully solve the performance issues, but the MCR really didn't like that.) Could you tell me which MATLAB modules are used by KSPTOT so I can make sure I include them in my setup when purchasing?

Sure! You'll need the parallel computing toolbox, optimization toolbox, global optimization toolbox, instrument control toolbox, and robotics toolbox.  Those are the ones I can think of off the top of my head.  I can check later (might be next week) to find out for sure.

Sorry for the super late replies everyone, apparently my setting to follow this thread got turned off at some point and I didn't notice it.  I've re-enabled it for the future. :)

Link to comment
Share on other sites

  • 4 weeks later...

Apologies if I've asked this before; is there any way to control the number and location (celestial body-wise) of burns?  I'm trying to plot a single-burn, multi-flyby maneuver but KSPTOT really wants to create a second burn that I can't accommodate.

Link to comment
Share on other sites

On 2/17/2022 at 10:44 PM, Entropian said:

Apologies if I've asked this before; is there any way to control the number and location (celestial body-wise) of burns?  I'm trying to plot a single-burn, multi-flyby maneuver but KSPTOT really wants to create a second burn that I can't accommodate.

Assuming you're talking about using MFMS, I think I've got something that might work for you.  Today I built KSPTOT v1.6.9 pre-release 6.  This new PR contains an update for MFMS that allows you to set a max delta-v  limit on flyby maneuvers.  You'll see it in the space with the flight time bounds and all that.  If you set a delta-v limit to roughly zero (say 0.001 km/s), that'll hopefully allow you to solve your problem without breaking the optimizer too much.

Can you try this out and see if it helps?

By the way, everyone, a few things:

  • Sorry I haven't been around much.  Honestly there hasn't been much to do with KSPTOT lately (can't think of anything to add and haven't been made aware of any new bugs lol) and I've been digging into and learning more about reinforcement learning.  Perhaps one day I'll be able to incorporate some machine learning into KSPTOT, but for the moment it's remaining just a personal interest.
  • I had to go to building the Windows version of KSPTOT on a Win10 virtual machine to get around issues I was having building on my Windows 7 installation.  I'm not sure if it's a code thing or if it's just that my PC is 9 years old (or some combination of all of the above).  One day I'll hopefully get new hardware, but that day is going to come only when PC component prices drop.

Anyway, happy orbiting!

Link to comment
Share on other sites

On 1/6/2022 at 2:58 AM, AVaughan said:

When using the porkchop plotter to get a better approximation for an interplanetary transfer in RO/RP-1 than TWP, I would prefer if the porkchop plot reported both the departure dV and the arrival dV.  (Currently it reports the total dV, which is less useful than the 2 separate values, since for me departure and arrival are almost always separate stages).

This is done for the next release.

Link to comment
Share on other sites

  • 2 weeks later...

Is there some way to trick KSPTOT into using a body besides Kerbin as the default for things like reference frames? Using RSS it defaults to the Sun instead of Earth (presumably because Kerbin isn't present so it just picks the parent body).

I have tried changing various things in the bodies.ini file to try and do this, like setting Earth's id to 1 (same as Kerbin's) and putting it first in the config file, but no luck :/

Link to comment
Share on other sites

1 hour ago, Razgriz1 said:

Is there some way to trick KSPTOT into using a body besides Kerbin as the default for things like reference frames? Using RSS it defaults to the Sun instead of Earth (presumably because Kerbin isn't present so it just picks the parent body).

I have tried changing various things in the bodies.ini file to try and do this, like setting Earth's id to 1 (same as Kerbin's) and putting it first in the config file, but no luck :/

There really isn't, sadly.  In LVD it'll either be the body named Kerbin or the first body in the list.  Otherwise, in some other places it could be the first body in the list or the third body in the list (Kerbin is the third in the default list).  Sorry for the inconsistency here, I wrote all this code over the course of 8 years so sometimes things aren't always as they should be.

Link to comment
Share on other sites

1 hour ago, Arrowstar said:

There really isn't, sadly.  In LVD it'll either be the body named Kerbin or the first body in the list.  Otherwise, in some other places it could be the first body in the list or the third body in the list (Kerbin is the third in the default list).  Sorry for the inconsistency here, I wrote all this code over the course of 8 years so sometimes things aren't always as they should be.

No worries. I have a template save that has the frames set to Earth, and that's good enough. I figured it was probably hard-coded to look for Kerbin, but didn't want to dig through the source to find out myself :sticktongue:

Edit: Now I'm gonna have to put a launch pad on the Sun, just to make LVD more convenient...

Edited by Razgriz1
Link to comment
Share on other sites

I'm back for another play through, and trying to plan an insertion of a commsat into formation. The following mission file consistently crashes in the mission architect when I try to optimise, giving error message 'Unrecognized field name "propTypeEnum".' This occurs with all three algorithms selected. It seems to be related to the other spacecraft constraint.

Mission file:

https://drive.google.com/file/d/1d2-ljODWscWlpxRf4HZOGO9LywzkSIhy/view?usp=sharing

 

Link to comment
Share on other sites

OK, So I went from my last post to trying to use the LVD instead. I can't seem to edit sequential events after I first set them. Subsequent double-clicks do nothing.

I'm going to go check my Matlab runtime version...

Link to comment
Share on other sites

6 minutes ago, Snoman314 said:

OK, So I went from my last post to trying to use the LVD instead. I can't seem to edit sequential events after I first set them. Subsequent double-clicks do nothing.

I'm going to go check my Matlab runtime version...

Hey, this is a known issue with the App Designer GUI environment at the moment.  To edit an event that doesn't seem to be working, right click the list of events and select Edit Event in red.  Sorry about the confusion.

Link to comment
Share on other sites

5 minutes ago, Snoman314 said:

OK, So I went from my last post to trying to use the LVD instead. I can't seem to edit sequential events after I first set them. Subsequent double-clicks do nothing.

I'm going to go check my Matlab runtime version...

OK, I have MATLAB Runtime 9.10 installed, which is apparently == R2021a. Which is apparently the correct one from the OP?

But nothing works, so I dunno? (exaggerating).

Link to comment
Share on other sites

Just now, Snoman314 said:

OK, I have MATLAB Runtime 9.10 installed, which is apparently == R2021a. Which is apparently the correct one from the OP?

But nothing works, so I dunno? (exaggerating).

I'm working the bug you mentioned in MA now and I'll put out an update pre-release soon (probably tomorrow at this rate) with a fix.  As for LVD, please see my last post. :)

Link to comment
Share on other sites

1 minute ago, Arrowstar said:

Hey, this is a known issue with the App Designer GUI environment at the moment.  To edit an event that doesn't seem to be working, right click the list of events and select Edit Event in red.  Sorry about the confusion.

OK... Yeah I can't figure out how to do that, sorry. Do I right click on one of the events in the list, the whitespace in the event list box, or somewhere else? I'm right clicking all over and nothing's coming up.

2 minutes ago, Arrowstar said:

I'm working the bug you mentioned in MA now and I'll put out an update pre-release soon (probably tomorrow at this rate) with a fix.  As for LVD, please see my last post. :)

Yay! Thanks :D

Link to comment
Share on other sites

1 minute ago, Snoman314 said:

OK... Yeah I can't figure out how to do that, sorry. Do I right click on one of the events in the list, the whitespace in the event list box, or somewhere else? I'm right clicking all over and nothing's coming up.

Select the event you want to edit so it's highlighted.  Then right click the name of the event you want to edit.  A pop up menu should appear and its first entry will be "Edit Event".  As an example:

PMYegcT.png

Link to comment
Share on other sites

Just now, Arrowstar said:

Select the event you want to edit so it's highlighted.  Then right click the name of the event you want to edit.  A pop up menu should appear and its first entry will be "Edit Event".  As an example:

...

OK that makes sense, and I instinctively tried to do that right at the start. That's not what I was seeing though. I consistently had no response when right clicking on list entries. I think I reproduced the bug though... Once.

After creating a new Mission Plan, to try and do what you said, I found it was all working as intended. But then when I accidentally click 'Insert Sequential Event' and then just close the popup window without interacting with it, all events seem to become bugged. So basically, I think I broke it... But then I tried it again and can't reproduce :/

But it's working now, so that's nice.

Link to comment
Share on other sites

On 3/5/2022 at 4:58 PM, Snoman314 said:

OK that makes sense, and I instinctively tried to do that right at the start. That's not what I was seeing though. I consistently had no response when right clicking on list entries. I think I reproduced the bug though... Once.

After creating a new Mission Plan, to try and do what you said, I found it was all working as intended. But then when I accidentally click 'Insert Sequential Event' and then just close the popup window without interacting with it, all events seem to become bugged. So basically, I think I broke it... But then I tried it again and can't reproduce :/

But it's working now, so that's nice.

Glad to hear it!  I updated KSPTOT v1.6.9 pre-release 6 with a fix for your Mission Architect bug.  Could you try it out and let me know if that resolves your issue?  Thanks!

Link to comment
Share on other sites

10 hours ago, Rach said:

We need a mini-tutorial for this, if it's posible

It's pretty straight forward!  Just load the bodies.ini file with your planets in it, open up the Multi-flyby Maneuver Sequencer, and set it up like this:

REl3RWL.png

The big thing is to make sure the Earth to Earth segment has a max number of revolutions greater than 0.  Here I used 2.  Tap the "Compute" button and away you go.

Let me know if you have any other questions. :)

Link to comment
Share on other sites

16 hours ago, Arrowstar said:

It's pretty straight forward!  Just load the bodies.ini file with your planets in it, open up the Multi-flyby Maneuver Sequencer, and set it up like this:

Incredible software but best developer. I will try it!  

Thanks so much!!!

 

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