Jump to content

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


Recommended Posts

A word about Linux compatibility:

I don't know if @Arrowstar knew about this when he added the section on Linux usage (or if this even existed), but there's an official MATLAB runtime enviroment linux port available from their website. I can't check if KSPTOT itself has compatability issues with the linux version of MATLAB until sunday at the earliest, but theoretically it should run far better then trying to coax the windows version into working with WINE.

Link to comment
Share on other sites

10 minutes ago, Sneaky Bstard Sword said:

A word about Linux compatibility:

I don't know if @Arrowstar knew about this when he added the section on Linux usage (or if this even existed), but there's an official MATLAB runtime enviroment linux port available from their website. I can't check if KSPTOT itself has compatability issues with the linux version of MATLAB until sunday at the earliest, but theoretically it should run far better then trying to coax the windows version into working with WINE.

The problem is that I can only compile the executable for Windows. I don't have a Linux license, so I can't create the Linux executable. :-) 

3 hours ago, Drew Kerman said:

back with another wish list item - looks like Other Spacecraft orbits can't handle hyperbolic trajectories. That would be nice to have as well

It does handle these trajectories, actually, it just doesn't do the SOI switch stuff. The reason is because that code is very CPU intensive and would slow the propagation down even further if I used it.  :-) 

Link to comment
Share on other sites

On 10/7/2016 at 1:58 PM, Arrowstar said:

It does handle these trajectories, actually, it just doesn't do the SOI switch stuff. The reason is because that code is very CPU intensive and would slow the propagation down even further if I used it.  :-) 

oh derp. I uhm... yea I dunno. I think the need to press "Add Spacecraft" before filling in any of the data still messes me up sometimes. I must have filled out everything and then closed it without adding the spacecraft, then when nothing showed up I re-opened it and saw the orbit properties reset to default and figured it was refusing the hyperbolic trajectory. I got it to work now.

Suggestion

So suggestion then - is it possible, if there are no Other Spacecraft to list, all the fields are disabled until the Add Spacecraft button is pressed? I know we went over this whole UX thing with the Other Spacecraft window a while ago. I generally do remember to always click the Add Spacecraft button first but there are times I still get it backwards - fill in the data then click the Add Spacecraft button.

Bug Report

Oh yea - I think another thing that tripped me up is that I forgot to set the body of the orbit after pasting the data. I think I asked this before but is there a reason the body isn't also copied and pasted with the rest of the orbit data?

Edited by Drew Kerman
Link to comment
Share on other sites

Porkchop Problems V2:

Hi. Tried to do a Vall to Tylo using the porkchop/burn, and got very similar results from my Minmus/Mun issue already reported.  Have screenshots and logs available if you need.

This time, I noticed two things in common with the last time: There was a reasonably large radial burn and the burn point seemed to be in the wrong place.  So, I moved the burn point exactly half of the orbital period forward, and got a close approximation. Set the normal portion to 0 and lowered prograde from 355 to 270 to get a 450K pe to Tylo.

So, I think the issue may have to do with the burn point being almost 180 deg off. Not sure if the weird radial component is causing it or is a result of it.

Please let me know if you want the data.  I can put screenshots in a Wordpad and also post the output_log.txt.

Thanks

Edit: Think I may have found something.  Reverted back to 1.5.5 vanilla with no updates. Deleted and recreated bodies.ini. Got a great result from Duna-Kerbin. Will not install any of the prereleases.  Thanks

Edited by Gilph
update
Link to comment
Share on other sites

On 9/18/2016 at 0:12 PM, Arrowstar said:

Update for compatibility with KSP v1.2.  KSPTOTConnect is only compatible with KSP 1.2 as of this release!

Oh sweet, thanks! I've been wanting to use this for a very long time (years, literally) and now that I have a Windows machine, I can.

Link to comment
Share on other sites

  • 2 weeks later...
On 2016-09-23 at 2:08 AM, Gilph said:

OK, have some data. this is with latest prerelease on 1.1.3 with older connect file (which works fine)

I tried Mun to Minmus in 1.2 and the same steps as you and got a solution that looked like it should work in TOT, but the uploaded manoeuvre was totally wonky.

Tried various variations (and made sure I got all data from the active game) and the same result.

The departure burn data in TOT seems to get garbled somehow during transmit to the game.

Link to comment
Share on other sites

10 hours ago, Curveball Anders said:

I tried Mun to Minmus in 1.2 and the same steps as you and got a solution that looked like it should work in TOT, but the uploaded manoeuvre was totally wonky.

Tried various variations (and made sure I got all data from the active game) and the same result.

The departure burn data in TOT seems to get garbled somehow during transmit to the game.

@Curveball Anders Hi, I know some have reported this, but I check the calculated data and the data that gets uploaded, and it uploads correctly. I have not seen the garbled error.

My issues seem to be only in the burn part of the porkchop/transfer burn.  The porkchop seems to calculate the correct departure time, or close enough. The burn parameters are somewhat close, except the radial piece. All of the other utilities work really well and are highly accurate, so I don't think it's a Matlab issue.  Since I've been trying to educate myself on orbital mechanics, my only thought was that when you input the burn data into MA, it optimizes for true anomaly (if you follow the tutorial steps), and the transfer burn without MA uses mean anomaly. Since the porkchop/burn was somewhat designed as an input to MA, maybe the MA optimizer provides that final tweak. Still working my way through it.

Link to comment
Share on other sites

3 hours ago, Three_Pounds said:

I read that KSP 1.2 messes with big G and other derived constants. All my spreadsheets are wrong now. Is this something you have considered in your update?

So I just learned about this today as I haven't had as much time to work on KSPTOT recently.  Would someone be willing to create a new bodies file and compare it to the old one?  The values of GM are what would have changed. I don't use little "g" anywhere in the orbit propagation code directly, I use gravitational parameters. 

Thanks!

Link to comment
Share on other sites

20 hours ago, Drew Kerman said:

Yup GM are different as are some atmosphere tweaks and even a few rotational periods: https://www.diffchecker.com/XQJd0c1h

bodies.ini shipped with KSPTOT on the left, created .ini file from v1.2 on the right

Well drat.  Okay, I'll see if I can't fix all this on Saturday or Sunday.  I suppose I'll push out a new release then as well.  Thanks for your help! :)

Link to comment
Share on other sites

1 hour ago, Arrowstar said:

Well drat.  Okay, I'll see if I can't fix all this on Saturday or Sunday.  I suppose I'll push out a new release then as well.  Thanks for your help! :)

no problem. And although you may not have time to actually implement it, if you could look into seeing whether my idea for the partial Other Spacecraft orbit rendering would be feasible that'd be great too! :)

Well, unless you're like me where if you see something is possible it has to be done and really sits in the back of your head nagging if you can't get it done right away. If so, don't do it :P

For the record I do not recall any serious issues that have been posted here since the last release.

Edited by Drew Kerman
Link to comment
Share on other sites

I noticed another thing that has changed with 1.2

Quote
  • All anomalies (ObT, mean anomaly, eccentric anomaly, true anomaly) are now consistently negative when approaching the periapsis for both elliptical and hyperbolic trajectories (previously, only hyperbolic trajectories used negative anomalies). This means that eccentric anomaly and true anomaly are now in the range -π..π instead of 0..2π for elliptical trajectories.

KSP TOT still expects anomalies in the range of [0, 360]

rW7Daob.png

Link to comment
Share on other sites

1 hour ago, Three_Pounds said:

I noticed another thing that has changed with 1.2

KSP TOT still expects anomalies in the range of [0, 360]

rW7Daob.png

Well drat.  I guess I need to update that in the KSPTOTConnect to give me something 0-360.  Thanks for the heads up!

Link to comment
Share on other sites

Has anyone got this working with macOS Sierra yet?

I can't seem to get it to start...

 

..I'd love to send screenshots of the errors I'm getting, but I can't figure out how to attach something... the "Insert other media" button down the bottom doesn't seem to work. :/

I'm using the current (Sierra-compatible) version of the Matlab runtime thingy as the one listed in the OP doesn't support Sierra.

 

TIA

Link to comment
Share on other sites

Are you trying to follow the native Mac instructions? I haven't tried that in ages, since the build for macOS is extremely out of date.

8 hours ago, DavidHunter said:

Has anyone got this working with macOS Sierra yet?

I can't seem to get it to start...

 

..I'd love to send screenshots of the errors I'm getting, but I can't figure out how to attach something... the "Insert other media" button down the bottom doesn't seem to work. :/

I'm using the current (Sierra-compatible) version of the Matlab runtime thingy as the one listed in the OP doesn't support Sierra.

 

TIA

 

I was able to get a more recent build of KSP running using WINE. The 1.5.x releases were having problems at first, but I've just now tried with the latest WINE (1.9.21) and - hooray! - it seems to be working again.

On 5/3/2016 at 0:39 PM, salajander said:
  1. Install WINE (I installed the latest staging build from https://www.winehq.org/download/)
  2. Install cabextract and ensure it's in your PATH
    1. On OS X, use homebrew or macports; e.g., 'brew install cabextract'
    2. On Linux, use your distro's package manager (apt, yum, etc.)
  3. Install winetricks: https://wiki.winehq.org/Winetricks
  4. Install the native VC++ runtime: 'winetricks vcrun2012'
  5. Install the (Windows!) MCR: 'wine MCR_R2014b_win64_installer.exe'
  6. Launch KSPTOT! : 'wine KSPTrajectoryOptimizationTool.exe'

N.B.: You'll need to install the newer MCR_2015b_win64_installer.exe (linked on the first post).

@Arrowstar Could you update the first post to point Mac users at these instructions? And update step 5 with the latest MCR filename, please.

 

EDIT: Ok, not fully working - the images are all upside-down...

Edited by salajander
Link to comment
Share on other sites

I have a long burn coming up, so I thought I'd try the Maneuver Execution Assistant. It can read in the orbit from KSP ok, but it doesn't read the maneuver node. I can get all the data for the node inside of KSP except True Anomaly.

So I thought I'd open up MCC Real Time System and get it there. However, the Orb Ops Console's Maneuvers Information pane only shows Burn UT and Time Until data, not True Anomaly.

Two feature requests, please:

  • In the execution assistant, add ability to right-click and read next maneuver node from KSP
  • In the Orb Ops console, display the maneuver node's True Anomaly, to match what the execeution assistant wants

Thanks!

Link to comment
Share on other sites

would it be possible for the Figure window to maintain the plot box position when you rotate? If you're not sure what I'm talking about just do those steps - open a Popout Orbit Display, click the hand tool and pan the plot around a bit, click the rotate tool and notice when you rotate the plot box is moved back to the center of the window. Reason I'm asking is because you can't zoom in on something and rotate around it, when you pan to center it and rotate the box moves and the thing you centered on is no longer in view

Edited by Drew Kerman
Link to comment
Share on other sites

Another suggestion: I'd love to compute the best starting orbit (mostly inclination/RAAN/ArgP, I think) to start a given planetary transfer. I can start a whole mission with the assumption of an equatorial 100km orbit, but many transfers are of course better served with a better starting orbit.

Naturally I'd then want an idea of when to actually launch in order to reach this orbit... I think you've done some work with this with the launch window planner.

Link to comment
Share on other sites

4 hours ago, salajander said:

Naturally I'd then want an idea of when to actually launch in order to reach this orbit...

I was troubled by this too at first, but it's not as important as you think. As long as you are in orbit before the departure date, you can rework the departure burn for the actual orbit you are in without any huge impact on your travel plans. The most important thing about your initial orbit is the inclination, as that's the most costly thing to compensate for.

Link to comment
Share on other sites

5 minutes ago, Drew Kerman said:

I was troubled by this too at first, but it's not as important as you think. As long as you are in orbit before the departure date, you can rework the departure burn for the actual orbit you are in without any huge impact on your travel plans. The most important thing about your initial orbit is the inclination, as that's the most costly thing to compensate for.

Ah, ok, good to know. I'd still like a good method to figure out what the best initial inclination is for a given planetary transfer window.

Link to comment
Share on other sites

1 minute ago, salajander said:

Ah, ok, good to know. I'd still like a good method to figure out what the best initial inclination is for a given planetary transfer window.

Use the inclination, RAAN, and argument of perigee from your Kerbin hyperbolic departure orbit as parameters for your Kerbin parking orbit. 

Sorry I've been away, all, life keeps getting the better of me. I'll get another update with suggestions out at some point, I promise. :-) 

Link to comment
Share on other sites

5 minutes ago, salajander said:

Ah, ok, good to know. I'd still like a good method to figure out what the best initial inclination is for a given planetary transfer window.

You get that information from the departure burn. Just use the default orbital parameters to start with and you'll get a departure burn with the inclination needed to get you to your destination. From there you use....

Aaaannd I stopped typing cause I got a notification that Arrowstar was here :) Hi there! *waves* haha

Also this is all information you can get from the Solar System Edge tutorial shipped with KSPTOT.

Edited by Drew Kerman
Link to comment
Share on other sites

2 hours ago, Arrowstar said:

Use the inclination, RAAN, and argument of perigee from your Kerbin hyperbolic departure orbit as parameters for your Kerbin parking orbit. 

Sorry I've been away, all, life keeps getting the better of me. I'll get another update with suggestions out at some point, I promise. :-) 

Yes, of course, this makes perfect sense. Derp.

2 hours ago, Drew Kerman said:

You get that information from the departure burn. Just use the default orbital parameters to start with and you'll get a departure burn with the inclination needed to get you to your destination. From there you use....

Aaaannd I stopped typing cause I got a notification that Arrowstar was here :) Hi there! *waves* haha

Also this is all information you can get from the Solar System Edge tutorial shipped with KSPTOT.

I read through that tutorial, but I must have missed that part. I'll go through it again. Thanks!

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