Jump to content

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


Recommended Posts

Just copy the old file, and replace the numbers with those in the RSS config file. Comparing it to the wiki, it looks like the units in the bodies file are:

  • epoch: unknown (seconds?)
  • sma, radius, atmoHgt: km
  • inc, raan, arg, mean: degrees
  • gm: km^3/s^2 (= 1,000,000,000 m^3/s^2)

You shouldn't need to change any of the other fields.

Link to comment
Share on other sites

Also, should the epoch value from the RSS config be directly copied into each epoch line?

Is atmohgt: atmosphereScaleHeight, maxAtmosphereAltitude or atmosphereMultiplier?

And gm is mass?

Edited by dlrk
Link to comment
Share on other sites

Oops, sorry. RAAN is "right ascension of ascending node"; sometimes called "longitude of ascending node". atmoHgt is the total height of the atmosphere (just look at the original file, the values are way too big for the other two). GM is the gravitational parameter, or the planet mass multiplied by Newton's constant. For example, for stock kerbin it's 3.5316×10^12 m^3/s^2; I'm guessing for RSS you should look for a number that's about 100 times higher.

As for whether mean anomaly is measured at the RSS epoch value, I think you'll need to ask an RSS expert for that. But probably.

Link to comment
Share on other sites

Ran into a snafu when trying to calculate a kerbin to duna via eve fly-by.

http://i.imgur.com/tkhOoPd.jpg

kspTOTlog:


Starting matlabpool using the 'local' profile ... connected to 4 workers.

Swarming...

Reached limit of 75 iterations

Best point before hybrid function: [1.1467e+08 4.1101e+06 6.0166e+06]

Turning over to hybrid function fmincon...


Local minimum possible. Constraints satisfied.

fmincon stopped because the size of the current step is less than
the selected value of the step size tolerance and constraints are
satisfied to within the default value of the constraint tolerance.




Final best point: [1.1467e+08 4.1101e+06 6.0166e+06]

----
114671641.318071


Run Local Local Local Local First-order
Index exitflag f(x) # iter F-count optimality
1 2 5.172 12 53 7.341e-11
2 2 5.172 8 37 4.942e-13
3 -2 5.175 12 75 1.551e-08
4 2 5.172 8 34 2.679e-10
5 2 0.991 9 33 1.044e-10
6 2 0.991 15 58 8.07e-10
7 -2 5.175 9 50 3.575e-09
8 -2 5.174 3 15 0.004757
9 -2 5.175 2 12 0.0003162
10 2 0.991 11 50 2.312e-05
11 -2 5.175 2 12 0.002096
12 -2 5.175 5 32 0.02135
13 2 5.172 7 35 3.414e-10
14 2 0.991 6 28 1.549e-09
15 2 0.991 14 59 3.437e-10
16 -2 5.175 20 84 2.348e-09
17 2 5.172 9 43 7.151e-14
18 -2 4.129 4 75 4.221e-09
19 2 0.991 7 34 8.823e-06
20 2 5.172 6 30 7.163e-14
21 2 0.991 8 33 5.272e-09
22 -2 5.175 26 156 9.16e-09
23 2 0.991 7 28 1.642e-09
24 2 0.991 8 37 2.288e-10
25 -2 5.175 14 83 1.064e-08
26 2 0.991 12 53 6.513e-13
27 2 0.991 12 39 1.044e-08
28 2 5.172 14 84 1.781e-12
29 2 5.172 13 50 2.671e-10
30 2 0.991 11 47 8.07e-10
31 2 0.991 9 38 8.07e-10
32 2 0.991 5 28 6.513e-13
33 2 0.991 6 25 8.161e-10
34 2 5.172 5 25 3.413e-10
35 2 0.991 22 102 2.993e-12
36 2 0.991 8 33 2.522e-05
37 2 0.991 14 53 8.064e-10
38 2 5.172 9 38 9.629e-06
39 -2 5.175 5 39 3.856e-09
40 2 5.172 5 21 2.676e-10
41 -2 5.175 9 50 1.94e-09
42 2 0.991 10 39 8.07e-10
43 2 5.172 11 42 3.409e-10
44 2 0.991 9 33 1.044e-10
45 2 0.991 8 53 1.314e-05
46 -2 5.175 12 77 5.008e-09
47 2 0.991 27 133 3.674e-11
48 -2 5.175 3 15 0.001097
49 -2 5.175 10 53 1.721e-09
50 2 5.172 13 47 2.676e-10

MultiStart completed some of the runs from the start points.

35 out of 50 local solver runs converged with a positive local solver exit flag.
109.760153757947

I've used the calculator several times without issues, and was just trying to generate a burn to try and make more sense out of the mission optimizer. I've managed to get it to do a kerbin->duna+circularize, wait 1 orbit and come back to kerbin, but couldn't get it to do a fly though. (well I could, once, but my 60m/s dV @ 1200km from core fly-through burn got bumped into a 700m/s burn at 4200km from core) Pretty sure it's just PEBCAK, playing with the optimizer I've figured out some stupid mistakes I've kept making, but since I can't get a flyby calculated any more my trial and error got put on hold :(

Would love a step by step for the ike mission file that was included, though just it's existance helped me sort out my burn timing issue. :)

OH! Almost forgot, can we have the dV-burn input be in the same order as the calculated burn displays? One of my problems has apparently been that I've mixed up the radial and normal burn vectors when entering burns. :P Didn't even notice until my burn pointed me through the planet I was orbiting. After calculating a departure burn from the porkchop plot, the dV is given as Prograde - Radial - Normal, but in the mission architect the order for entering a dV maneuver is Prograde - Normal - Radial.

Oh, and this program <profanity> rocks. Reading through the thread and seeing all the features coming in felt like being in the audience of The D for Master Exploder.

*headsplode*

Edited by Sacred Aardvark
Link to comment
Share on other sites

I created this bodies file by directly copying the appropriate values(except for mass, which I multiplied by the gravitational constant and then inserted.

[Sun]
epoch = 1577907488.17727995
sma = 0
ecc = 0
inc = 0
raan = 0
arg = 0
mean = 0
gm = 1.17230471E20
radius = 696342000
atmoHgt = 0
bodycolor = hot
canBeCentral = 1
canBeArriveDepart = 0
parent =
name = Sun
id = 0

[Moho]
epoch = 1577907488.17727995
sma = 52621383047
ecc = 0.20563
inc = 7.005
raan = 70.331
arg = 15.194
mean = 179.908747671079
gm = 1.68605338E13
radius = 2498928.19750
atmoHgt = 0
bodycolor = gray
canBeCentral = 0
canBeArriveDepart = 1
parent = Sun
name = Moho
id = 4

[Eve]
epoch = 1577907488.17727995
sma = 98326845441
ecc = 0.01
inc = 2.1
raan = 15.168
arg = 0
mean = 50.115
gm = 8.17153445E14
radius = 6995094.28346
atmoHgt = 220000
bodycolor = cool
canBeCentral = 0
canBeArriveDepart = 1
parent = Sun
name = Eve
id = 5

[Gilly]
epoch = 1577907488.17727995
sma = 314987761
ecc = 0.55
inc = 12.43
raan = 80
arg = 0
mean = 51.5662016
gm = 828925098
radius = 130064.74824
atmoHgt = 0
bodycolor = gray
canBeCentral = 0
canBeArriveDepart = 1
parent = Eve
name = Gilly
id = 13

[Kerbin]
epoch = 1577907488.17727995
sma = 135998402561
ecc = 0
inc = 0
raan = 0
arg = 0
mean = 357.51716
gm = 3.53151536E14
radius = 5999928.09976
atmoHgt = 104000
bodycolor = winter
canBeCentral = 1
canBeArriveDepart = 1
parent = Sun
name = Kerbin
id = 1

[Mun]
epoch = 1577907488.17727995
sma = 120000000
ecc = 0
inc = 0
raan = 0
arg = 0
mean = 97.4028252
gm = 65.138398
radius = 1999054.96077
atmoHgt = 0
bodycolor = gray
canBeCentral = 0
canBeArriveDepart = 1
parent = Kerbin
name = Mun
id = 2

[Minmus]
epoch = 1577907488.17727995
sma = 469989721
ecc = 0
inc = 6.0
raan = 77.989821
arg = 38
mean = 142.955717
gm = 1.76575771E11
radius = 599694.42320
atmoHgt = 0
bodycolor = cool
canBeCentral = 0
canBeArriveDepart = 1
parent = Kerbin
name = Minmus
id = 3

[Duna]
epoch = 1577907488.17727995
sma = 20726155.264
ecc = 0.05
inc = 0.06
raan = 135.504
arg = 0
mean = 19.3564
gm = 3.01355991E13
radius = 3201632.28989
atmoHgt = 154000
bodycolor = autumn
canBeCentral = 0
canBeArriveDepart = 1
parent = Sun
name = Duna
id = 6

[Ike]
epoch = 1577907488.17727995
sma = 32000109
ecc = 0.03
inc = 0.2
raan = 0
arg = 0
mean = 97.4028252
gm = 1.85679236E12
radius = 1299243.45118
atmoHgt = 0
bodycolor = gray
canBeCentral = 0
canBeArriveDepart = 1
parent = Duna
name = Ike
id = 7

[Dres]
epoch = 1577907488.17727995
sma = 408393482030
ecc = 0.14
inc = 5.0
raan = 280
arg = 90
mean = 320.34675
gm = 2.14839732E12
radius = 1378869.90408
atmoHgt = 0
bodycolor = gray
canBeCentral = 0
canBeArriveDepart = 1
parent = Sun
name = Dres
id = 15

[Jool]
epoch = 1577907488.17727995
sma = 687735603202
ecc = 0.049675
inc = 1.304
raan = 52
arg = 0
mean = 18.818
gm =2.82521233E16
radius = 59992356.20100
atmoHgt = 374000
bodycolor = gray
canBeCentral = 1
canBeArriveDepart = 1
parent = Sun
name = Jool
id = 8

[Laythe]
epoch = 1577907488.17727995
sma = 271840000
ecc = 0
inc = 0
raan = 0
arg = 0
mean = 179.908747671079
gm = 1.96195299E14
radius = 4999363.01675
atmoHgt = 415000
bodycolor = winter
canBeCentral = 0
canBeArriveDepart = 1
parent = Jool
name = Laythe
id = 9

[Vall]
epoch = 1577907488.17727995
sma = 3.1088028E+23
ecc = 0
inc = 0
raan = 0
arg = 0
mean = 14.86012204
gm = 2.07476525E13
radius = 2996978.99840
atmoHgt = 0
bodycolor = winter
canBeCentral = 0
canBeArriveDepart = 1
parent = Jool
name = Vall
id = 10

[Tylo]
epoch = 1577907488.17727995
sma = 685000000
ecc = 0
inc = 0.025
raan = 0
arg = 0
mean = 179.908747671079
gm = 2.82521233E14
radius = 6031002.70523
atmoHgt = 0
bodycolor = gray
canBeCentral = 0
canBeArriveDepart = 1
parent = Jool
name = Tylo
id = 10

[Bop]
epoch = 1577907488.17727995
sma = 1285000000
ecc = 0.24
inc = 15.04
raan = 10
arg = 25
mean = 51.5662016
gm = 2.48677529E11
radius = 649779.23637
atmoHgt = 0
bodycolor = gray
canBeCentral = 0
canBeArriveDepart = 1
parent = Jool
name = Bop
id = 11

[Pol]
epoch = 1577907488.17727995
sma = 1798899946
ecc = 0.17085
inc = 5.25
raan = 2.0
arg = 15.0
mean = 51.5662016
gm = 721684565
radius = 43987.022214
atmoHgt = 0
bodycolor = gray
canBeCentral = 0
canBeArriveDepart = 1
parent = Jool
name = Pol
id = 14

[Eeloo]
epoch = 1577907488.17727995
sma = 901188200009
ecc = 0.26
inc = 6.15
raan = 50
arg = 260
mean = 179.908747671079
gm = 7.44090314E12
radius = 2098334.29289
atmoHgt = 0
bodycolor = gray
canBeCentral = 0
canBeArriveDepart = 1
parent = Sun
name = Eeloo
id = 16

I'm getting unreasonable results, and it won't plot anything. Kerbin-Eve seems to yield a reasonable result, but nothing else. Any ideas? This is for 10x Kerbol system RSS upscale.

thanks

Link to comment
Share on other sites

still having issues with GM, and only gm. once again, more RSS silliness but this time I'm on the planet factory version... heh.

I wish there was an easy conversion but it's looking like I'd have to actually calculate each newtons constant for each orbital body? If we do estimation, how badly will this effect the calculations? I mean, we wouldn't want such a level of error that use of the tool doesn't work?

http://en.wikipedia.org/wiki/Standard_gravitational_parameter

Am I right to base my research off this?

Edited by usulrasolas
add link
Link to comment
Share on other sites

Ulsurasolas, looks we're working on the same problem. I was just multiplying by the gravitational conmtant, G, but I didn't get good results. I'd love to know if you get anywhere, I'm on the 10X kerbol system version

Link to comment
Share on other sites

I created this bodies file by directly copying the appropriate values(except for mass, which I multiplied by the gravitational constant and then inserted.

[Kerbin]

epoch = 1577907488.17727995

sma = 135998402561

ecc = 0

inc = 0

raan = 0

arg = 0

mean = 357.51716

gm = 3.53151536E14

radius = 5999928.09976

atmoHgt = 104000

bodycolor = winter

canBeCentral = 1

canBeArriveDepart = 1

parent = Sun

name = Kerbin

id = 1

It looks like you're using the wrong units: convert meters to kilometers (divide by 1000), and GM from m^3/s^2 to km^3/s^2 (divide by 10^9). I bet it will work then.

Also, I looked up the 10x kerbol config file and it looks like the lines for epoch and mean anomaly are commented out. So maybe you need to leave those at the original values?

Link to comment
Share on other sites

dlrk, I have two installs and one is a rss 10x kerbal system, i'd love to see your finished config if you get it. Sadly I don't have time for the next day or so to sit down n do the math for rss with the planet factory tweaks. But I should have them soon!

Link to comment
Share on other sites

[Sun]
epoch = 0
sma = 0
ecc = 0
inc = 0
raan = 0
arg = 0
mean = 0
gm = 117230471000
radius = 696342
atmoHgt = 0
bodycolor = hot
canBeCentral = 1
canBeArriveDepart = 0
parent =
name = Sun
id = 0

[Moho]
epoch = 0
sma = 52621383.047
ecc = 0.20563
inc = 7.005
raan = 70.331
arg = 15.194
mean = 179.908747671079
gm = 16860.5338
radius = 2498.9281975
atmoHgt = 0
bodycolor = gray
canBeCentral = 0
canBeArriveDepart = 1
parent = Sun
name = Moho
id = 4

[Eve]
epoch = 0
sma = 98326845.441
ecc = 0.01
inc = 2.1
raan = 15.168
arg = 0
mean = 179.908747671079
gm = 817153.445
radius = 6995.09428346
atmoHgt = 220
bodycolor = cool
canBeCentral = 0
canBeArriveDepart = 1
parent = Sun
name = Eve
id = 5

[Gilly]
epoch = 0
sma = 314987.761
ecc = 0.55
inc = 12.43
raan = 80
arg = 10
mean = 51.5662016
gm = 0.828925098
radius = 130.06474824
atmoHgt = 0
bodycolor = gray
canBeCentral = 0
canBeArriveDepart = 1
parent = Eve
name = Gilly
id = 13

[Kerbin]
epoch = 0
sma = 135998402.561
ecc = 0
inc = 0
raan = 0
arg = 0
mean = 179.908747671079
gm = 353151.536
radius = 5999.92809976
atmoHgt = 104
bodycolor = winter
canBeCentral = 1
canBeArriveDepart = 1
parent = Sun
name = Kerbin
id = 1

[Mun]
epoch = 0
sma = 120000
ecc = 0
inc = 0
raan = 0
arg = 0
mean = 97.4028252
gm = 65.138398
radius = 1999.05496077
atmoHgt = 0
bodycolor = gray
canBeCentral = 0
canBeArriveDepart = 1
parent = Kerbin
name = Mun
id = 2

[Minmus]
epoch = 0
sma = 47000.000
ecc = 0
inc = 6
raan = 78
arg = 38
mean = 51.5662016
gm = 176.575771
radius = 599.6944232
atmoHgt = 0
bodycolor = cool
canBeCentral = 0
canBeArriveDepart = 1
parent = Kerbin
name = Minmus
id = 3

[Duna]
epoch = 0
sma = 207261552.641
ecc = 0.05
inc = 0.06
raan = 135.5
arg = 0
mean = 179.908747671079
gm = 30135.591
radius = 3201.63228989
atmoHgt = 154
bodycolor = autumn
canBeCentral = 0
canBeArriveDepart = 1
parent = Sun
name = Duna
id = 6

[Ike]
epoch = 0
sma = 32000.109
ecc = 0.03
inc = 0.2
raan = 0
arg = 0
mean = 97.4028252
gm = 1856.79236
radius = 1299.24345118
atmoHgt = 0
bodycolor = gray
canBeCentral = 0
canBeArriveDepart = 1
parent = Duna
name = Ike
id = 7

[Dres]
epoch = 0
sma = 408393482.03
ecc = 0.14
inc = 5.0
raan = 280
arg = 90
mean = 179.908747671079
gm = 2148.39732
radius = 1378.86990408
atmoHgt = 0
bodycolor = gray
canBeCentral = 0
canBeArriveDepart = 1
parent = Sun
name = Dres
id = 15

[Jool]
epoch = 0
sma = 687735603.202
ecc = 0.049675
inc = 1.304
raan = 52
arg = 0
mean = 5.72957795
gm = 28252123.3
radius = 59992.356201
atmoHgt = 374
bodycolor = gray
canBeCentral = 1
canBeArriveDepart = 1
parent = Sun
name = Jool
id = 8

[Laythe]
epoch = 0
sma = 271840
ecc = 0
inc = 0
raan = 0
arg = 0
mean = 179.908747671079
gm = 196195.299
radius = 4999.36301675
atmoHgt = 415
bodycolor = winter
canBeCentral = 0
canBeArriveDepart = 1
parent = Jool
name = Laythe
id = 9

[Vall]
epoch = 0
sma = 431520
ecc = 0
inc = 0
raan = 0
arg = 0
mean = 51.5662016
gm = 20747.6525
radius = 2996.9789984
atmoHgt = 0
bodycolor = winter
canBeCentral = 0
canBeArriveDepart = 1
parent = Jool
name = Vall
id = 10

[Tylo]
epoch = 0
sma = 685000
ecc = 0
inc = 0.025
raan = 0
arg = 0
mean = 179.908747671079
gm = 282521.233
radius = 6031.00270523
atmoHgt = 0
bodycolor = gray
canBeCentral = 0
canBeArriveDepart = 1
parent = Jool
name = Tylo
id = 10

[Bop]
epoch = 0
sma = 1285000
ecc = 0.24
inc = 15.04
raan = 10
arg = 25
mean = 51.5662016
gm = 248.677529
radius = 649.77923637
atmoHgt = 0
bodycolor = gray
canBeCentral = 0
canBeArriveDepart = 1
parent = Jool
name = Bop
id = 11

[Pol]
epoch = 0
sma = 1798899.946
ecc = 0.170
inc = 5.25
raan = 2.0
arg = 15.0
mean = 51.5662016
gm = 0.721684565
radius = 43.987022214
atmoHgt = 0
bodycolor = gray
canBeCentral = 0
canBeArriveDepart = 1
parent = Jool
name = Pol
id = 14

[Eeloo]
epoch = 0
sma = 901188200.009
ecc = 0.26
inc = 6.15
raan = 50
arg = 260
mean = 179.908747671079
gm = 7440.90314
radius = 2098.33429289
atmoHgt = 0
bodycolor = gray
canBeCentral = 0
canBeArriveDepart = 1
parent = Sun
name = Eeloo
id = 16

This is what I have now, and I'm getting reasonable results only for Eve and Duna. Any ideas?

Link to comment
Share on other sites

Hi there, quick noob question. I've been trying to do an Eve->Duna Flyby for a probe mission. How do I import the kerbal departure burn node from ksptot? I'm VERY new to this software and have tried everything (that I can think of) to no avail.

Link to comment
Share on other sites

Go back to the main window, open the "KSP Real Time System" menu, click "Upload Maneuver", and manually copy the departure burn properties into the window.

I haven't gotten it to work right the one time I tried it (the maneuver node appeared, but it didn't lead to an intercept), but that might have been because I tried to schedule a maneuver several weeks in advance.

Link to comment
Share on other sites

I had the same problem as well . I also wasn't sure if I should use the universal time for the departure or the time past periaps. This is confusing stuff. You'd think it was rocket science or something.

Link to comment
Share on other sites

  • 3 weeks later...
Glad to hear you're still working on this, Arrowstar. I'll definitely be looking forward to taking the new version for a spin.

Hello!My name is kehengsite,and I am studying Space Debris Sheilding Design at HIT,something about Hpyervelocity Impact.

In my sparetime,I love play Orbiter very much,especially interplanetary flight.In those process,I find that it's very hard to

determine when I should depart from Earth to far away planets(such as Pluto) using Multi-Slingshots.Finally,I found your

excelent software Trajectory Optimization Tool.I just wondering how it works,so I found your another excelent program

KSP TOT's recently,and realised that it was coded by javascript and matlab.

Since you had opened the source code of KSP TOT,could you release the source code of Trajectory Optimization Tool,as well.

Because I just have some program skills of Matlab,and I want deep into TOT's way to handle with the Multi-Slingshots.If you

can open TOT's source,could you send an email ([email protected]) to me.Thank you very much!

Looking forward to your reply!

Link to comment
Share on other sites

Hello!My name is kehengsite,and I am studying Space Debris Sheilding Design at HIT,something about Hpyervelocity Impact.

In my sparetime,I love play Orbiter very much,especially interplanetary flight.In those process,I find that it's very hard to determine when I should depart from Earth to far away planets(such as Pluto) using Multi-Slingshots.Finally,I found your excelent software Trajectory Optimization Tool.I just wondering how it works,so I found your another excelent program KSP TOT's recently,and realised that it was coded by javascript and matlab.

Since you had opened the source code of KSP TOT,could you release the source code of Trajectory Optimization Tool,as well.Because I just have some program skills of Matlab,and I want deep into TOT's way to handle with the Multi-Slingshots.If you can open TOT's source,could you send an email ([email protected]) to me.Thanks very much!

Looking forward to your reply!

Link to comment
Share on other sites

Does this mod also work for 23.5 ?

I have tried almost everything i can think of however i can't seem to connect, i have disabled the firewall and even did a portforward to try to connect from a other PC, i did manage however to connect to one rocket on the localhost though.

Also running both the application and the game as admin does not work.

That was also the last time that worked, after i keep getting the error "could not connect - check if ksp is running in flight scene".

The debug window says "[Exception]: InvalidOperationException: Socket is not listening" , not sure if that is related to this tool though.

Link to comment
Share on other sites

It probably doesn't work with 0.23.5 then. :) At the moment I'm too busy to take a look (I've worked 125 hours in the past two weeks), but I'll try to get to it when I can. Perhaps after 0.24 hits the shelves. Thanks for the notice. :)

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