Jump to content

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


Recommended Posts

10 minutes ago, Razgriz1 said:

Yes the error is repeatable.  I did reinstall the 2021a MCR, and it still throws this error. It looks like the 'funfun' folder referenced does not get installed by the MCR installer.  I also tried "borrowing" the 'funfun' folder from my R2018b MATLAB installation to see if that would fix it, but then it threw an out-of-memory error from a likely infinite recursion, although I don't know if that was just because of the older Matlab version I pulled it from. I don't have R2021a installed on my machine so I cannot test it out in a full MATLAB environment for you.

I'm developing on R2021a and I haven't seen this issue before.  Weird!

Can you verify that "C:\Program Files\MATLAB\MATLAB Runtime\v910\toolbox\matlab\funfun" actually doesn't exist?  How far up the path do you need to go before you get to a folder that does exist?

12 minutes ago, Razgriz1 said:

Yes the error is repeatable.  I did reinstall the 2021a MCR, and it still throws this error. It looks like the 'funfun' folder referenced does not get installed by the MCR installer.  I also tried "borrowing" the 'funfun' folder from my R2018b MATLAB installation to see if that would fix it, but then it threw an out-of-memory error from a likely infinite recursion, although I don't know if that was just because of the older Matlab version I pulled it from. I don't have R2021a installed on my machine so I cannot test it out in a full MATLAB environment for you.

Also, when you reinstalled it, did you redownload or just reinstall from the file you had?  I see that the MCR has been updated to R2021a Update 2, which could fix the issue maybe.

Link to comment
Share on other sites

Just now, Arrowstar said:

I'm developing on R2021a and I haven't seen this issue before.  Weird!

Can you verify that "C:\Program Files\MATLAB\MATLAB Runtime\v910\toolbox\matlab\funfun" actually doesn't exist?  How far up the path do you need to go before you get to a folder that does exist?

The folder above it exists (i.e. \toolbox\matlab\) and it contains some other folders, but not that one. same thing for v93 (whatever the previous version of the MCR you had used was...)

Link to comment
Share on other sites

@Arrowstar (And all that wanna help ^^)

Hi !

I'm looking at your example ("lvdExample_ToEelooViaJool_BackPropExample.mat"), and trying to reproduce it on a flyby Eve mission (kerbin => Eve => Kerbin).

First, I'm trying to figure out all these differents steps :

In orbit around kerbin, with specified initial state. (round orbit at 400km of sea, because SMA 1000km, with almost null eccentricity).

First event, coast to departure burn. Just wait the specified amount of time. And an action at the end : the burn itself

Second event, coast to Jool +. waiting time, probably until peri of Jool

And after that, Jool flyby peri state -, coast to jool -, and Jool flyby peri state +

I don't really understand what those event are doing. As far as I understand, the "state -" set the aerobraking parameters, then the "coast -" is the time in atmosphere, and "state +" is the state when the ship is just out of atmosphere. Is that correct ?

 

I can see that your event are very-well timed, how can it be done ? MFMS give me numbers, but they don't exactly fit. For example, If I don't make a coast event to almost what is given by MFMS, then a coast event to true anomaly given by MFMS, and only a coast event to the time given, I would end up in a bigger orbit than kerbin, so not really close to Eve. So I don't really know what I have to tweak ?

I see that there is a mission objective : the total vessel mass. What is that ? Why can't it be "fly by Eve" ? How could I make the LVD tweak the burn to flyby eve and come back to kerbin ?

Edited by Sppion1
Link to comment
Share on other sites

Hello,

So no one knows ? Or is everyone busy ?

My main question is to know how I make LVD tweak my treajectories to really flyby Eve, and not just close to its orbit as its the case with MFMS values I entered in LVD ?

Link to comment
Share on other sites

On 5/31/2021 at 9:34 AM, Sppion1 said:

@Arrowstar (And all that wanna help ^^)

Hi !

I'm looking at your example ("lvdExample_ToEelooViaJool_BackPropExample.mat"), and trying to reproduce it on a flyby Eve mission (kerbin => Eve => Kerbin).

First, I'm trying to figure out all these differents steps :

In orbit around kerbin, with specified initial state. (round orbit at 400km of sea, because SMA 1000km, with almost null eccentricity).

First event, coast to departure burn. Just wait the specified amount of time. And an action at the end : the burn itself

Second event, coast to Jool +. waiting time, probably until peri of Jool

And after that, Jool flyby peri state -, coast to jool -, and Jool flyby peri state +

I don't really understand what those event are doing. As far as I understand, the "state -" set the aerobraking parameters, then the "coast -" is the time in atmosphere, and "state +" is the state when the ship is just out of atmosphere. Is that correct ?

 

I can see that your event are very-well timed, how can it be done ? MFMS give me numbers, but they don't exactly fit. For example, If I don't make a coast event to almost what is given by MFMS, then a coast event to true anomaly given by MFMS, and only a coast event to the time given, I would end up in a bigger orbit than kerbin, so not really close to Eve. So I don't really know what I have to tweak ?

I see that there is a mission objective : the total vessel mass. What is that ? Why can't it be "fly by Eve" ? How could I make the LVD tweak the burn to flyby eve and come back to kerbin ?

Sorry about the delay, it's been a very busy week for me.

The general idea is that at each flyby, you create a flyby periapsis state and then propagate it backwards (to the previous flyby or the Kerbin departure orbit) and forwards (to the next flyby).  You then constrain for position, velocity, and time continuity at the points where each forward propagated deep space trajectory meets up with the next backwards one.  I call these points "patch points."

The flyby state is optimized and defined using universal elements.  You generally constrain the C3 to be greater than zero (plus a small bit), set the minimum radius of periapsis to be above the atmosphere, and allow the inclination, RAAN, and argument of periapsis to vary.  The time past periapsis should not be constrained and should be set to 0.0 seconds.  Optimize the time of that state as well, maybe +/- 10% of what comes out of MFMS.

As an initial guess for each flyby state, use the flyby orbit that comes out of MFMS.  You might need to convert the SMA and eccentricity to C3 and radius of periapsis, but this isn't hard: the math is on Wikipedia or you can enter the MFMS orbit in Keplerian elements and then switch to universal elements.  It should do the element set conversion for you.  Make sure to optimize the flyby orbit as I described because what comes out of MFMS will not be perfect.

Does that help any?  Have you made any progress?

Quote

I see that there is a mission objective : the total vessel mass. What is that ? Why can't it be "fly by Eve" ? How could I make the LVD tweak the burn to flyby eve and come back to kerbin ?

You want to find the maneuvers that minimize the total fuel expended.  Optimization functions need to be numeric in nature and not just "do this thing."  You define the thing you want to do (in this case, flyby Eve) by the structure of your mission profile.

Link to comment
Share on other sites

Been trying to figure this out for a bit, hopefully someone can help :)

I play on RSS/RO/RP1 and have a few craft with the dV to get to Mars, sitting in low lunar orbit at the moment. I have a Mars window coming up in about a week. How could I use ToT to plan a burn from Lunar orbit to get to Mars during this window? I'm having a really tough time and the tutorials don't seem at all specific to this kind of situation. Thanks ahead of time :)

Link to comment
Share on other sites

19 hours ago, sjsharks39 said:

Been trying to figure this out for a bit, hopefully someone can help :)

I play on RSS/RO/RP1 and have a few craft with the dV to get to Mars, sitting in low lunar orbit at the moment. I have a Mars window coming up in about a week. How could I use ToT to plan a burn from Lunar orbit to get to Mars during this window? I'm having a really tough time and the tutorials don't seem at all specific to this kind of situation. Thanks ahead of time :)

Here's roughly what I would do in this case:

  1. Use the porkchop plot function in the main KSPTOT window to figure out your departure and arrival times.  Use Kerbin instead of the Mun here.
  2. Use Launch Vehicle Designer (LVD)  to put together the mission plan starting in low Mun orbit and going out to a Dyna flyby or orbit insertion.

I've done step 2 for you as a template you can use for yourself.  Take a look at this file in LVD and poke around to see what I did.  Basically I just start in Munar orbit, put in a coast to the departure delta-v, and coast outwards to some point in interplanetary space.  I then jump to Duna, optimize the insertion orbit, and propagate backwards to the same point in interplanetary space.  Constraints ensure that the forwards and backwards propagated trajectories meet up at the same time with the same position and velocity.

Let me know if you have any questions! :)

Link to comment
Share on other sites

On 6/12/2021 at 6:30 PM, Arrowstar said:

Here's roughly what I would do in this case:

  1. Use the porkchop plot function in the main KSPTOT window to figure out your departure and arrival times.  Use Kerbin instead of the Mun here.
  2. Use Launch Vehicle Designer (LVD)  to put together the mission plan starting in low Mun orbit and going out to a Dyna flyby or orbit insertion.

I've done step 2 for you as a template you can use for yourself.  Take a look at this file in LVD and poke around to see what I did.  Basically I just start in Munar orbit, put in a coast to the departure delta-v, and coast outwards to some point in interplanetary space.  I then jump to Duna, optimize the insertion orbit, and propagate backwards to the same point in interplanetary space.  Constraints ensure that the forwards and backwards propagated trajectories meet up at the same time with the same position and velocity.

Let me know if you have any questions! :)

I have literally never used ToT before so I hope I can figure this out when I dive in with that in mind. Thank you! I will very certainly have questions but I'll bang my head at it a bit to have more pointed questions than "Where the heck do I start" lol

Link to comment
Share on other sites

On 6/4/2021 at 3:36 AM, Arrowstar said:

Sorry about the delay, it's been a very busy week for me.

The general idea is that at each flyby, you create a flyby periapsis state and then propagate it backwards (to the previous flyby or the Kerbin departure orbit) and forwards (to the next flyby).  You then constrain for position, velocity, and time continuity at the points where each forward propagated deep space trajectory meets up with the next backwards one.  I call these points "patch points."

The flyby state is optimized and defined using universal elements.  You generally constrain the C3 to be greater than zero (plus a small bit), set the minimum radius of periapsis to be above the atmosphere, and allow the inclination, RAAN, and argument of periapsis to vary.  The time past periapsis should not be constrained and should be set to 0.0 seconds.  Optimize the time of that state as well, maybe +/- 10% of what comes out of MFMS.

As an initial guess for each flyby state, use the flyby orbit that comes out of MFMS.  You might need to convert the SMA and eccentricity to C3 and radius of periapsis, but this isn't hard: the math is on Wikipedia or you can enter the MFMS orbit in Keplerian elements and then switch to universal elements.  It should do the element set conversion for you.  Make sure to optimize the flyby orbit as I described because what comes out of MFMS will not be perfect.

Does that help any?  Have you made any progress?

You want to find the maneuvers that minimize the total fuel expended.  Optimization functions need to be numeric in nature and not just "do this thing."  You define the thing you want to do (in this case, flyby Eve) by the structure of your mission profile.

I think I'm on the way,

I just can't have the set kinematic state right : MFMS give me the hyperbolic in/out orbit. Which is quite comprehensible, as I only fly by the planet. But when I enter those into LVD kinematic state and convert to universal elements... well, I got back default values. And I can't seem to find those universal elements on wiki... I do have found this, which are the keplerian elements you do have, but nothing on "universal elements", or any system that matches the C3 and other parameters... I might be really tired, but I can't see it right now.

Any help on this ?

And thank for akk of this :)

Link to comment
Share on other sites

14 hours ago, Sppion1 said:

MFMS give me the hyperbolic in/out orbit. Which is quite comprehensible, as I only fly by the planet. But when I enter those into LVD kinematic state and convert to universal elements... well, I got back default values.

I'm going to need a bit more information.  Do you get an error?  Can you provide the LVD MAT file and what you're trying to enter (with a step by step process)?

Quote

And I can't seem to find those universal elements on wiki... I do have found this, which are the keplerian elements you do have, but nothing on "universal elements", or any system that matches the C3 and other parameters... I might be really tired, but I can't see it right now.

Universal elements are probably not a standard element set, it's just what I and some coworkers call them.  They are useful for defining hyperbolic orbits. They are the same as the Keplerian orbital elements you found except:

  • SMA is replaced with C3 energy.  C3 is a measure, in some sense, of total mechanical energy of the orbit.  It is positive when the orbit is hyperbolic and negative when the orbit is elliptical.  See the Wiki article I linked for more information.  For flyby orbits, constrain to be above 0.0 km^2/s^2 (I usually use the following range of C3s for lower and upper bounds: 0.0001 to 10).
  • Eccentricity is replaced with radius of periapsis.  This is useful because we generally know the flyby periapsis we want or at least a minimum (don't hit the surface!) we want.
  • True anomaly is replaced with the time past periapsis.  This is positive if you've flown by the periapsis point and negative if you're still coming up on it.  Set to zero to get the minimum flyby altitude for a flyby orbit.

Hope that helps!  Let me know if you have any other questions.

Link to comment
Share on other sites

3 hours ago, Arrowstar said:

I'm going to need a bit more information.  Do you get an error?  Can you provide the LVD MAT file and what you're trying to enter (with a step by step process)?

I figured it out : Needed to save before changing back to universal elements... My bad.

Thanks for all those clarification. I do still have some problems, but I can't figure it out. One of these is that script propagation take much more time for my file than yours... I don't really know why. (It also says it reached min alt of -1 km at some point. Which is kinda bad, this rapid disasembly wasn't planned....)

If you have enough time to see it :

https://drive.google.com/file/d/1tW8LTinOQDId5veJSwVFXQPl7D1PbI5u/view?usp=sharing

With data from MFMS :

Spoiler

Hyperbolic Departure & Flyby Orbits
---------------------------------------------
Hyperbolic Departure Orbit from Kerbin
---------------------------------------------
Semi-major Axis =               -3676.1349 km
Eccentricity =                  1.183606951
Inclination =                   21.4058 deg
Right Ascension of AN =         68.6153 deg
Argument of Periapse =          339.0147 deg
---------------------
Out. Hyp. Vel. Vect Rt. Asc. =  -162.7311 deg
Out. Hyp. Vel. Vect Declin. =   17.0213 deg
Out. Hyp. Vel. Magnitude =      0.980144336 km/s
---------------------------------------------
Inbound Hyperbolic Flyby Orbit to Eve
---------------------------------------------
Semi-major Axis =               -2644.4174 km
Eccentricity =                  1.298742567
Inclination =                   144.1453 deg
Right Ascension of AN =         66.0588 deg
Argument of Periapse =          176.1610 deg
Periapse Radius =               790.0001 km
---------------------------------------------
Outbound Hyperbolic Flyby Orbit from Eve
---------------------------------------------
Semi-major Axis =               -2644.4225 km
Eccentricity =                  1.2987
Inclination =                   144.1453 deg
Right Ascension of AN =         66.0588 deg
Argument of Periapse =          176.1610 deg
Periapse Radius =               790.0001 km
---------------------
Out. Hyp. Vel. Vect Rt. Asc. =  103.6118 deg
Out. Hyp. Vel. Vect Declin. =   -23.7719 deg
Out. Hyp. Vel. Magnitude =      1.757889558 km/s
---------------------------------------------
Inbound Hyperbolic Orbit to Kerbin
---------------------------------------------
Inb. Hyp. Vel. Vect Rt. Asc. =  107.4272 deg
Inb. Hyp. Vel. Vect Declin. =   9.4356 deg
Inb. Hyp. Vel. Magnitude =      2.3644 km/s

 

Sun-Centric Transfer Orbits
---------------------------------------------
Phase 1 Transfer Orbit (Kerbin -> Eve)
---------------------------------------------
Semi-major Axis =            11422069.6327 km
Eccentricity =                  0.190685951
Inclination =                   1.9697 deg
Right Ascension of AN =         285.7632 deg
Argument of Periapse =          180.7265 deg
Period =                     7083886.8634 sec
Departure True Anomaly =        179.2735 deg
Arrival True Anomaly =          312.0152 deg
Num. Full Revs Prior to Arrival = 0.0000
---------------------------------------------
Phase 2 Transfer Orbit (Eve -> Kerbin)
---------------------------------------------
Semi-major Axis =            12833601.4039 km
Eccentricity =                  0.257550291
Inclination =                   2.5492 deg
Right Ascension of AN =         273.0748 deg
Argument of Periapse =          117.5033 deg
Period =                     8436789.8414 sec
Departure True Anomaly =        27.9172 deg
Arrival True Anomaly =          242.4967 deg
Num. Full Revs Prior to Arrival = 0.0000
---------------------------------------------
Kerbin Departure Date =
                Year 2, Day 126 02:15:56.843
                      (11909756.8433 sec UT)
Eve Arrival Date =
                Year 2, Day 261 00:13:22.593
                      (14818402.5927 sec UT)
Kerbin Arrival Date =
                Year 3, Day 111 02:41:57.136
                      (20788917.1360 sec UT)
---------------------------------------------
Total Mission Duration =
                       411 Days 00:26:00.293

 

DV Maneuver Information

---------------------------------------------
Burn Information to Depart Kerbin
---------------------------------------------
Total Delta-V =                 1.5703 km/s
Prograde Delta-V =              787.8473 m/s
Orbit Normal Delta-V =          1189.3300 m/s
Radial Delta-V =                656.3150 m/s
---------------------
Burn True Anomaly =             272.0383 deg
---------------------------------------------
Burn Information to Depart Eve
---------------------------------------------
Total Delta-V =                 0.0000 km/s
Prograde Delta-V =              -0.0006 m/s
Orbit Normal Delta-V =          0.0000 m/s
Radial Delta-V =                -0.0000 m/s
---------------------
Burn True Anomaly =             0.0000 deg
---------------------------------------------
Total Mission Delta-V =         1.5703 km/s

 

Link to comment
Share on other sites

4 hours ago, Sppion1 said:

I figured it out : Needed to save before changing back to universal elements... My bad.

Thanks for all those clarification. I do still have some problems, but I can't figure it out. One of these is that script propagation take much more time for my file than yours... I don't really know why. (It also says it reached min alt of -1 km at some point. Which is kinda bad, this rapid disasembly wasn't planned....)

If you have enough time to see it :

https://drive.google.com/file/d/1tW8LTinOQDId5veJSwVFXQPl7D1PbI5u/view?usp=sharing

With data from MFMS :

  Reveal hidden contents

Hyperbolic Departure & Flyby Orbits
---------------------------------------------
Hyperbolic Departure Orbit from Kerbin
---------------------------------------------
Semi-major Axis =               -3676.1349 km
Eccentricity =                  1.183606951
Inclination =                   21.4058 deg
Right Ascension of AN =         68.6153 deg
Argument of Periapse =          339.0147 deg
---------------------
Out. Hyp. Vel. Vect Rt. Asc. =  -162.7311 deg
Out. Hyp. Vel. Vect Declin. =   17.0213 deg
Out. Hyp. Vel. Magnitude =      0.980144336 km/s
---------------------------------------------
Inbound Hyperbolic Flyby Orbit to Eve
---------------------------------------------
Semi-major Axis =               -2644.4174 km
Eccentricity =                  1.298742567
Inclination =                   144.1453 deg
Right Ascension of AN =         66.0588 deg
Argument of Periapse =          176.1610 deg
Periapse Radius =               790.0001 km
---------------------------------------------
Outbound Hyperbolic Flyby Orbit from Eve
---------------------------------------------
Semi-major Axis =               -2644.4225 km
Eccentricity =                  1.2987
Inclination =                   144.1453 deg
Right Ascension of AN =         66.0588 deg
Argument of Periapse =          176.1610 deg
Periapse Radius =               790.0001 km
---------------------
Out. Hyp. Vel. Vect Rt. Asc. =  103.6118 deg
Out. Hyp. Vel. Vect Declin. =   -23.7719 deg
Out. Hyp. Vel. Magnitude =      1.757889558 km/s
---------------------------------------------
Inbound Hyperbolic Orbit to Kerbin
---------------------------------------------
Inb. Hyp. Vel. Vect Rt. Asc. =  107.4272 deg
Inb. Hyp. Vel. Vect Declin. =   9.4356 deg
Inb. Hyp. Vel. Magnitude =      2.3644 km/s

 

Sun-Centric Transfer Orbits
---------------------------------------------
Phase 1 Transfer Orbit (Kerbin -> Eve)
---------------------------------------------
Semi-major Axis =            11422069.6327 km
Eccentricity =                  0.190685951
Inclination =                   1.9697 deg
Right Ascension of AN =         285.7632 deg
Argument of Periapse =          180.7265 deg
Period =                     7083886.8634 sec
Departure True Anomaly =        179.2735 deg
Arrival True Anomaly =          312.0152 deg
Num. Full Revs Prior to Arrival = 0.0000
---------------------------------------------
Phase 2 Transfer Orbit (Eve -> Kerbin)
---------------------------------------------
Semi-major Axis =            12833601.4039 km
Eccentricity =                  0.257550291
Inclination =                   2.5492 deg
Right Ascension of AN =         273.0748 deg
Argument of Periapse =          117.5033 deg
Period =                     8436789.8414 sec
Departure True Anomaly =        27.9172 deg
Arrival True Anomaly =          242.4967 deg
Num. Full Revs Prior to Arrival = 0.0000
---------------------------------------------
Kerbin Departure Date =
                Year 2, Day 126 02:15:56.843
                      (11909756.8433 sec UT)
Eve Arrival Date =
                Year 2, Day 261 00:13:22.593
                      (14818402.5927 sec UT)
Kerbin Arrival Date =
                Year 3, Day 111 02:41:57.136
                      (20788917.1360 sec UT)
---------------------------------------------
Total Mission Duration =
                       411 Days 00:26:00.293

 

DV Maneuver Information

---------------------------------------------
Burn Information to Depart Kerbin
---------------------------------------------
Total Delta-V =                 1.5703 km/s
Prograde Delta-V =              787.8473 m/s
Orbit Normal Delta-V =          1189.3300 m/s
Radial Delta-V =                656.3150 m/s
---------------------
Burn True Anomaly =             272.0383 deg
---------------------------------------------
Burn Information to Depart Eve
---------------------------------------------
Total Delta-V =                 0.0000 km/s
Prograde Delta-V =              -0.0006 m/s
Orbit Normal Delta-V =          0.0000 m/s
Radial Delta-V =                -0.0000 m/s
---------------------
Burn True Anomaly =             0.0000 deg
---------------------------------------------
Total Mission Delta-V =         1.5703 km/s

 

I don't think your file worked on Google Drive.  It's showing up as 0 bytes.  Can you check that?

Link to comment
Share on other sites

21 hours ago, Sppion1 said:

I figured it out : Needed to save before changing back to universal elements... My bad.

Thanks for all those clarification. I do still have some problems, but I can't figure it out. One of these is that script propagation take much more time for my file than yours... I don't really know why. (It also says it reached min alt of -1 km at some point. Which is kinda bad, this rapid disasembly wasn't planned....)

If you have enough time to see it :

https://drive.google.com/file/d/1tW8LTinOQDId5veJSwVFXQPl7D1PbI5u/view?usp=sharing

With data from MFMS :

  Reveal hidden contents

Hyperbolic Departure & Flyby Orbits
---------------------------------------------
Hyperbolic Departure Orbit from Kerbin
---------------------------------------------
Semi-major Axis =               -3676.1349 km
Eccentricity =                  1.183606951
Inclination =                   21.4058 deg
Right Ascension of AN =         68.6153 deg
Argument of Periapse =          339.0147 deg
---------------------
Out. Hyp. Vel. Vect Rt. Asc. =  -162.7311 deg
Out. Hyp. Vel. Vect Declin. =   17.0213 deg
Out. Hyp. Vel. Magnitude =      0.980144336 km/s
---------------------------------------------
Inbound Hyperbolic Flyby Orbit to Eve
---------------------------------------------
Semi-major Axis =               -2644.4174 km
Eccentricity =                  1.298742567
Inclination =                   144.1453 deg
Right Ascension of AN =         66.0588 deg
Argument of Periapse =          176.1610 deg
Periapse Radius =               790.0001 km
---------------------------------------------
Outbound Hyperbolic Flyby Orbit from Eve
---------------------------------------------
Semi-major Axis =               -2644.4225 km
Eccentricity =                  1.2987
Inclination =                   144.1453 deg
Right Ascension of AN =         66.0588 deg
Argument of Periapse =          176.1610 deg
Periapse Radius =               790.0001 km
---------------------
Out. Hyp. Vel. Vect Rt. Asc. =  103.6118 deg
Out. Hyp. Vel. Vect Declin. =   -23.7719 deg
Out. Hyp. Vel. Magnitude =      1.757889558 km/s
---------------------------------------------
Inbound Hyperbolic Orbit to Kerbin
---------------------------------------------
Inb. Hyp. Vel. Vect Rt. Asc. =  107.4272 deg
Inb. Hyp. Vel. Vect Declin. =   9.4356 deg
Inb. Hyp. Vel. Magnitude =      2.3644 km/s

 

Sun-Centric Transfer Orbits
---------------------------------------------
Phase 1 Transfer Orbit (Kerbin -> Eve)
---------------------------------------------
Semi-major Axis =            11422069.6327 km
Eccentricity =                  0.190685951
Inclination =                   1.9697 deg
Right Ascension of AN =         285.7632 deg
Argument of Periapse =          180.7265 deg
Period =                     7083886.8634 sec
Departure True Anomaly =        179.2735 deg
Arrival True Anomaly =          312.0152 deg
Num. Full Revs Prior to Arrival = 0.0000
---------------------------------------------
Phase 2 Transfer Orbit (Eve -> Kerbin)
---------------------------------------------
Semi-major Axis =            12833601.4039 km
Eccentricity =                  0.257550291
Inclination =                   2.5492 deg
Right Ascension of AN =         273.0748 deg
Argument of Periapse =          117.5033 deg
Period =                     8436789.8414 sec
Departure True Anomaly =        27.9172 deg
Arrival True Anomaly =          242.4967 deg
Num. Full Revs Prior to Arrival = 0.0000
---------------------------------------------
Kerbin Departure Date =
                Year 2, Day 126 02:15:56.843
                      (11909756.8433 sec UT)
Eve Arrival Date =
                Year 2, Day 261 00:13:22.593
                      (14818402.5927 sec UT)
Kerbin Arrival Date =
                Year 3, Day 111 02:41:57.136
                      (20788917.1360 sec UT)
---------------------------------------------
Total Mission Duration =
                       411 Days 00:26:00.293

 

DV Maneuver Information

---------------------------------------------
Burn Information to Depart Kerbin
---------------------------------------------
Total Delta-V =                 1.5703 km/s
Prograde Delta-V =              787.8473 m/s
Orbit Normal Delta-V =          1189.3300 m/s
Radial Delta-V =                656.3150 m/s
---------------------
Burn True Anomaly =             272.0383 deg
---------------------------------------------
Burn Information to Depart Eve
---------------------------------------------
Total Delta-V =                 0.0000 km/s
Prograde Delta-V =              -0.0006 m/s
Orbit Normal Delta-V =          0.0000 m/s
Radial Delta-V =                -0.0000 m/s
---------------------
Burn True Anomaly =             0.0000 deg
---------------------------------------------
Total Mission Delta-V =         1.5703 km/s

 

The reason your propagation is taking so long is because you're coasting for 6 days in low Kerbin orbit.  This is a big no-no.  Adjust the start time of the simulation forward so that you only have to coast for ~1 or ~2 revs in LKO.

EDIT: Also, on event 7, I think you misunderstood what I had written before.  Your C3 needs to be positive when you set the kinematic state.  Yours was negative and so you were just orbiting Kerbin for many days.  Change the bounds to positive 0.001 to positive 10 and the C3 energy to 1 (or whatever) to start.  The case runs much more smoothly when you do this (not to mention you actually will get a result...).

EDIT 2: A few other things for you to check on:

  1. There are a few events which you intended to propagate backwards but actually they went forwards.
  2. Your Eve periapsis state is actually defined around Kerbin, so go ahead and change the reference frame to fix that.
  3. Your Eve periapsis state has a weirdly low Rp lower bound.  Set this to 800 and make the upper bound like 2000 km or something.  You don't want to get too close to the center of mass of a planet, it messes with the integrator.
Edited by Arrowstar
Link to comment
Share on other sites

@Arrowstar

Thanks so much for your replies ! It work much more smoothly, yes !

A few questions (again, I know)...

If I adjust the time of initial state, it's not really my orbit, right ? It shouldn't make a hugr difference, but I imagine recompute datas when I'll close to departure date won't hurt ?

If on event 7 C3 is positive, it means it has enough energy to leave kerbin soi, no ? Or is it evaluated at start of event i.e before decceleration burn, so it's the hyperbolic inbound trajectory ? In this case, how do I force him to compute the decceleration burn to leave my vessel in orbit, an not in escape trajectory ?

How do I know if propagation went backward or forward ? I don't really know which event are supposed to propagate in which direction. I understood that there is the "initial state" (here, kerbin escape trajectory), the "flyby peri state" (here, eve periapsis), the "final state" (here, back to kerbin orbit). in between , we propagate each state backward and forward to meet up somewhere and adjust course. But which event refers to what ? The minus event are backwards and + forwards ?

And last question (of the post...) : how do I know  that I really end up in eve orbit ? It's nowhere in the end, as the right panel always says "sun orbit- mission segment x/y Events i-j" ?

Thanks again for helping me understanding all this. The file link is still the same, file up-to-date with your corrections (https://drive.google.com/file/d/1-z_PtvkVjMEjlSYP-XcsQ3tbenDArjKz/view?usp=sharing)

Link to comment
Share on other sites

@Arrowstar

Ok, seen backward and forward propagation options. I also changed the force model to 2 body model for propagation, at same event as in your exemple. The graphics does not show curves but straight lines for some events now, even if the point move along a curve ^^

looks like I've got something, but still no sure of that. I don't know how to check...

I think I got something, worth a shot I think. Will be in July unfortunately.... If you have any more things to check they are welcome. Thanks a lot for your help, your tools, your time, all of 'em :) !

Link to comment
Share on other sites

  • 2 weeks later...

Aand it's me again, noticed a problem.
I want to meet a comet, it's on a very eccentric and inclined orbit. I've done that before, but now the orbital info I'm getting from savefile shows that the inclination of the comet is a negative 12 deg. The rendezvous tool won't allow that so now I'm kinda stuck.

I'm on latest TOT version and KSP 1.12. Perhaps there were some changes with how orbits are calculated, dunno.

I think I fixed it by changing the argument of periapsis to 180, but still not sure if that gives good result, only the orbit in preview looks correct.

Link to comment
Share on other sites

1 minute ago, The Aziz said:

Aand it's me again, noticed a problem.
I want to meet a comet, it's on a very eccentric and inclined orbit. I've done that before, but now the orbital info I'm getting from savefile shows that the inclination of the comet is a negative 12 deg. The rendezvous tool won't allow that so now I'm kinda stuck.

I'm on latest TOT version and KSP 1.12. Perhaps there were some changes with how orbits are calculated, dunno.

I think I fixed it by changing the argument of periapsis to 180, but still not sure if that gives good result, only the orbit in preview looks correct.

Can you share the save file and tell me which comet it is you're trying to go to?

Link to comment
Share on other sites

https://we.tl/t-8KL9h5MdzQ

It's called Wilfurt 1 or something like that. I do not have any ships orbiting the sun currently at desired position so I just used Kerbin orbit parameters as starting point.

EDIT: I think I see where the problem is. New objects generated by the game appear to be on negative inclinations for some reason. I shall  investigate it further, because it looks like it's not the tool's fault.

Edited by The Aziz
Link to comment
Share on other sites

17 minutes ago, The Aziz said:

https://we.tl/t-8KL9h5MdzQ

It's called Wilfurt 1 or something like that. I do not have any ships orbiting the sun currently at desired position so I just used Kerbin orbit parameters as starting point.

Well that is the weirdest thing in KSP I've ever seen.  Negative inclination makes no sense and shouldn't be output.  Mind if I submit your save file as a bug report?

In the mean time, you can use this state in KSPTOT.  It should be equivalent to what's in your save file.

Keplerian State 
	Time: 63961720.905 sec UT 
	SMA: 43822373.630 km 
	Ecc: 0.628969614 
	Inc: 12.292 deg 
	RAAN: 180.000 deg 
	Arg Peri: 180.000 deg 
	True Anom: 327.499 deg 
	Frame: Inertial Frame (Origin: Sun)

 

Link to comment
Share on other sites

Hi @Arrowstar !

I'm pretty sure you missed me, right ?

Everything seems to be fine, there is juste one thing : my final arrival time (back to kerbin from eve flyby) is at UT 3600. Which is before the script initial time (about 12 000 000secs). So I was wondereing how it would be possible ?

I would like to see the UT at every event, is this possible ? Here is the link to the updated file, if you want to see it :

https://drive.google.com/file/d/1-z_PtvkVjMEjlSYP-XcsQ3tbenDArjKz/view?usp=sharing

Thanks for all the help :)

Have nice missions !

 

EDIT :

It seems that It is not doable like that : when I try to put the first manoeuver node, I got an orbit far from Eve...

pic : https://drive.google.com/file/d/1B2VX2wQNy8bzzXrqBnTOiCGGBx3JQ1Fm/view?usp=sharing

Edited by Sppion1
Link to comment
Share on other sites

1 hour ago, Sppion1 said:

Hi @Arrowstar !

I'm pretty sure you missed me, right ?

Everything seems to be fine, there is juste one thing : my final arrival time (back to kerbin from eve flyby) is at UT 3600. Which is before the script initial time (about 12 000 000secs). So I was wondereing how it would be possible ?

I would like to see the UT at every event, is this possible ? Here is the link to the updated file, if you want to see it :

https://drive.google.com/file/d/1-z_PtvkVjMEjlSYP-XcsQ3tbenDArjKz/view?usp=sharing

Thanks for all the help :)

Have nice missions !

The Epoch of the Set Kinematic State action in Event 7 is 0.0 seconds.  This is where that is coming from.  You'll need to adjust this to get things to line up.

Link to comment
Share on other sites

1 hour ago, Arrowstar said:

The Epoch of the Set Kinematic State action in Event 7 is 0.0 seconds.  This is where that is coming from.  You'll need to adjust this to get things to line up.

Just saw that --'

I'm afraid this is not the only thing to fix.... Still far away from eve, look a lot more like duna to me...

But just by tweaking time (adding something like 12mns to the maneauver node), I get an encounter of eve. So I get it to work ? Maybe ?

In the orbit display, it's a lot like it jump from one segment to another, with not the same position between all segment, like in the end of the second segment, the ship is close to kerbin orbit, in the third, from beginning to end it is close to eve, while in the fourth it does travel from kerbin to Eve. So did I set patch point right ? Or did I messed up something ?

Still this link, if you want to look at this : https://drive.google.com/file/d/1-z_PtvkVjMEjlSYP-XcsQ3tbenDArjKz/view?usp=sharing

 

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