Arrowstar Posted September 8, 2014 Author Share Posted September 8, 2014 I'm happy to announce the release of KSP TOT v1.1.6! This release includes a few enhancements and bug fixes:Thanks to bk2w, I now have a vectorized version of the porkchop plot code implemented. Based on his trials, it runs something like 280x faster than before. Needless to say, this is a great improvement! Thank you to bk2w!Implemented an "orbit clipboard" across the whole KSP TOT application, including Mission Architect, Multi-Flyby Manuever Sequencer, etc. Right click on any orbit entry panel to get a menu for copy/pasting an orbit to the KSP TOT orbit clipboard. You can also right click on any orbit state log panel in Mission Architect to copy the orbit from what you're seeing. This works on the main GUI and in the State Log window, too! Added Mean Anomaly to the Mission Architect state log tooltips.Fixed a bug with using the Mission Architect State Log with only one event in the mission script.In the Mission Architect Insert Coast dialog box, when inserting a Go To UT coast, you can now right click the UT value, min UT value, and max UT value boxes to enter a UT as a Date/Time string, as you can everywhere else in the GUI.One or two other minor things I found along the way.Also, I've been working with bk2w to get a Mac version ready (well, more specifically, he put it together and offered it to me, and I'm going to take him up on it). So whenever he's done with that, I'll post a note here and a link on the first post of this thread.Let me know if you have any questions. Thanks! Quote Link to comment Share on other sites More sharing options...
AppleDavidJeans Posted September 8, 2014 Share Posted September 8, 2014 Quote Also, I've been working with bk2w to get a Mac version ready (well, more specifically, he put it together and offered it to me, and I'm going to take him up on it). So whenever he's done with that, I'll post a note here and a link on the first post of this thread.Yeeeeeeeey! All Mac fans celebrate! Quote Link to comment Share on other sites More sharing options...
Drew Kerman Posted September 8, 2014 Share Posted September 8, 2014 Arrowstar said: It's an interesting idea. I've implemented what I think is the basic version, which is that in the "Enter Coast" MA dialog box, the UT value, min UT value, and max UT value now have the "Enter UT As Date/Time" context menu and dialog box. Let me know if this was what you were thinking or if you were looking for something more.Yup that was exactly it, just the same thing you can do in other places when it asks you for UT in seconds. Quote So again, I'm confused. The RAAN of an orbit never changes in KSP, so you can't be varying time to get the "proper RAAN." I think this is just an issue of terminology, though (RAAN being the incorrect term for what you're trying to express). Do you mean true anomaly? Or some other kind of right ascension? Maybe a picture would help me? So the full story behind this request begins with this post, where I had the problem of not being able to match up my orbits with the Rendezvous Maneuver Sequencer. So, after some experimenting I finally figured out that the reason the orbits weren't matching up was due to the RAAN not being the same. If you look at the first post, the Final State for my mission has my RAAN at 0. So, after the Circularize event I added a Delta Time coast event and played around with the time until I got my RAAN to match that of my target:Then, when I input this Final State data into the RMS, I got the proper result shown in my second post link.Therefore I asked for an RAAN coast event to make it easier to get the point where I need to incline an orbit for proper intercept.So did I do something right the wrong way or what? Quote Link to comment Share on other sites More sharing options...
Arrowstar Posted September 8, 2014 Author Share Posted September 8, 2014 Oh, I see! Okay, what you actually want to use is the mission optimizer. The Coast events are only capable of working with what we might call "primitives," or quantities that extend directly from the state at the end of the previous event. So for example, we can go to UTs, or delta times, or ascending or descending nodes (because we know the orbit at the start of the coast). But what you have here is trying to figure out what coast will give you a RAAN after a burn. The Coast has no knowledge that there's a burn in front of it, and so could not do a "Go to RAAN" function as you've described. As I said, use the mission optimizer. It's perfect for these things. Out of curiosity, what other places require the Enter UT As Date/Time context menu item? I thought I got them all to be honest. Quote Link to comment Share on other sites More sharing options...
Arrowstar Posted September 8, 2014 Author Share Posted September 8, 2014 (edited) Alright everyone, Mac version is up. Get it here! This is highly experimental at this point, so please report any issues here. Bk2w is supporting technical issues with the Mac version, so pester him if something doesn't pan out. Btw, he didn't package KSPTOTConnect with the Mac version, so I need to ask about that yet...EDIT: Apparently the Windows version works fine on Mac, so I'm packaging that right now. Give it 5-10 minutes to upload... Edited September 8, 2014 by Arrowstar Quote Link to comment Share on other sites More sharing options...
bk2w Posted September 8, 2014 Share Posted September 8, 2014 Arrowstar said: Bk2w is supporting technical issues with the Mac version, so pester him if something doesn't pan out. I will point out that the run_KSPTOT.command script tries to locate the MCR libraries, but isn't the smartest thing in the shed quite yet. If it doesn't succeed in starting up KSPTOT, please let me know and we'll see what we can do to make the script smarter.-Brian Quote Link to comment Share on other sites More sharing options...
Drew Kerman Posted September 8, 2014 Share Posted September 8, 2014 (edited) Arrowstar said: As I said, use the mission optimizer. It's perfect for these things. Copy that. Ok, so to test this out (using the plan in the image above), I used my orbital period after the circularization burn (event #5) and reset the Event #6 coast to a value of 0, the lower bound to 0 and the upper bound to my orbital period. So basically I've given the optimizer the entire orbit to search through. I then set the optimizer like so:I tried all 4 objective functions and every time the result I got was an RAAN of 140-141 degrees. Actually, I found that no matter what value I put in, I got 140-141 degrees. Once again, I must be missing something...If it'll help, here's the mission plan, the version without me adding any optimization to the RAAN coast phase (#6 - improperly labeled Coast to PE in the plan)http://www.blade-edge.com/misc/Kerbed%20Mun.zip Quote Out of curiosity, what other places require the Enter UT As Date/Time context menu item? I thought I got them all to be honest. Sorry didn't mean to imply you missed any, all the ones I noticed are now good.Also the copy orbit clipboard mechanic is brilliant. I still had to do a manual copy of data though, when I had to get the orbital period from the pop-up text display for the Current State of an event to use for my delta time limit in seeing if the optimizer would give me a RAAN. No biggie, overall way better for usability still. Edited September 8, 2014 by Gaiiden Quote Link to comment Share on other sites More sharing options...
Arrowstar Posted September 8, 2014 Author Share Posted September 8, 2014 (edited) The reason the optimizer isn't working is because you have the wrong event selected for the RAAN constraint. Try setting the RAAN constraint on the final event, "8 - COAST - for 30min". See if that helps any, it did for me. (For extra credit, once you've done this and assuming it works at all, can you explain why it works better?)EDIT: Picture for clarity. Edited September 8, 2014 by Arrowstar Quote Link to comment Share on other sites More sharing options...
Drew Kerman Posted September 8, 2014 Share Posted September 8, 2014 Nope, couldn't get it to work. Maybe I should have uploaded instead the file with the changes applied to the RAAN coast event. I can't see in your screenshot what the optimizer did that's any different from my manual fiddling.http://www.blade-edge.com/misc/Kerbed%20Mun.zip (same file, re-uploaded)Note I changed Event #6 to properly read Coast to RAAN and inserted 0 as a starting value with lower bound 0 and upper bound my orbital period after circularization. When I set up the optimizer the way you show in the screenshot it kicks me straight out to Kerbin in like 2 seconds and says "done". I also tried disabling optimization on the burn events so it would only fiddle with the delta time. Quote Link to comment Share on other sites More sharing options...
Arrowstar Posted September 8, 2014 Author Share Posted September 8, 2014 So is your final goal to get an orbit around the Mun with a RAAN of 250.1 degrees? Let me play around with it tomorrow and see what I can come up with. Quote Link to comment Share on other sites More sharing options...
Drew Kerman Posted September 8, 2014 Share Posted September 8, 2014 Arrowstar said: So is your final goal to get an orbit around the Mun with a RAAN of 250.1 degrees?Correct, because I need to rendezvous with a satellite that is in that orbit. Let's not lose sight of that fact that I did achieve this goal (and am confident I could do so again under different circumstances using the same method), just not through "proper" use of the optimizer. I certainly would like to do it that way in the future however (for example it would be slightly more efficient time-wise to be able to plot a Mun intercept that would put my Pe at like 200 degrees RAAN so I would only have a short wait to incline my orbit properly), so I appreciate the help. Quote Link to comment Share on other sites More sharing options...
Arrowstar Posted September 9, 2014 Author Share Posted September 9, 2014 Alright, so I was able to get it, but not in one step (this is not unusual). You have to "walk" the solution in by setting very loose constraints at first and then slowly shinking them around your desired value. Forexample, you wanted a RAAN of 250.1 here. Your starting RAAN was 320. I thus created a RAAN constraint on the final event with a lower bound of 250.1 and an upper bound of 300. I then optimized. I then moved it to 290. Then 280. Then 270. Then 260. Then 255. Then 250.1. In this manner, over multiple iterations of the optimization code, you can get your solution to look like what you desire, as I was able to.We do this same thing in the "real world" when attempting to optimize mission plans for real spacecraft, so it's nothing new. Give it a try and let me know if you have any questions. Quote Link to comment Share on other sites More sharing options...
Drew Kerman Posted September 9, 2014 Share Posted September 9, 2014 (edited) That makes sense, but I'm still hung up.If I open up my mission file that I uploaded, I go straight to the optimizer and set it up exactly as it looks in your screenshot (Minimize Ecc function, Applicable Event to State 4, RAAN constraint to State 8) - when I run it I get kicked out into Kerbin orbit. I don't think I comprehend still how the optimizer really functions so I'm not feeding it the right data it needs to do its job. For example, I got the proper RAAN by playing around with the delta time - so if I remove all other optimization options from the mission plan I would have expected the optimizer to do the same thing - but the RAAN doesn't budge when I run it.Just... whatever - I only spent a few minutes playing around and I don't need this solution anytime soon so I will continue to mess around and see what I can figure out. I don't mind grokking things on my own as I tend to learn more that way anyhow.Edit - ok got a result in just one run of the optimizer but still confused as to what is going on. Here is the break down:Javascript is disabled. View full albumI guess the constraints I gave the optimizer were just too large given the initial value? Anytime I give the optimizer something to chew on the value should begin somewhere close to the middle of the constraints?Interestingly, if you follow the steps in the images and only select Re-Optimize Mission after changing the Coast value to 10000, the optimizer will kick it back to 0.00000354273etc. But if you open the optimizer window, change nothing and click to run it, you'll get the proper 250.1 degrees. I guess the Re-Optimize option doesn't take into account any changes to the mission plan? Edited September 9, 2014 by Gaiiden Quote Link to comment Share on other sites More sharing options...
Arrowstar Posted September 9, 2014 Author Share Posted September 9, 2014 Hi Gaiiden,No worries. Keep poking around with it and seeing what you can do. A Central Body constraint might help you here. I might also try changing the Event 6 coast from delta time to true anomaly, and set the value of the true anomaly to the true anomaly immediately after the event 6 coast (it's like 278 degrees). Finally, I do think your frustration is understandable! Optimizing space trajectories is a hard task. You end up balancing some crazy non-linear dynamics against numerical techniques that don't always want to play nice and remain stable. Optimizers are hard, but keep at it and you'll get it. And and always, if I can help more, please let me know. Quote Link to comment Share on other sites More sharing options...
Drew Kerman Posted September 9, 2014 Share Posted September 9, 2014 Hrm, your response came after my edit but perhaps some caching thing didn't show it for you.I got the result with the optimizer (see image gallery), I just don't really understand why I had to use it the way I did. Although I suspect it's because it needed a better initial value to work with, like the median of the constraints, which is actually 15136.675, very close to the 10000 value that gave me the proper result. Quote Link to comment Share on other sites More sharing options...
Arrowstar Posted September 9, 2014 Author Share Posted September 9, 2014 So sometimes the optimizer gets stuck in a local minimum and can't find it's way out in one run because the step sizes it is taking are too small to climb out. However, if you repeat the run, the optimizer starts fresh with large® step sizes and can, on occasion, find a different (and hopefully better!) result because of this. I've seen happen all of the time. Use it to your advantage. Yeah, the re-optimize function just redoes the previous optimization job. Not all that useful at the moment to be honest. I need to fix that for v1.1.7. Thanks for the reminder. Quote Link to comment Share on other sites More sharing options...
Drew Kerman Posted September 9, 2014 Share Posted September 9, 2014 got it, will keep that in mind thanks Quote Link to comment Share on other sites More sharing options...
Drew Kerman Posted September 9, 2014 Share Posted September 9, 2014 okay here's a new problem. I just launched a probe into orbit and wanted to see if I could plan ahead my transfer and orbit about Mun. So to begin with, I entered the Rendezvous Maneuver Sequencer to get my transfer burn. I imported my probe orbit, selected Mun for the target, and adjusted the Initial Epoch to about 25 minutes ahead of the imported orbit time since I wanted to do some LKO stuff before heading off to Mun. The resulting burn however gives me a time for late the next day. Even re-running the RMS the best result I got was for like 4pm later the same day. Is there any way to constrain it so that I can just get the next transfer point after the Initial Epoch? Quote Link to comment Share on other sites More sharing options...
RadarManFromTheMoon Posted September 9, 2014 Share Posted September 9, 2014 Hi everybody.Downloaded this gem today and I spent literally (yes literally) the whole day experimenting around with it. I really like it. Just one question. The Porkchop plotter semms to produce sensible results for the inner planets, but it states rediculously high delta-v's for transfers from Kerbin to Dres, Jool or eeloo. For example: Quote Burn Information to Depart Kerbin---------------------------------------------Total Delta-V = 8.43754 km/sPrograde Delta-V = 8436.32153 m/sOrbit Normal Delta-V = -143.56249 m/sRadial Delta-V = 0.00000 m/s---------------------Burn True Anomaly = 298.31977 degBurn Time Past Peri. = 1622.63449 secBurn Time Before Peri. = 335.49394 secInitial Orbit Period = 1958.12844 secThis is supposed to get me to Jool, but it will rather catapult me into the void of interstellar space.Am I doing something wrong here? Quote Link to comment Share on other sites More sharing options...
Arrowstar Posted September 10, 2014 Author Share Posted September 10, 2014 Hi, the author of KSP TOT here. Glad you like my little piece of code! Your issue probably isn't with the Compute Departure function but with the way you're plotting the porkchop plot itself. I suspect your problem is that you're not plotting the correct part of the porkchop plot (the part with the actual DV minimum in it) because you're not plotting enough synodic periods. Please try the following:1) On the main KSP TOT GUI (what you see when you first start the application), go to Edit -> Options.2) Change number of synodic periods to plot to 3.3) Try again to generate a porkchop plot and use the Compute Departure button.4) If your delta-v is still unreasonable, try bumping the number of synodic periods to plot to 4-5 and repeat step 3.As an example, here's what happens if I try to plot a mission from Kerbin to Jool without touching the synodic periods to plot option:And here's what happens when I change it to 3:The second image clearly includes the DV minimum point (the spot with the data tooltip on it), so that's what we want. Does that help? If not, please post some screenshots of how you're using the application so that I can help you figure out what's going on. Quote Link to comment Share on other sites More sharing options...
Arrowstar Posted September 10, 2014 Author Share Posted September 10, 2014 Gaiiden said: okay here's a new problem. I just launched a probe into orbit and wanted to see if I could plan ahead my transfer and orbit about Mun. So to begin with, I entered the Rendezvous Maneuver Sequencer to get my transfer burn. I imported my probe orbit, selected Mun for the target, and adjusted the Initial Epoch to about 25 minutes ahead of the imported orbit time since I wanted to do some LKO stuff before heading off to Mun. The resulting burn however gives me a time for late the next day. Even re-running the RMS the best result I got was for like 4pm later the same day. Is there any way to constrain it so that I can just get the next transfer point after the Initial Epoch?http://i.imgur.com/oqok5cp.pngYeah, this is a problem I want to address at some point. It looks like the code searches over 1 orbital period for a window DV maneuver. Unusually this is good enough, but sometimes if there are multiple local minimum within that range, it grabs a later burn point either because it's slightly cheaper or because that point is obscuring a closer burn time.So what can you do in the mean time? If your solutions are too far in the future, try sliding your initial epoch back bit by bit. I would suggest increments of 1 hour. You should get a time you want eventually by doing that. I agree it's not really desirable, but it should work in the mean time. Let me know if you have trouble. Quote Link to comment Share on other sites More sharing options...
Drew Kerman Posted September 10, 2014 Share Posted September 10, 2014 Arrowstar said: So what can you do in the mean time? If your solutions are too far in the future, try sliding your initial epoch back bit by bit. I would suggest increments of 1 hour. You should get a time you want eventually by doing that. I agree it's not really desirable, but it should work in the mean time. Let me know if you have trouble. Well, I've already progressed into Munar orbit but I will keep that in mind for next time, thanks! Quote Link to comment Share on other sites More sharing options...
RadarManFromTheMoon Posted September 10, 2014 Share Posted September 10, 2014 Ah! Thanks a lot. There was the error. Now everything makes sense. Is this the default setting or have I possibly messed that up while browsing through all that elaborated stuff? If it is default, may I suggest a little hint in the tutorial? Quote Link to comment Share on other sites More sharing options...
Arrowstar Posted September 10, 2014 Author Share Posted September 10, 2014 Gaiiden said: Well, I've already progressed into Munar orbit but I will keep that in mind for next time, thanks!No problem. RadarManFromTheMoon said: Ah! Thanks a lot. There was the error. Now everything makes sense. Is this the default setting or have I possibly messed that up while browsing through all that elaborated stuff? If it is default, may I suggest a little hint in the tutorial?It is the default setting of the application, yes. I should add a hint, that's a good idea. I'm glad you figured it out, please let me know if I can answer any more questions. And when you get proficient with the KSP TOT porkchop plot, do try out the other features and applications within the tool. Quote Link to comment Share on other sites More sharing options...
Drew Kerman Posted September 10, 2014 Share Posted September 10, 2014 I think the Graphical Analysis is missing an option to show distance traveled. I like how NASA and them can say how far their probes have traveled, but currently there's no tracking of that in KSP, at least not through multiple switches between craft (Flight Results window distance traveled stat resets each load). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.