Jump to content

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


Recommended Posts

16 hours ago, Drew Kerman said:

Which makes me wonder what he's thinking of tackling next :P Arrowstar have you done any roadmapping for new features or enhanced implementation of existing ones? Or just going wherever your interest takes you when you have the time to work on things?

At the moment I don't actually have anything coming down the pipe, to be honest.  At this point, I usually look to user requests for ideas, since what you guys need and what I envision don't always line up perfectly. :)

Link to comment
Share on other sites

So, I'm getting a bug trying to load KSPTOT v1.5.7 (Windows 10, Core i5-6600K that I should really get around to overclocking someday).

On program start, it pops up an error message, saying this:

Reference to non-existent field ".
Error in => projectMain.m at line 49

The problem disappears if I delete appOptions.ini, which has these contents:

[ksptot]
bodiesinifile = C:\path\to\KSPTOT\Gal32.ini
rtsHostName = localhost
timeSystem = Earth

Of course, this means I have to delete appOptions.ini each time I load KSPTOT.

Otherwise, though: it's a wonderful tool that I'll have to learn how to use a bit better. I think I mostly have the hang of the multi-flyby sequencer*, and have found a Gael-Niven-Icarus path that saves a couple hundred m/sec off a direct Gael-Icarus transfer.

Granted, that's not much relative to the overall >17 km/sec cost of getting there and circularizing at 3.2x scale, but it's entirely plausible to me that's mostly on account of astrodynamics being utterly unforgiving, particularly when going inwards instead of outwards.

*One thing I'm trying to get the hang of is setting appropriate min/max time bounds. Empirically, I think the time bounds are in 6-hour days (despite setting it to use Earth time), and one could use Hohmann transfer times as a loose guide for how much time to set, but I can still get some wonky results.

EDIT: Also, is there a way to plug in a programmed set of "try these flybys and see if anything works"? I know fully unconstrained flyby optimization is basically "do you have a supercomputer?" territory, but I might want to, say, have KSPTOT grind through a dozen or so ideas overnight or while I'm at work, stuff like "try Gael-Tellumo-Gauss, Gael-Gael-Gauss, Gael-Niven-Gauss, Gael-Otho-Gauss, Gael-Tellumo-Otho-Gauss, Gael-Tellumo-Gael-Gauss, Gael-Gael-Tellumo-Gauss".

Edited by Starman4308
Link to comment
Share on other sites

5 hours ago, Starman4308 said:

On program start, it pops up an error message, saying this:


Reference to non-existent field ".
Error in => projectMain.m at line 49

The problem disappears if I delete appOptions.ini, which has these contents:


[ksptot]
bodiesinifile = C:\path\to\KSPTOT\Gal32.ini
rtsHostName = localhost
timeSystem = Earth

Of course, this means I have to delete appOptions.ini each time I load KSPTOT.

Seems similar to an issue I reported a while ago when trying to start the program from the Start menu. Did you manually create a shortcut link to it in your Start menu, and do you happen to be using Start10 from Stardock instead of the stock Win10 Start menu?

Edited by Drew Kerman
Link to comment
Share on other sites

4 hours ago, Drew Kerman said:

Seems similar to an issue I reported a while ago when trying to start the program from the Start menu. Did you manually create a shortcut link to it in your Start menu, and do you happen to be using Start10 from Stardock instead of the stock Win10 Start menu?

Nope; I just double-click on the executable from a file explorer window.

As a side note: I was wondering why A, KSPTOT used such a large default SMA of 800 km, and B, why all my Gael ejection burns required so much delta-V.

Palms have recently been applied to faces as I have realized I have started every single Gael departure plan from over a thousand kilometers beneath its surface*. I swear, one day, I shall actually get the hang of this tool.

*On reflection, I suppose I should have realized that, while you can sort-of describe apses relative to the surface, SMA makes no sense whatsoever unless defined from the center of the body in question. I swear I'm usually smarter than this.

This new run is vastly more reasonable; I got a Gael-Tellumo-Otho-Gauss-Grannus grand tour for just 3.301 km/sec of delta-V, using just 5 optimizer runs.

Link to comment
Share on other sites

33 minutes ago, Starman4308 said:

Nope; I just double-click on the executable from a file explorer window.

there is a log file in the directory where the EXE is. Post it up somewhere for Arrowstar to look at

33 minutes ago, Starman4308 said:

why A, KSPTOT used such a large default SMA of 800 km

Looks like you figured it out :P It does all become easier with practice...

Link to comment
Share on other sites

Alrighty, two logs. This one comes from a run that works perfectly well, and probably has superfluous information because I was actively using KSPTOT.

https://www.dropbox.com/s/4dhkfkxbypwskxa/ksptot-preFailure.log?dl=0

This one comes from when it fails to start:

https://www.dropbox.com/s/mnjtfek126i4cie/ksptot-fails.log?dl=0

I shall continue to, on my own, debug such PEBKAC bugs as starting transfers from subterranean orbits...

Link to comment
Share on other sites

10 hours ago, Starman4308 said:

So, I'm getting a bug trying to load KSPTOT v1.5.7 (Windows 10, Core i5-6600K that I should really get around to overclocking someday).

On program start, it pops up an error message, saying this:


Reference to non-existent field ".
Error in => projectMain.m at line 49

The problem disappears if I delete appOptions.ini, which has these contents:


[ksptot]
bodiesinifile = C:\path\to\KSPTOT\Gal32.ini
rtsHostName = localhost
timeSystem = Earth

Of course, this means I have to delete appOptions.ini each time I load KSPTOT.

Otherwise, though: it's a wonderful tool that I'll have to learn how to use a bit better. I think I mostly have the hang of the multi-flyby sequencer*, and have found a Gael-Niven-Icarus path that saves a couple hundred m/sec off a direct Gael-Icarus transfer.

Granted, that's not much relative to the overall >17 km/sec cost of getting there and circularizing at 3.2x scale, but it's entirely plausible to me that's mostly on account of astrodynamics being utterly unforgiving, particularly when going inwards instead of outwards.

*One thing I'm trying to get the hang of is setting appropriate min/max time bounds. Empirically, I think the time bounds are in 6-hour days (despite setting it to use Earth time), and one could use Hohmann transfer times as a loose guide for how much time to set, but I can still get some wonky results.

EDIT: Also, is there a way to plug in a programmed set of "try these flybys and see if anything works"? I know fully unconstrained flyby optimization is basically "do you have a supercomputer?" territory, but I might want to, say, have KSPTOT grind through a dozen or so ideas overnight or while I'm at work, stuff like "try Gael-Tellumo-Gauss, Gael-Gael-Gauss, Gael-Niven-Gauss, Gael-Otho-Gauss, Gael-Tellumo-Otho-Gauss, Gael-Tellumo-Gael-Gauss, Gael-Gael-Tellumo-Gauss".

1) Try out the new prerelease, v1.5.8 pre-release 5, and tell me if that resolves your issue.  It should be in the last page or two of posts in this thread.  I think I remember finding this bug...

2) Bounds should obey the time system selected, I have been sure to check that on a few occasions.  Nevertheless, if you can provide some steps that can help me reproduce what you're seeing that would make you think that, I would be happy to look into it for you.

3) There is not, unfortunately.  I suppose you could start multiple instances of the program, or perhaps write some sort of Windows script to do it externally, but as it is now, no, that option sadly doesn't exist.  I'm sorry!

35 minutes ago, Starman4308 said:

Nope; I just double-click on the executable from a file explorer window.

As a side note: I was wondering why A, KSPTOT used such a large default SMA of 800 km, and B, why all my Gael ejection burns required so much delta-V.

Palms have recently been applied to faces as I have realized I have started every single Gael departure plan from over a thousand kilometers beneath its surface*. I swear, one day, I shall actually get the hang of this tool.

*On reflection, I suppose I should have realized that, while you can sort-of describe apses relative to the surface, SMA makes no sense whatsoever unless defined from the center of the body in question. I swear I'm usually smarter than this.

This new run is vastly more reasonable; I got a Gael-Tellumo-Otho-Gauss-Grannus grand tour for just 3.301 km/sec of delta-V, using just 5 optimizer runs.

1) Please do provide me with the log file that was just mentioned. :)

2) By definition, SMA is always defined from the center of the body, not the surface.  Orbital mechanics is rarely concerned about the altitude of anything or the radius of a body.  Go ahead and look SMA up on Wikipedia or Google if you would like some more information.  Thanks! :) 

Link to comment
Share on other sites

21 minutes ago, Arrowstar said:

1) Try out the new prerelease, v1.5.8 pre-release 5, and tell me if that resolves your issue.  It should be in the last page or two of posts in this thread.  I think I remember finding this bug...

2) Bounds should obey the time system selected, I have been sure to check that on a few occasions.  Nevertheless, if you can provide some steps that can help me reproduce what you're seeing that would make you think that, I would be happy to look into it for you.

3) There is not, unfortunately.  I suppose you could start multiple instances of the program, or perhaps write some sort of Windows script to do it externally, but as it is now, no, that option sadly doesn't exist.  I'm sorry!

1) It appears resolved in the 1.5.8 pre-release. Quick question: is all the other stuff in the 1.5.7 release .zip (example missions, etc) still good, or did that get moved into the 1.5.8 .exe file?

2) Will investigate further; there is a very non-zero chance of this being a PEBKAC from a novice user.

3) I demand a refund.

21 minutes ago, Arrowstar said:

1) Please do provide me with the log file that was just mentioned. :)

2) By definition, SMA is always defined from the center of the body, not the surface.  Orbital mechanics is rarely concerned about the altitude of anything or the radius of a body.  Go ahead and look SMA up on Wikipedia or Google if you would like some more information.  Thanks! :) 

1) Provided above

2) I'm aware of what SMA is. It was a truly impressive chain of illogic that lead me to plotting subterranean ejections from Gael.

First: in circular orbits, SMA == apoapsis and periapsis.

Second, 800 km (at 3.2x scale) would be subterranean, so clearly you're referring to the in-game convention of apoapsis/periapsis above the surface

Third, 800 km above the surface is ridiculously over-conservative

Fourth, enter in a more reasonable 150 km and profit

Logic!

EDIT: Also, to make sure it's completely clear, I'm being sarcastic about the refund thing. Thanks bunches for creating and maintaining this tool; I look forwards to doing some real mission planning instead of "stuff it full of propellant and go".

Edited by Starman4308
Link to comment
Share on other sites

  • 2 weeks later...

heya @Arrowstar. Grats on the latest Cygnus mission. Have another wonky orbital data input for you to look at - Game files

When I import this orbit from the game to the Initial State and Save & Close the window, if I open it right back up again the TA has changed and the Arg. Peri. has become 0

Still running KSP v1.2.2

Edited by Drew Kerman
Link to comment
Share on other sites

On 6/28/2017 at 10:20 PM, Drew Kerman said:

heya @Arrowstar. Grats on the latest Cygnus mission. Have another wonky orbital data input for you to look at - Game files

When I import this orbit from the game to the Initial State and Save & Close the window, if I open it right back up again the TA has changed and the Arg. Peri. has become 0

Still running KSP v1.2.2

It's not surprising.  Your orbit is circular and the eccentricity is basically zero.  Argument of perigee is not defined for circular orbits so it gets set to zero in the Kepler -> Cartesian and Cartesian -> Kepler element conversion routines.  The true anomaly is adjusted to compensate for this, which is why it changes.

You can test that the new elements provide the same position and velocity vectors yourself quite easily in MA. :)

Link to comment
Share on other sites

oh and since you're looking for features/improvements still high on my wish list is the ability to show/hide bodies in a MAT file. It can be used mainly for cleaning up the graph window (for example when I'm only dealing with the inner planets from Moho-Dres) but also perhaps as a means of globally removing them from calculations. It's a bit clunky right now that if I want to only load certain bodies into my mission files I need to exit MA, reload a new set of bodies, then re-open MA - not to mention that if I open a MAT file with a different set of bodies that change is applied to all future MAT files I create...

Link to comment
Share on other sites

  • 2 weeks later...

has anyone had success running this on linux recently?

I'm getting an error, the log file can be found here: https://www.dropbox.com/s/bouqf0kzgxtck96/matlab_crash_dump.37-1?dl=0

I have to admit I didn't quite understand what is meant by "ensuring that cabextract is in my PATH", which is part of the linux directions in the OP.

If anyone has some light to shed on the problem, I would be very thankful

Link to comment
Share on other sites

19 hours ago, leudaimon said:

has anyone had success running this on linux recently?

I'm getting an error, the log file can be found here: https://www.dropbox.com/s/bouqf0kzgxtck96/matlab_crash_dump.37-1?dl=0

I have to admit I didn't quite understand what is meant by "ensuring that cabextract is in my PATH", which is part of the linux directions in the OP.

If anyone has some light to shed on the problem, I would be very thankful

 

20 minutes ago, Arrowstar said:

I'm not totally sure what the PATH is either.  I didn't write the Linux instructions, and I hope someone else can help here :)

PATH in this case is an environment variable which directs Linux where to look for a binary. In BASH, you can type 'env' into the command line and it it will report all of the environment variables you have set, one of which will be PATH. The value of the PATH will be to a bunch of directories...for example this is my PATH:

PATH=/usr/lib64/qt-3.3/bin:/home/kevinmueller/perl5/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/local/apps/Rocketeer/bin:/home/kevinmueller/.local/bin:/home/kevinmueller

What the OP directions are telling you to do is verify that the cabextract binaries are in one of these directories - if you use yum or apt-get to install cabextract, then it should reside in a location defined in your PATH. If you do it manually and place it in some other directory (for instance /path/to/your/cabextract/bin, then you either want to put it in one of these directories or add it to you PATH variable. Again, in BASH, the syntax would be:

export PATH=${PATH}:/path/to/your/cabextract/bin

And it would probably be a good idea to add that line to your ~/.bashrc file so that directory is always included in your PATH.

If you are using CSHELL, then the syntax will be different but the ideas are exactly the same.

However, with all of this being said, if you use yum or apt-get to install cabextract, then you shouldn't have to worry about it at all. It is always a good idea to check, however.

I hope this helps and let me know if you have any other questions.

Cheers!

Link to comment
Share on other sites

17 hours ago, gruneisen said:

However, with all of this being said, if you use yum or apt-get to install cabextract, then you shouldn't have to worry about it at all. It is always a good idea to check, however.

Thank you very much for the detailed response. That's the case, I installed using apt-get, but I'll check that once I'm at my computer. Do you have any idea what else could be causing this issue? Maybe the Wine version?

Link to comment
Share on other sites

1 hour ago, leudaimon said:

Thank you very much for the detailed response. That's the case, I installed using apt-get, but I'll check that once I'm at my computer. Do you have any idea what else could be causing this issue? Maybe the Wine version?

Unfortunately I don't think I can be of any help - I tried to use WINE to run KSPTOT some time ago and got a whole lot of nowhere - you can search through this thread for my name and see some of the hilarity I encountered.. Continued playing around with it actually ended up killing my Ubuntu build and pushed me back to using Windows for KSP, which, unfortunately, is what I'd recommend you do if you can - especially now that we have stable 64-bit on Windows. Sorry!

Link to comment
Share on other sites

Yeah, that's what I feared. I don't have windows in my machine, so I guess I'll not be able to use KSPTOT, unfortunately. I may have messed up wine in my computer too trying to get it to work... I'll keep an eye at this thread in case a solution shows up though, what I saw from TOT was really nice, especially in RSS/RO/RP-0, where mission planning is very important.

Thank you @Arrowstar and @gruneisen for the responses!

Link to comment
Share on other sites

  • 2 weeks later...

I'm having issues connecting my RSS system to TOT. I'm using the latest release found in the install instructions on the OP. I have the gamedata portion copied and pasted into my install's gamedata, but whenever I click File -> Create New Bodies from KSP, even while the game is running in a flight scene as it instructed, I get the error saying that it couldn't pull from it. Is anyone else having similar issues and/or ways to solve it?

Link to comment
Share on other sites

11 minutes ago, Cdw2468 said:

I'm having issues connecting my RSS system to TOT. I'm using the latest release found in the install instructions on the OP. I have the gamedata portion copied and pasted into my install's gamedata, but whenever I click File -> Create New Bodies from KSP, even while the game is running in a flight scene as it instructed, I get the error saying that it couldn't pull from it. Is anyone else having similar issues and/or ways to solve it?

I've had this problem several times myself. I don't know what makes it finally work, but usually I just try it several times and eventually it will take. Additionally, I've gotten it to work after uploading a maneuver node or reading a spacecraft state in MA prior to scanning for bodies.

I hope this helps - let us know if it does!

Cheers!

Link to comment
Share on other sites

12 minutes ago, gruneisen said:

I've had this problem several times myself. I don't know what makes it finally work, but usually I just try it several times and eventually it will take. Additionally, I've gotten it to work after uploading a maneuver node or reading a spacecraft state in MA prior to scanning for bodies.

I hope this helps - let us know if it does!

Cheers!

Nothing, both features that you mentioned (which I didn't even notice before and are pretty cool btw) worked just fine, but it just won't load the system. It read my thrusters and my propellants properly. It seems like it read everything but my system

Link to comment
Share on other sites

1 hour ago, Cdw2468 said:

Nothing, both features that you mentioned (which I didn't even notice before and are pretty cool btw) worked just fine, but it just won't load the system. It read my thrusters and my propellants properly. It seems like it read everything but my system

Hmmm - that's too bad. Like I said, I always able to get it to work eventually...though perhaps when @Arrowstar checks back in he can take a look at your issue.

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