Jump to content

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


Recommended Posts

37 minutes ago, dlrk said:

Is there a way to plan a rendezvous with a spacecraft orbiting a different central body than the initial one? Like planning a mission from Kerbin orbit to a space station orbiting the Mun? Or a mission from Kerbin to an asteroid in solar orbit?

not directly. I can't speak for planning an asteroid rendezvous but I do have experience planning a Mun rendezvous mission:

I just used the Rendezvous Maneuver Sequencer to get a transfer orbit from Kerbin to Mun and then used the RMS again (and again, and again, etc) to link up with the 4 satellites I serviced. The only consideration I made, as noted in the video, was to try various rndv orders for the three circular orbit sats to get the least expenditure in Dv - I do not recall really optimizing the initial rndv with the highly elliptical satellite - at least I did not optimize it from my trans-munar injection burn. I just got to Mun first then figured it out from there. I'm sure I could have made some considerations earlier in planning for having a more efficient initial Munar orbit for that first rndv but this was my first big mission plan so I didn't bother.

if you're interested further or just have some time to kill, here is the mission report

Edited by Drew Kerman
Link to comment
Share on other sites

5 hours ago, valens said:

Any news on compiling KSPTOT for mac ? With the latests OSes versions (10.13.x), the 2013a MCR cannot be installed.

Thanks for the good work !

So I didn't create the mac version.  Someone helped me out a few years ago on that. I don't have a Mac, nor do I have matlab for Mac, so I can't create it. 

If someone has matlab on mac and wants to help via compiling code for me, please get in touch! I would appreciate the help!

 

Edit: also I know I have other replies I need to get to.  I was out of town for a bit but I'll take a look this weekend! 

Edited by Arrowstar
Link to comment
Share on other sites

On 2/27/2018 at 8:23 AM, Drew Kerman said:

hey @Arrowstar is it possible to also have the line type options (dotted, dashed, etc) available for plotting in the mission trajectory in the various states that let you pick a color for the line plot?

This is now in the next build, coming tonight. :)

On 3/9/2018 at 6:44 PM, Drew Kerman said:

I fear this may have come across as snarky or demanding but I'm just curious

No worries, you didn't!  It's not my storing them that's the issue.  I'm wondering if there's a difference in the precision between data that comes from SFS files and data that comes straight from KSPTOTConnect.  In any event, it seems like the work-around is to simply use orbit data from the same source (preferably KSPTOTConnect).

On 3/9/2018 at 10:31 PM, Drew Kerman said:

also remember the bug report I made where I would add an event and it would not appear in the event listing but I could still Undo it from the Edit menu and Redo it to add it back and it would show up? Yea I'm positive now that's just me being too quick for the application :D plugging in orbital data for asteroids to check things is a daily task and I'm so well-practiced at it that after loading up the Initial State and closing the window I can open up the Create Coast window so fast that the main application window sometimes still says  "loading..." and hasn't updated yet with the data from the Initial State window! So when I close the Create Coast the app finishes updating with the Initial State data but then doesn't actually add the new coast because that wasn't part of the update cycle when it kicked off. So yea, nothing to fix there I just need to slow down a bit haha (unless you really want to add in a block to not allow new dialogs to pop up until the current update is finished, but I doubt it's worth the effort to "fix" this issue)

Thanks for investigating this!  I'd rather not add in any sort of block because those just cause bugs down the road.  I appreciate you finding out what the root cause was.  Hopefully pausing for a moment won't kill your work flow too much. :)

Link to comment
Share on other sites

10 hours ago, Arrowstar said:

I'm wondering if there's a difference in the precision between data that comes from SFS files and data that comes straight from KSPTOTConnect

what I find weird is that the game has to start with the data that is in the SFS file so if KSPTOT is pulling the same data from the SFS file then why can't it propagate the same as the game? Did I say that right? :P

Anyways my current method seems to be working well, which is to load into a dummy craft at the space center just so I can load data through KSPTOTConnect from whatever craft I'm interested in without taking that craft off rails in the process. The last Mun encounter with my asteroid in orbit was accurate down to the minute and now I've plotted the next intercept in late July and will check that one down to the second

Also been doing my 500-run MFMS sequences this month and will have a report on the KSA site later this month, but so far no issues. The sequencer hung up twice but both times I was also playing GTAV when it happened so I attribute that as the cause. If a lockup happens during normal use I'll send over the log but so far so good

Edited by Drew Kerman
Link to comment
Share on other sites

On 3/17/2018 at 11:00 PM, Arrowstar said:

Added the ability to set the line style of coasts and finite DV maneuvers.

just noticed this was only for two events - my original request actually was for all events that had the ability to draw lines. But if there are technical limitations to the other events I'll def take just these two

Link to comment
Share on other sites

1 minute ago, Drew Kerman said:

just noticed this was only for two events - my original request actually was for all events that had the ability to draw lines. But if there are technical limitations to the other events I'll def take just these two

No limitations, I just wasn't thinking... I just realized that aerobreaking needs this too. What other events are missing? I can add them. :)

Link to comment
Share on other sites

1 hour ago, Arrowstar said:

No limitations, I just wasn't thinking... I just realized that aerobreaking needs this too. What other events are missing? I can add them. :)

Initial State (Launch Trajectory)
N-body Coast
Aerobrake
Docking
Landing

Those are the others that draw lines. Thanks! (BTW you can hold these for a release that has more meat to it if you want)

Edited by Drew Kerman
Link to comment
Share on other sites

5 hours ago, Drew Kerman said:

Initial State (Launch Trajectory)
N-body Coast
Aerobrake
Docking
Landing

Those are the others that draw lines. Thanks! (BTW you can hold these for a release that has more meat to it if you want)

Here is KSPTOT v1.5.10 pre-release 3.

  1. Added the line style updates to the five events showed in the quote.
  2. Updated the drag coefficient calculator to use orbital energy instead of SMA to solve on.
Link to comment
Share on other sites

Issue with latest release - all modified Other Spacecraft have their line types locked to Dashed. Here is a MAT file with several of the later entries stuck on Dashed settings. Steps to recreate:

  1. Make new MA project
  2. Add an Other Spacecraft and close the window
  3. Re-open the window and you'll see the line is still Solid
  4. Change anything - even just modifying the name a bit - and close
  5. Re-open and the line type will be stuck on Dashed

The thing to note about the MAT file I linked to is that it includes spacecraft created in older versions, so their line types are still Solid. But if you modify anything in them they too will get locked to Dashed

Edited by Drew Kerman
Link to comment
Share on other sites

2 hours ago, Drew Kerman said:

Issue with latest release - all modified Other Spacecraft have their line types locked to Dashed. Here is a MAT file with several of the later entries stuck on Dashed settings. Steps to recreate:

  1. Make new MA project
  2. Add an Other Spacecraft and close the window
  3. Re-open the window and you'll see the line is still Solid
  4. Change anything - even just modifying the name a bit - and close
  5. Re-open and the line type will be stuck on Dashed

The thing to note about the MAT file I linked to is that it includes spacecraft created in older versions, so their line types are still Solid. But if you modify anything in them they too will get locked to Dashed

Yup, found the bug.  It showed up when I made the modifications to the line type stuff for the last pre-release.  Thanks for the report.  I have fixed it in KSPTOT v1.5.10 pre-release 4.

Link to comment
Share on other sites

Another pre-release for KSPTOT v1.5.10, pre-release 5.  I had some inspiration at work today and I wanted to get it in before I forgot how I wanted it to work.  It's a simple feature:

  • In Mission Architect, after running the optimizer, any constraints that are active or violated after optimization will show a warning message with information about the constraint values and bounds. 

This should help debugging trajectory optimization by showing users what constraints they may be getting "stuck on" while optimizing their trajectories.

Please let me know if you have any questions or you find any bugs!  Thanks!  Happy orbiting. :)

Link to comment
Share on other sites

You know what would be awesome..  connecting this via KRPC so it could get orbital parameters directly without having to quicksave and find the sfs file, and could place (and execute, if you wanted to) maneuver nodes directly.  If you're interested in experimenting with it and want some help, let me know?  Matlab can call Python libraries directly, can't it?   Though perhaps it's easier to connect via one of the compiled krpc libraries...  such as the c++ one, so the end user doesn't have to install so many dependencies?  Hmmm.  

Edited by artwhaley
Link to comment
Share on other sites

5 hours ago, artwhaley said:

You know what would be awesome..  connecting this via KRPC so it could get orbital parameters directly without having to quicksave and find the sfs file, and could place (and execute, if you wanted to) maneuver nodes directly.  If you're interested in experimenting with it and want some help, let me know?  Matlab can call Python libraries directly, can't it?   Though perhaps it's easier to connect via one of the compiled krpc libraries...  such as the c++ one, so the end user doesn't have to install so many dependencies?  Hmmm.  

The software already can do all this.  Install my custom KSPTOTConnect add on to KSP, then start a game and get to the flight scene somewhere.  In KSPTOT, right click on an orbit input area or text box with burn info and you'll see menu options for uploading burn data or pulling orbit info.

KSPTOTCONNECT comes bundled with the main KSPTOT download.

Link to comment
Share on other sites

7 minutes ago, artwhaley said:

Oh cool!   I missed that along my path through the thread!   Disregard!   And awesome tool!  I don't know how I've played for 4 years without it!

 

Glad to hear it!  The learning curve can be a bit steep so let me know if you have any questions. 

Link to comment
Share on other sites

3 hours ago, Arrowstar said:

You would want this for the Coast to UT option? 

I did have reason to want to coast to *now* the other day. I mean, it's just as easy to ask for the time via the KSPTOT window and copy/paste it in but when I checked and saw it was available for the Initial State event I figured I'd ask if it could be added the coast event too

Link to comment
Share on other sites

Hiya @Arrowstar - still loving this amazing tool.

Small feature request - remember the last remote host IP/hostname in the saved config.

I'm having some issues trying to use finite maneuver. This is the first time I've given it a shot, so perhaps I've done something wrong? I had an impulsive Duna transfer maneuver set up, then converted it to finite and re-optimized. I then uploaded it to KSP, but the burn didn't end up with an encounter, much less anywhere near my target. A course-correction burn was requiring ~200 m/s delta-v. If I just used the original impulsive maneuver instead, I ended up with an encounter and only need a few m/s of correction.

.mat files for finite and impulsive as well as a save file available here. I just now realized the save isn't from a vanilla install - the actual vessel in question (Duna Flyby Block 2) doesn't use any non-vanilla parts, though.

Also, I think the MA in pre-release 5 isn't updating the visualizations after running the optimizer/changing initial state. Let me double-check, though.

Link to comment
Share on other sites

  • 2 weeks later...

Another feature request:

It would be grand if the Rendezvous Maneuver Sequencer and the Optimal Two Burn Orbit Change tools automatically changed the central body ("Orbiting About") when pulling in the orbit from the KSP TOT plugin. I can't tell you how many times I've forgotten to change it and had ... interesting ... results.

Also, the Orbit Change tool doesn't do anything when you right-click in the Final Orbit section and choose "Get Orbit from KSP".

Link to comment
Share on other sites

the moonlet saga continues. Here's what the game is showing me:

XUCkldSl.png

Now, if I load up the debris object you see at the top of the Tracked Objects list and then use KSPTOTConnect to query the orbital parameters for Alaba, using just a Coast to Next SOI Encounter I'm initially not able to get MA to give me an SOI intercept any sooner than July 24th (which aligns with previous predictions done on data before the last two encounters), and as you can see by the date under Kerbal Alarm Clock this SOI encounter is happening on April 28th. So instead I told MA to coast me up to the time seen in the screenshot, and from there I asked it to coast ahead to the next SOI and it did find this encounter shown above. However, if I start with just the initial orbit, set the script execution SOI search revs to 100, set the coast log entries to 100,000, disable selective SOI search and enable strict SOI search it still fails to find this earlier encounter and only catches one in July. So again based on its orbit back at the end of last year, I was able to properly predict the day of the next two encounters but for some reason it missed this one.

Here is the MAT file.

Link to comment
Share on other sites

Ok I did some more research into the issue and I have found that the Coast to Next SOI event is unable to find the encounter if it searches from further away than 4 days, 11 hours 27 minutes and 11 seconds. Repro:

  1. Load MAT file
  2. Add coast event to UT of 50833444
  3. Add coast event to Next SOI (default # of search revs is enough)
  4. Note no SOI encounter found
  5. Edit UT coast and change to 50833445
  6. Note SOI encounter is now found
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...