Jump to content

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


Recommended Posts

Hi everyone,

So I know development of KSPTOT has been pretty non-existent lately.  This is mostly due to some real life commitments I have, plus some new hobbies and other things just taking up time.  However, I did want to let people know that I will be updating the KSPTOTConnect code to KSP 1.1 with the idea being that I have an update out this weekend.

If there are any small bugs or problems that still exist in the latest pre-release (sorry for never getting that officially out :blush:), please let me know ASAP and I'll try to work fixes for them into this latest update.

Thanks!

EDIT: So turns out that the pre-release is only available on Steam and I have the KSP store copy.  Unless someone wants to send me the Unity/KSP API DLLs (not sure if that's cool or not, would need to ask a mod, I guess), my work may need to wait until the actual 1.1 release.

Edited by Arrowstar
Link to comment
Share on other sites

On 3/30/2016 at 7:47 AM, Arrowstar said:

Hi everyone,

So I know development of KSPTOT has been pretty non-existent lately.  This is mostly due to some real life commitments I have, plus some new hobbies and other things just taking up time.  However, I did want to let people know that I will be updating the KSPTOTConnect code to KSP 1.1 with the idea being that I have an update out this weekend.

  Happy to hear it Arrowstar, I've been playing since 2011 and I've been hoping to challenge myself with more challenging activities like gravity assists and this seems like just the tool to use. Plus with Kerbal Alarm Clock and Transfer Window Planner not being updated for some time, this will be a must have for me. 

 

-EDIT- where do I find the phase angles? The tutorial link isn't working for me.

Edited by Bob Jub
Link to comment
Share on other sites

19 hours ago, Bob Jub said:

  Happy to hear it Arrowstar, I've been playing since 2011 and I've been hoping to challenge myself with more challenging activities like gravity assists and this seems like just the tool to use. Plus with Kerbal Alarm Clock and Transfer Window Planner not being updated for some time, this will be a must have for me. 

 

-EDIT- where do I find the phase angles? The tutorial link isn't working for me.

Glad to hear it!  Let me know if I can help any.

KSP TOT doesn't use phase angles because those are inherently based upon circular orbits.  You can use the "Compute Departure" tool off the main porkchop plot or the KSP TOT Mission Architect tool (Tools -> Mission Planning).  The former is easier to use by far but the latter will be much more accurate.

Link to comment
Share on other sites

3 hours ago, Arrowstar said:

Glad to hear it!  Let me know if I can help any.

KSP TOT doesn't use phase angles because those are inherently based upon circular orbits.  You can use the "Compute Departure" tool off the main porkchop plot or the KSP TOT Mission Architect tool (Tools -> Mission Planning).  The former is easier to use by far but the latter will be much more accurate.

Awesome! Thanks for the reply. I am definitely digging this program, it makes my KSP mission planning feel a lot more... professional. Totally workable without being able to hook into KSP by manually inputting time, but I'm definitely looking forward to this being updated.

Edited by Bob Jub
Link to comment
Share on other sites

Hi, @Arrowstar,

As part of your upgrade efforts, will you be looking to add the import/export of KSP data on the screens that do not have that yet? I was trying to get some flyby burn info into the program and was not able to get it to work.  I think the feature is brilliant and I confess I rely on it quite a bit.

Thanks

Link to comment
Share on other sites

4 minutes ago, Gilph said:

Hi, @Arrowstar,

As part of your upgrade efforts, will you be looking to add the import/export of KSP data on the screens that do not have that yet? I was trying to get some flyby burn info into the program and was not able to get it to work.  I think the feature is brilliant and I confess I rely on it quite a bit.

Thanks

Can you be more specific as to which screens you are referring to?  Pictures and screenshots would help, please. 

General notice, btw, I don't have steam so the upgrade will have to wait until 1.1 is officially released. Sorry about that, all. 

Link to comment
Share on other sites

Hi

Firstly, thanks for this amazing tool - it's really taught me a lot more that I was unable to without it!

I'm using kerbal with RO and RSS. I am currently trying to learn more about using a sequence of fly-bys to reduce overall delta-v requirement using gravity assists. An example of this is the Cassini probe mission. After tinkering around a bit, perhaps there's someone who could help me with two questions:

1) When using the KSPTOT tool to find a launch window from Earth to Venus it gives me a departure Delta-V of:  2.4031 km/s on Year 1, Day 157 15:34:44.902. I have unsuccessfully tried to find out what the starting assumptions are. When computing the departure burn, I can input SMA (I use 6671 km for a 300 km LEO to start off) and it then tells me my total delta-v required is 4.15353 km/s - that's a fair whack more than the original 2.4 from the original porkchop. Where does this discrepancy come from?

2) If I then use the multi-flyby maneuver sequencer, with a mind towards multiple flyby gravity assists, I set 2 waypoints - Earth and Venus. With an initial SMA of 6671 km, the total delta-v required shoots up to 6.446 km/s. Am I misunderstanding how to use this tool? I don't know whether I should expect to require 2.4 km/s, 4.2 km/s or 6.4 km/s for an Earth->Venus transit.

Thanks again

Link to comment
Share on other sites

6 hours ago, Ming Tea said:

Hi

Firstly, thanks for this amazing tool - it's really taught me a lot more that I was unable to without it!

I'm using kerbal with RO and RSS. I am currently trying to learn more about using a sequence of fly-bys to reduce overall delta-v requirement using gravity assists. An example of this is the Cassini probe mission. After tinkering around a bit, perhaps there's someone who could help me with two questions:

1) When using the KSPTOT tool to find a launch window from Earth to Venus it gives me a departure Delta-V of:  2.4031 km/s on Year 1, Day 157 15:34:44.902. I have unsuccessfully tried to find out what the starting assumptions are. When computing the departure burn, I can input SMA (I use 6671 km for a 300 km LEO to start off) and it then tells me my total delta-v required is 4.15353 km/s - that's a fair whack more than the original 2.4 from the original porkchop. Where does this discrepancy come from?

2) If I then use the multi-flyby maneuver sequencer, with a mind towards multiple flyby gravity assists, I set 2 waypoints - Earth and Venus. With an initial SMA of 6671 km, the total delta-v required shoots up to 6.446 km/s. Am I misunderstanding how to use this tool? I don't know whether I should expect to require 2.4 km/s, 4.2 km/s or 6.4 km/s for an Earth->Venus transit.

Thanks again

1) The porkchop plot is only giving you the sum of the departure and arrival hyperbolic excess velocities as the "delta-v".  It's a decent "order of magnitude" estimate and not much else.  The actual "Compute Departure" tool is computing a more realistic (and therefore accurate) departure burn starting from the orbit you provide to the correct hyperbolic excess velocity vector.  In short, the Compute Departure DV number is likely more correct.

2) The flyby code wasn't really designed to do what you're thinking and as such it works a slightly different way.  Primarily the optimizer is a completely different algorithm, as is the function to be minimized ("optimized").  The issue results in what you're seeing here: DV results which are different than what the other tool provides.

If you want to get the most accurate results possible from KSP TOT, instead of just using these approximation tools that you have been thus far, I would encourage you to look at Mission Architect (Tools menu -> Mission Planning).  It models the spheres of influence directly, as well as spacecraft orbit and mass.  It can also propagate finite duration (that is, not-instantaneous) engine burns, which drastically improves accuracy in cases where burn duration is not much less than orbital period.

Mission Architect can be a bear to learn at first, so let me know if you need help with it.  Glad you like TOT so far! :)

Link to comment
Share on other sites

On 3/30/2016 at 8:47 AM, Arrowstar said:

Hi everyone,

So I know development of KSPTOT has been pretty non-existent lately.  This is mostly due to some real life commitments I have, plus some new hobbies and other things just taking up time.  However, I did want to let people know that I will be updating the KSPTOTConnect code to KSP 1.1 with the idea being that I have an update out this weekend.

If there are any small bugs or problems that still exist in the latest pre-release (sorry for never getting that officially out :blush:), please let me know ASAP and I'll try to work fixes for them into this latest update.

Thanks!

EDIT: So turns out that the pre-release is only available on Steam and I have the KSP store copy.  Unless someone wants to send me the Unity/KSP API DLLs (not sure if that's cool or not, would need to ask a mod, I guess), my work may need to wait until the actual 1.1 release.

Would you like me to compile the code against 1.1 for you?

If so, please send me instructions as to what to do.

LGG

Link to comment
Share on other sites

Just now, linuxgurugamer said:

Would you like me to compile the code against 1.1 for you?

If so, please send me instructions as to what to do.

LGG

As much as I would like that, I know there are going to be changes that I will need to track down.  Unfortunately, I won't know the full extent of it until I get my hands on 1.1 and see for myself.  Because of that I really just need to wait and take a look myself.  Thank you for the offer though!

Keep in mind, everyone, that this is ONLY for the KSPTOTConnect plugin.  The actual KSP TOT MATLAB code that you run in Windows is perfectly usable still.  No need to wait for a 1.1 update for that as far as I know. :)

Link to comment
Share on other sites

On 4/5/2016 at 1:50 PM, Arrowstar said:

Can you be more specific as to which screens you are referring to?  Pictures and screenshots would help, please. 

General notice, btw, I don't have steam so the upgrade will have to wait until 1.1 is officially released. Sorry about that, all. 

Hi, sorry, I was a bit lazy.

My favorite tool is the Rendezvous Maneuver Sequencer, because no matter how lost I get, it always seems to find a way home.  Under Initial Orbit Info, I can import the active vessel data, including epoch. But in the Search Initial Epoch on the bottom, it's all zeros, and you have to add the starting epoch time yourself. It would be helpful if that field also matched the epoch from the import, as a place to start.

In the Multi Flyby Maneuver Sequencer, there is no way to import the first calculated maneuver.  There is no right click function.

Also, two points to consider:

Many people get confused about the whole synod period thing.  Trying to plot a jool shot in year 1 always gives a large value because the synod period default is 1.  Can that be handled in a more automated way?

I think there may be some issues with time of events being off a little.  Seems to come up a lot.  Do you think there is any issues with the timestamps?  I remember that Kerbin time was added later. Would that have any effect?

Thanks

 

Link to comment
Share on other sites

5 hours ago, funkcanna said:

Arrowstar, if you want me to gift you KSP on steam let me know.

That's super generous of you, but that would be a huge expense on your part.  Don't worry about it, I'll be able to take care of KSPTOTConnect soon enough when 1.1 comes out. :)

13 hours ago, Gilph said:

 

Hi, sorry, I was a bit lazy.

My favorite tool is the Rendezvous Maneuver Sequencer, because no matter how lost I get, it always seems to find a way home.  Under Initial Orbit Info, I can import the active vessel data, including epoch. But in the Search Initial Epoch on the bottom, it's all zeros, and you have to add the starting epoch time yourself. It would be helpful if that field also matched the epoch from the import, as a place to start.

In the Multi Flyby Maneuver Sequencer, there is no way to import the first calculated maneuver.  There is no right click function.

Also, two points to consider:

Many people get confused about the whole synod period thing.  Trying to plot a jool shot in year 1 always gives a large value because the synod period default is 1.  Can that be handled in a more automated way?

I think there may be some issues with time of events being off a little.  Seems to come up a lot.  Do you think there is any issues with the timestamps?  I remember that Kerbin time was added later. Would that have any effect?

Thanks

1) I can include that in the import utility for the RMS, thanks for the suggestion.

2) Thanks for letting me know about the maneuver import in MFMS.  I'll look into fixing that.

3) Regarding synodic periods and the porkchop plot: So yes, I agree this has always been a point of confusion, particularly for Jool and Eeloo.  Unfortunately the only real way to prevent it entirely is to make the user specify the start and end dates manually, which is something I really want to avoid because just adds more things the user needs to figure out.  Now, as far as automation goes, something I could do, for example, is detect when the problem is occurring, suggest a new syodic period setting to the user, and then automatically re-run the plot if they accept the new setting.  How would that sound?

Link to comment
Share on other sites

On 4/8/2016 at 9:57 AM, Arrowstar said:

That's super generous of you, but that would be a huge expense on your part.  Don't worry about it, I'll be able to take care of KSPTOTConnect soon enough when 1.1 comes out. :)

1) I can include that in the import utility for the RMS, thanks for the suggestion.

2) Thanks for letting me know about the maneuver import in MFMS.  I'll look into fixing that.

3) Regarding synodic periods and the porkchop plot: So yes, I agree this has always been a point of confusion, particularly for Jool and Eeloo.  Unfortunately the only real way to prevent it entirely is to make the user specify the start and end dates manually, which is something I really want to avoid because just adds more things the user needs to figure out.  Now, as far as automation goes, something I could do, for example, is detect when the problem is occurring, suggest a new syodic period setting to the user, and then automatically re-run the plot if they accept the new setting.  How would that sound?

#1&2: Thanks

#3: Sounds pretty good to me.  I would vote yes.

Link to comment
Share on other sites

On 4/7/2016 at 8:55 PM, Arrowstar said:

1) The porkchop plot is only giving you the sum of the departure and arrival hyperbolic excess velocities as the "delta-v".  It's a decent "order of magnitude" estimate and not much else.  The actual "Compute Departure" tool is computing a more realistic (and therefore accurate) departure burn starting from the orbit you provide to the correct hyperbolic excess velocity vector.  In short, the Compute Departure DV number is likely more correct.

2) The flyby code wasn't really designed to do what you're thinking and as such it works a slightly different way.  Primarily the optimizer is a completely different algorithm, as is the function to be minimized ("optimized").  The issue results in what you're seeing here: DV results which are different than what the other tool provides.

If you want to get the most accurate results possible from KSP TOT, instead of just using these approximation tools that you have been thus far, I would encourage you to look at Mission Architect (Tools menu -> Mission Planning).  It models the spheres of influence directly, as well as spacecraft orbit and mass.  It can also propagate finite duration (that is, not-instantaneous) engine burns, which drastically improves accuracy in cases where burn duration is not much less than orbital period.

Mission Architect can be a bear to learn at first, so let me know if you need help with it.  Glad you like TOT so far! :)

1) OK Super, so that would be the excess velocity from the starting assumption of an eccentricity 1 (parabolic) orbit I assume. Either way, it's much clearer now, thanks.

2) Fair enough, I don't have enough experience yet to know the best use cases for the flyby maneuver planner but I am open to tips :).

3) The mission architect is truly lovely. There's very little hand-holding, and so I'm still developing a feel for how to best guide the optimisations to get out of it what I want, but it's really fantastic - thanks again for the tool.

I do have one question that I haven't been able to solve yet, that is making a planetary transfer starting from an inclined (28deg) orbit. The porkchop plotter finds a good window and passes the departure and arrival times (UT) to the burn computer. Since I'm unable to get the porkchop plotter to start with an assumption of a certain SMA and inclination, when I do finally add these details to the burn computer it sometimes gives me really bad suggestions (like burning retrograde with -5k dV to get to Mars). I suppose this is because (I'm a physicist but no astrodynamicist so I'm only guessing here) that the selected window works given the position in the synodic period but not with the relative inclinations. Do you have any advice for this situation? Something I have found which works, is to ask mechjeb for its best injection burn, and use mission architect to optimise a path near to that time.

Edit: OK, I have managed to figure out that I should correctly choose my RAAN for my pre-injection orbit and I can then use the launch window planning tool to figure out how to get there. But how do I correctly calculate the optimal RAAN given a departure and arrival UT for the chosen transfer?

Seeeeriously cool tool :D

Edited by Ming Tea
Added RAAN comment
Link to comment
Share on other sites

I just installed this awesome tool set.  It rocks.

I think there's some problem with communicating with the 64bit version of KSP.  When I tried to create a new bodies.ini file while playing in ksp 64bit, it says nothing is connected.  If I load up the 32bit version, however, the bodies.ini file can be created (using outer planets mod).  Unfortunately, it also appears to tell me that the connection is working but when I try to upload a maneuver node, nothing happens.  

For what its worth, I opened up the Debug screen in-game and it's spamming:

[Exception]: TypeLoadException: Could not load type 'Vector3d' from assembly 'Assembly-CSharp, Version=1.0.0.0. Culture=neutral, PublicKeyToken=null'.

Side question: now that I have a bodies.ini file for the outer planets mod built from 32bit, will it matter if I build missions and run them in the 64bit version?  I would guess not...

 

Edited by DivisionByZero
Link to comment
Share on other sites

if you're saying you're having trouble connecting to KSP v1.1 with this tool then that's because it hasn't yet been updated to connect reliably to KSP v1.1

Arrowstar will get around to it when he has a chance now that v1.1 is released and available to him. He had some free time during the pre-release but didn't have a Steam copy. He'll get to it when he can

Link to comment
Share on other sites

I've managed to get the Windows build of KSP TOT running on my Mac using WINE.

1) Install WINE (I installed the latest staging build from https://dl.winehq.org/wine-builds/macosx/download.html)

2) Install cabextract and ensure it's in your PATH (I used homebrew; 'brew install cabextract')

3) Install winetricks: https://wiki.winehq.org/Winetricks

4) Install the native VC++ runtime with 'winetricks vcrun2012'

5) Install the (Windows!) MCR

6) ... and KSPTOT should now launch and run.

I haven't done a lot of testing yet, but the basics seem to work (porkchop plots, basic mission architect)

Link to comment
Share on other sites

Sweet, thanks!  I will copy these to the OP for others' enlightenment. :)

Btw, everyone, I'm hoping to get the 1.1.2 version of the KSPTOTConnect code out this weekend.  Life has been busy (I just started a new job at Orbital ATK doing Cygnus operations stuff), but I have not forgotten, promise. :)

Link to comment
Share on other sites

2 hours ago, Arrowstar said:

Sweet, thanks!  I will copy these to the OP for others' enlightenment. :)

Btw, everyone, I'm hoping to get the 1.1.2 version of the KSPTOTConnect code out this weekend.  Life has been busy (I just started a new job at Orbital ATK doing Cygnus operations stuff), but I have not forgotten, promise. :)

KSPTOT is made by an actual rocket scientist?! Awesome!

Link to comment
Share on other sites

13 hours ago, Arrowstar said:

Sweet, thanks!  I will copy these to the OP for others' enlightenment. :)

Btw, everyone, I'm hoping to get the 1.1.2 version of the KSPTOTConnect code out this weekend.  Life has been busy (I just started a new job at Orbital ATK doing Cygnus operations stuff), but I have not forgotten, promise. :)

Those instructions need a bit of tweaking to be non-Mac specific - the download URL is for the Mac builds, and installing cabextract should be done with your Linux distro's package manager (apt, yum, etc.).

But otherwise it should work just fine. I haven't had any issues with it on OS X (apart from being unable to get the parallel processing to launch).

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