Jump to content

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


Recommended Posts

More suggestions: some kind of reminder that the date format used in KSP is one year and one day ahead of KSPTOT's. That's kind of a killer if you forget. You could display times in the in-game format next to the standard format. Also, is there a way to plot through multiple synodic periods? Maybe I missed something, but it looks like it only calculates through one synodic period. It would be nice if you could calculate a few in a row and see which one is more optimal instead of fiddling with launch dates and recalculating.

Now I'm going to see if I can actually get a decent moho intercept with the help of KSPTOT.

Edit: new suggestion - a button to load persistence file. It's a very hidden option when you have to right-click in a random box to even see the option. I had to go back to your tutorial on page 2 to remember how to do that.

Edit2: So there are some issues with the Moho transfer it calculated for me on a fresh persistence file. I didn't notice until I checked the actual transfer orbit trajectory which showed me completely missing Moho. Oops... Please tell me if I'm doing something wrong.

http://imgur.com/aoIatnY

http://imgur.com/pgx76oy

Edited by pina_coladas
Link to comment
Share on other sites

Glad to see the update, plus the planned features list. Keep up the good work!

One feature suggestion I just thought of: In addition to the Departure Information for a given interplanetary transfer burn, it would be nice to also see an estimate for the hyperbolic arrival trajectory at the destination, as well as delta-v for the circularization burn at periapsis.

Also, I've been wondering: How does the scoring system for the Flyby Maneuver Sequencer work? What criteria does the program use to evaluate the projections?

Link to comment
Share on other sites

More suggestions: some kind of reminder that the date format used in KSP is one year and one day ahead of KSPTOT's. That's kind of a killer if you forget. You could display times in the in-game format next to the standard format. Also, is there a way to plot through multiple synodic periods? Maybe I missed something, but it looks like it only calculates through one synodic period. It would be nice if you could calculate a few in a row and see which one is more optimal instead of fiddling with launch dates and recalculating. Edit: new suggestion - a button to load persistence file. It's a very hidden option when you have to right-click in a random box to even see the option. I had to go back to your tutorial on page 2 to remember how to do that. Edit2: So there are some issues with the Moho transfer it calculated for me on a fresh persistence file. I didn't notice until I checked the actual transfer orbit trajectory which showed me completely missing Moho. Oops... Please tell me if I'm doing something wrong. http://imgur.com/aoIatnY http://imgur.com/pgx76oy
1) Yeah, I could do something like that. It'd just be in the Enter UT as Date/Time dialog box, but I can I see how it'd be useful. 2) An option for this exists in the options menu. Edit -> Options. :) You can also right-click on the porkchop plot and click Recenter At or something like that to move the plot. :) 3) I'd rather not use buttons. My goal with context menus was to remove stuff like that from the main GUI where things can get cluttered. Right now I don't have any documentation, but eventually context menus will be documented. Maybe I'll add some tooltips though. :) 4) You're doing something wrong. :P The dot with Moho's position is where Moho is at your departure, not your arrival at Moho. :)
Glad to see the update, plus the planned features list. Keep up the good work! One feature suggestion I just thought of: In addition to the Departure Information for a given interplanetary transfer burn, it would be nice to also see an estimate for the hyperbolic arrival trajectory at the destination, as well as delta-v for the circularization burn at periapsis. Also, I've been wondering: How does the scoring system for the Flyby Maneuver Sequencer work? What criteria does the program use to evaluate the projections?
1) Actually, it's pretty hard or impossible to know the arrival hyperbolic trajectory. On the flyby trajectory in the FMS, I have a lot more information to work with and that gives me the flyby trajectory (input and output hyperbolic excess velocity vectors). That information doesn't exist for just arrival, though, so I'd have to make a lot of assumptions about how your inbound trajectory looked at arrival. It's just not worth it because it's going to be wrong anyway. 2) The scoring for the FMS is the sum of the departure, arrival, and flyby delta-vs. It attempts to minimize that quantity. (Mind you, the departure/arrival delta-vs are just "sun-centered" velocity changes because I don't actually know the departure and arrival orbits at that point.) :)
Link to comment
Share on other sites

Thanks for the detailed reply! I had a feeling I was missing a few things.

But I still think something is wrong with the Moho transfer I showed. When I tried to perform it, my closest approach was on the opposite side of the sun as Moho. And I should have been more clear about the image: I know the red dot show's Moho's current position at the time of departure, I just think it looks like it's in totally the wrong position. For the record, I had even less success using alexmun's tool to get to Moho. Has anyone been able to plot a good Moho transfer?

Link to comment
Share on other sites

1) Actually, it's pretty hard or impossible to know the arrival hyperbolic trajectory. On the flyby trajectory in the FMS, I have a lot more information to work with and that gives me the flyby trajectory (input and output hyperbolic excess velocity vectors). That information doesn't exist for just arrival, though, so I'd have to make a lot of assumptions about how your inbound trajectory looked at arrival. It's just not worth it because it's going to be wrong anyway.

Fair enough. Figured I'd ask to see if it's possible, but if it isn't... Well, I suppose comparing the flight's velocity at periapsis / apoapsis with the planet's escape velocity makes for a decent enough "worst-case" estimate, and that's simple enough to do by hand.

2) The scoring for the FMS is the sum of the departure, arrival, and flyby delta-vs. It attempts to minimize that quantity. (Mind you, the departure/arrival delta-vs are just "sun-centered" velocity changes because I don't actually know the departure and arrival orbits at that point.) :)

Nice to know. Thanks for the info!

(And yes, the recent forum update seems to have broken a few things regarding formatting.)

Edited by Specialist290
Link to comment
Share on other sites

Thanks for the detailed reply! I had a feeling I was missing a few things. But I still think something is wrong with the Moho transfer I showed. When I tried to perform it, my closest approach was on the opposite side of the sun as Moho. And I should have been more clear about the image: I know the red dot show's Moho's current position at the time of departure, I just think it looks like it's in totally the wrong position. For the record, I had even less success using alexmun's tool to get to Moho. Has anyone been able to plot a good Moho transfer?
You may have to adjust the departure time by a few seconds and/or play with the prograde delta-v by a few meters per second. Moho moves quite fast and has a small SoI, making it difficult to reach. Nevertheless, I've done it with KSP TOT a few times, so I know it's possible. :)
Fair enough. Figured I'd ask to see if it's possible, but if it isn't... Well, I suppose comparing the flight's velocity at periapsis / apoapsis with the planet's escape velocity makes for a decent enough "worst-case" estimate, and that's simple enough to do by hand. Nice to know. Thanks for the info! (And yes, the recent forum update seems to have broken a few things regarding formatting.)
The problem is that there is no inbound orbital plane defined. With a flyby, I know which direction I'm coming in at and which I'm leaving at, and the cross product of those two gives me an orbital plane I can use. Here, where I only have an inbound velocity vector, there are a number of solutions and just no way to define which plane you're on. This is why I don't have any arrival information in KSP TOT: it's quite hard with the standard two body model. :)
Nice job Arrowstar!
Thanks! :D
Link to comment
Share on other sites

I wonder if there is a way to make a tool/plugin that uploads the calculated maneuver nodes into the game from some sort of "mission plan" file, it would make this tool that much simpler to use. At the moment I find myself struggling to understand the program's outputs enough to input proper maneuver nodes. Maybe a condensed listing of each node would help as well? Also, I've found that no matter the setting on the main porkchop graph, the burn calculator will recalculate your flight to minimise both departure and arrival ÃŽâ€V. This gets particularly aggravating when trying to plan a mission that makes full use of aerocapture and braking. On a third note, I have not figured out how to include more than one flyby maneuver in the mission plan. Maybe the burn calculator should be modified into a mission profiler where you input origin and destination, final orbit, and any intermediate milestones. In return it'd give you a timeline of events, from departure to final orbit and including any flybys, where clicking each event opens a new window with details about the maneuver.

Link to comment
Share on other sites

I wonder if there is a way to make a tool/plugin that uploads the calculated maneuver nodes into the game from some sort of "mission plan" file, it would make this tool that much simpler to use. At the moment I find myself struggling to understand the program's outputs enough to input proper maneuver nodes. Maybe a condensed listing of each node would help as well? Also, I've found that no matter the setting on the main porkchop graph, the burn calculator will recalculate your flight to minimise both departure and arrival ÃŽâ€V. This gets particularly aggravating when trying to plan a mission that makes full use of aerocapture and braking. On a third note, I have not figured out how to include more than one flyby maneuver in the mission plan. Maybe the burn calculator should be modified into a mission profiler where you input origin and destination, final orbit, and any intermediate milestones. In return it'd give you a timeline of events, from departure to final orbit and including any flybys, where clicking each event opens a new window with details about the maneuver.
In the OP I have a link to a tutorial post that explains how to use the output. Take a look here: http://forum.kerbalspaceprogram.com/showthread.php/36476-WIN-KSP-Trajectory-Optimization-Tool-v0-8-Now-with-Flyby-Maneuver-Sequencing!?p=517457&viewfull=1#post517457 I'll take a look into your bug and see what I can't find. Thanks for reporting it. :) At this time it's not possible to plan more than one flyby at a time. I've addressed this earlier, but basically it comes down to the complexity of the problem. It's really hard for an optimizer to come up with a good solution to a problem like what you're suggesting. I did some testing with just two flyby bodies a while back and the results weren't very useable. Long story short, I probably won't do something like what you're suggesting because it's pretty hard to do.
Link to comment
Share on other sites

1.

Also, I've found that no matter the setting on the main porkchop graph, the burn calculator will recalculate your flight to minimise both departure and arrival ÃŽâ€V.

This isn't a bug though I feel it is a negative feature. You have to go into Options from the main window to change the optimization type.

I thought about this, but decided against it. I don't want to force people to remember to set the plot type before they go into that window. My thought was this: even if you're only interested in optimizing the departure dv, you may still be interested the arrival dv as well, because it influences your aerocapture or whatnot. Hence, I made a separate option so people could have flexibility.

I feel that having them separate adds confusion and people are still forced to set the optimization type before they go to that window since it can't be changed in that window and they would have to go back to the main window and even then have to go into options to change it.

2.

I'll be completely honest, I still don't see the problem. So far as I can tell, the program is behaving normally. Please, in very clear words, describe what you see the problem as.

I'm getting the same problem as mcirish3. The problem is that while the porkchop plot obeys departure time constraints the optimized results in the text box at the bottom do not. In my case a transfer from the Mun to Minmus with earliest departure/arrival at 3196800s gives a plot with an optimum departure at that same time (3196800s). The text box however says I should depart at 3117014.6652 sec UT which is earlier than the earliest allowable departure.

3. I initially tried my Mun -> Minmus transfer with earliest departure set to 3196800s and earliest arrival set to 0s. This caused the error "Matrix dimensions must agree." to pop up. That error message wasn't really helpful in telling me what I was doing wrong. Also I feel that the program should be able to understand when earliest arrival is before earliest departure and be able to deal with it without throwing an error.

Lest it looks like I am only full of criticism I just want to say this is the best program ever! ;']

PS. Looking forward to being able to calculate flybys originating in orbit around the transfer central body. eg. LKO parking orbit -> Mun flyby -> Minmus.

Link to comment
Share on other sites

  • 4 weeks later...

Well, it didn't work with Wine...

Yes, testing on Linux and Mac would be appreciated as I have no access to those platforms. However, my plan is still to only formally support Windows for major issues because I have no means of verifying the code on any other platform, and debugging on an OS you don't have is a pain. :)

How do we test in linux? I don't see any linux binary, I see there's the source but I don't expect the compiler to be freely available.
Link to comment
Share on other sites

How do we test in linux? I don't see any linux binary, I see there's the source but I don't expect the compiler to be freely available.

You'd need Matlab on Linux, which it sounds like Arrowstar doesn't have access to. I could help out there and try to build a standalone Linux binary, but I believe the no derivative works condition of the license forbids me from doing so.

Link to comment
Share on other sites

Found another issue. Using the Optimal Two Burn Orbit Change module I imported some orbit data from my save and then tried to compute. Gave me an error that "Initial orbit RAAN must be within the range [0,360]. (Entered: -53.3952)"

I'm guessing KSP uses a range of [-180,180] in it's save.

Edward

Link to comment
Share on other sites

Hey guys, thanks for all your comments. I have been keeping up with them, though life has been busy lately. I'm also in bit of a KSP lull and I haven't had the creativity to do any active development work on KSP TOT. I haven't given up on it and it's not going away, I just needed to take a break for a while. I suspect I'll jump back in after I've had a chance to have fun with 0.22 and get back into KSP. Hang tight until then. :)

Link to comment
Share on other sites

I have several suggestions for this:

1. Telemachus and Mechjeb integration (if it even possible). So the KSPTOT will grab the current orbital parameters from mechjeb and it will directly input its burn parameters to mechjeb. Add autoburn button if its not too cheaty

2. Periapsis kick function, so you input the engine thrust and number of kicks/kick duration, and it will calculate when you need to execute the first kick and to execute the final interplanetary injection burn

Your tool looks like the IMFD that I've never wrap my head into, but because of the tutorial now I understand how to use that

Link to comment
Share on other sites

I'm having a problem uploading this and trying it out. I followed the instructions in OP but every time I open the app, it tells that it couldn't find it. But the thing is app is there but exactly at the same the error came out, the app disappeared and another file took its place. This photo shows it all: dZw7hwd.png Can anybody help me?

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