Jump to content

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


Arrowstar
 Share

Recommended Posts

Well, I can`t get your same results with identical parameters.  Did I forget something ? I think that my ksptot version is different (KSP Trajectory Optimization Tool v1.6.9 PR4 (R2021a))

This is with the default bodiesSolarSystem.ini :

BtTUn4z.jpg

And this picture is with the bodies.ini generated from my ksp (rss+principia)

1eQfO7h.png

Similar results in total deltaV (7500 m/s aprox). I want your 3800 m/s :P

Thanks in advance

 

Link to comment
Share on other sites

15 hours ago, Rach said:

Well, I can`t get your same results with identical parameters.  Did I forget something ? I think that my ksptot version is different (KSP Trajectory Optimization Tool v1.6.9 PR4 (R2021a))

This is with the default bodiesSolarSystem.ini :

BtTUn4z.jpg

And this picture is with the bodies.ini generated from my ksp (rss+principia)

1eQfO7h.png

Similar results in total deltaV (7500 m/s aprox). I want your 3800 m/s :P

Thanks in advance

 

How many times did you try to run the optimizer?  The genetic algorithm underpinning things is semi-random and it's not unusual to see different results from run to run.

Link to comment
Share on other sites

OUUU YEAH!!! :cool:

Definitely there was something broken in the Prerelease4. I tried ten runs with the same results (total dv 7500 m/s in the first burn). Then I downloaded the PR6 version and with only one run  the magic of the mathematics appeared with 4000 m/s total dv (and the calculation was faster than with the previous version). 

Thanks so much Arrowstar. What a  wonderful, and complicated software. Now I have to keep learning.

PD: sorry for my english. Spanish man :sticktongue:

 

Link to comment
Share on other sites

1 hour ago, Rach said:

OUUU YEAH!!! :cool:

Definitely there was something broken in the Prerelease4. I tried ten runs with the same results (total dv 7500 m/s in the first burn). Then I downloaded the PR6 version and with only one run  the magic of the mathematics appeared with 4000 m/s total dv (and the calculation was faster than with the previous version). 

Thanks so much Arrowstar. What a  wonderful, and complicated software. Now I have to keep learning.

PD: sorry for my english. Spanish man :sticktongue:

 

I'm glad it's working for you!  Please let me know if you have any other questions. :)

Link to comment
Share on other sites

Hi everyone,

The other day the latest release of MATLAB, R2022a, was released.  I've been trialing it and I see that I'm actually getting a pretty decent speed boost in LVD, perhaps as much as 10% faster when running cases.  Could I get some help in evaluating if this is more than just something I see?

Here's what I need some folks to do in order to help:

  1. Download and install the R2022a MCR package.
  2. Download the latest (R2021a) pre-release.
  3. Download the same pre-release but for R2022a.
  4. Run the KSPTOT executable in the R2021a PR:
    1. Open up LVD.
    2. Open the LVD MAT file contained in the R2022a pre-release.
    3. Tap control-p 10 times in order to run the script.  Wait for th script to finish running between each tap.
    4. Copy the output window text.  You should see a bunch of lines with data concerning how long the script execution took.
  5. Now run the KSPTOT exectuable from the R2022a pre-release and repeat the process for this new executable (open LVD, load the MAT file, run the script 10x, etc).
  6. In this thread, please copy/paste the two outputs and also provide your CPU and how much RAM you have.

Please let me know if you have any questions.  Thanks, everyone! :)

Link to comment
Share on other sites

1 hour ago, Arrowstar said:

Hi everyone,

The other day the latest release of MATLAB, R2022a, was released.  I've been trialing it and I see that I'm actually getting a pretty decent speed boost in LVD, perhaps as much as 10% faster when running cases.  Could I get some help in evaluating if this is more than just something I see?

Here's what I need some folks to do in order to help:

  1. Download and install the R2022a MCR package.
  2. Download the latest (R2021a) pre-release.
  3. Download the same pre-release but for R2022a.
  4. Run the KSPTOT executable in the R2021a PR:
    1. Open up LVD.
    2. Open the LVD MAT file contained in the R2022a pre-release.
    3. Tap control-p 10 times in order to run the script.  Wait for th script to finish running between each tap.
    4. Copy the output window text.  You should see a bunch of lines with data concerning how long the script execution took.
  5. Now run the KSPTOT exectuable from the R2022a pre-release and repeat the process for this new executable (open LVD, load the MAT file, run the script 10x, etc).
  6. In this thread, please copy/paste the two outputs and also provide your CPU and how much RAM you have.

Please let me know if you have any questions.  Thanks, everyone! :)

Happy to help!

R2021a:

Spoiler

KSP TOT Launch Vehicle Designer v1.6.9 PR6 (R2021a)                                                                         
Written By Arrowstar (C) 2021                                                                                               
##################################################################################                                          
 (15:29:11) Executed mission script in 5.699 seconds.                                                                       
(15:29:27) Loading mission case from "C:\Users\\Desktop\KSPTOT_Comparison\R2022\lvdExample_TwoStageToOrbit.mat"...Done.
 (15:30:21) Parallel optimization mode enabled.                                                                             
 (15:30:27) Executed mission script in 5.576 seconds.                                                                       
 (15:30:45) Executed mission script in 2.251 seconds.                                                                       
 (15:30:49) Executed mission script in 1.703 seconds.                                                                       
 (15:30:53) Executed mission script in 1.605 seconds.                                                                       
 (15:30:56) Executed mission script in 1.725 seconds.                                                                       
 (15:31:00) Executed mission script in 1.643 seconds.                                                                       
 (15:31:15) Executed mission script in 1.514 seconds.                                                                       
 (15:31:19) Executed mission script in 1.531 seconds.                                                                       
 (15:31:22) Executed mission script in 1.495 seconds.                                                                       
 (15:31:25) Executed mission script in 1.596 seconds.                                                                       
 (15:31:44) Executed mission script in 1.672 seconds.                                                                       

R2022a:

Spoiler

KSP TOT Launch Vehicle Designer v1.6.9 PR6 (R2022a)                                                                         
Written By Arrowstar (C) 2021                                                                                               
##################################################################################                                          
 (15:37:11) Executed mission script in 4.822 seconds.                                                                       
(15:37:21) Loading mission case from "C:\Users\\Desktop\KSPTOT_Comparison\R2022\lvdExample_TwoStageToOrbit.mat"...Done.
 (15:38:12) Parallel optimization mode enabled.                                                                             
 (15:38:19) Executed mission script in 6.102 seconds.                                                                       
 (15:38:33) Executed mission script in 2.130 seconds.                                                                       
 (15:38:37) Executed mission script in 1.684 seconds.                                                                       
 (15:38:40) Executed mission script in 1.611 seconds.                                                                       
 (15:38:43) Executed mission script in 1.773 seconds.                                                                       
 (15:38:46) Executed mission script in 1.685 seconds.                                                                       
 (15:38:49) Executed mission script in 1.504 seconds.                                                                       
 (15:38:52) Executed mission script in 1.471 seconds.                                                                       
 (15:38:55) Executed mission script in 1.538 seconds.                                                                       
 (15:38:58) Executed mission script in 1.521 seconds.                                                                       
 (15:39:01) Executed mission script in 1.543 seconds.                                                                       

CPU: AMD Ryzen 5 1600 Six-core

RAM: 24 GB

 

After the Initial setup time, the 2022 release does indeed seem to run the script a bit faster.

Link to comment
Share on other sites

4 hours ago, Razgriz1 said:

Happy to help!

R2021a:

  Reveal hidden contents

KSP TOT Launch Vehicle Designer v1.6.9 PR6 (R2021a)                                                                         
Written By Arrowstar (C) 2021                                                                                               
##################################################################################                                          
 (15:29:11) Executed mission script in 5.699 seconds.                                                                       
(15:29:27) Loading mission case from "C:\Users\\Desktop\KSPTOT_Comparison\R2022\lvdExample_TwoStageToOrbit.mat"...Done.
 (15:30:21) Parallel optimization mode enabled.                                                                             
 (15:30:27) Executed mission script in 5.576 seconds.                                                                       
 (15:30:45) Executed mission script in 2.251 seconds.                                                                       
 (15:30:49) Executed mission script in 1.703 seconds.                                                                       
 (15:30:53) Executed mission script in 1.605 seconds.                                                                       
 (15:30:56) Executed mission script in 1.725 seconds.                                                                       
 (15:31:00) Executed mission script in 1.643 seconds.                                                                       
 (15:31:15) Executed mission script in 1.514 seconds.                                                                       
 (15:31:19) Executed mission script in 1.531 seconds.                                                                       
 (15:31:22) Executed mission script in 1.495 seconds.                                                                       
 (15:31:25) Executed mission script in 1.596 seconds.                                                                       
 (15:31:44) Executed mission script in 1.672 seconds.                                                                       

R2022a:

  Reveal hidden contents

KSP TOT Launch Vehicle Designer v1.6.9 PR6 (R2022a)                                                                         
Written By Arrowstar (C) 2021                                                                                               
##################################################################################                                          
 (15:37:11) Executed mission script in 4.822 seconds.                                                                       
(15:37:21) Loading mission case from "C:\Users\\Desktop\KSPTOT_Comparison\R2022\lvdExample_TwoStageToOrbit.mat"...Done.
 (15:38:12) Parallel optimization mode enabled.                                                                             
 (15:38:19) Executed mission script in 6.102 seconds.                                                                       
 (15:38:33) Executed mission script in 2.130 seconds.                                                                       
 (15:38:37) Executed mission script in 1.684 seconds.                                                                       
 (15:38:40) Executed mission script in 1.611 seconds.                                                                       
 (15:38:43) Executed mission script in 1.773 seconds.                                                                       
 (15:38:46) Executed mission script in 1.685 seconds.                                                                       
 (15:38:49) Executed mission script in 1.504 seconds.                                                                       
 (15:38:52) Executed mission script in 1.471 seconds.                                                                       
 (15:38:55) Executed mission script in 1.538 seconds.                                                                       
 (15:38:58) Executed mission script in 1.521 seconds.                                                                       
 (15:39:01) Executed mission script in 1.543 seconds.                                                                       

CPU: AMD Ryzen 5 1600 Six-core

RAM: 24 GB

 

After the Initial setup time, the 2022 release does indeed seem to run the script a bit faster.

Thanks!

Link to comment
Share on other sites

On 5/28/2021 at 10:53 AM, Razgriz1 said:

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

This bug should be fixed in the re-upload of PR6 that I recreated tonight.  Can you check it out and tell me if it worked?  Sorry it took 10 months to stumble into a fix... :/

Link to comment
Share on other sites

Hi @Arrowstar....is this a bug???

When i press "Compute departure Burn" obtain this error: "Unrecognized field name "departureOrbitRadio"", and an empty information Window than can't close.

mUCXELt.png

 

Thanks in advance!!!

 

Link to comment
Share on other sites

6 hours ago, Rach said:

Hi @Arrowstar....is this a bug???

When i press "Compute departure Burn" obtain this error: "Unrecognized field name "departureOrbitRadio"", and an empty information Window than can't close.

mUCXELt.png

 

Thanks in advance!!!

 

Thanks for the report, I've fixed the bug.  About 5 minutes after this post you can re-download PR6 to get the fixed version.

Link to comment
Share on other sites

Can do:

Quote

KSP TOT Launch Vehicle Designer v1.6.9 PR6 (R2021a)                                                             
Written By Arrowstar (C) 2021                                                                                   
##################################################################################                              
 (12:54:08) Executed mission script in 2.793 seconds.                                                           
(12:54:26) Loading mission case from "D:\Downloads\games\ksp\mods\KSPTOT\lvdExample_TwoStageToOrbit.mat"...Done.
 (12:54:46) Parallel optimization mode enabled.                                                                 
 (12:54:49) Executed mission script in 2.823 seconds.                                                           
 (12:54:59) Executed mission script in 1.388 seconds.                                                           
 (12:55:04) Executed mission script in 1.125 seconds.                                                           
 (12:55:06) Executed mission script in 1.071 seconds.                                                           
 (12:55:09) Executed mission script in 1.118 seconds.                                                           
 (12:55:12) Executed mission script in 1.067 seconds.                                                           
 (12:55:14) Executed mission script in 1.011 seconds.                                                           
 (12:55:16) Executed mission script in 1.009 seconds.                                                           
 (12:55:19) Executed mission script in 1.008 seconds.                                                           
 (12:55:21) Executed mission script in 1.021 seconds.                                                           
 (12:55:24) Executed mission script in 1.008 seconds.                                                           

 

Quote

KSP TOT Launch Vehicle Designer v1.6.9 PR6 (R2022a)                                                             
Written By Arrowstar (C) 2021                                                                                   
##################################################################################                              
 (12:57:38) Executed mission script in 2.252 seconds.                                                           
(12:57:46) Loading mission case from "D:\Downloads\games\ksp\mods\KSPTOT\lvdExample_TwoStageToOrbit.mat"...Done.
 (12:58:09) Parallel optimization mode enabled.                                                                 
 (12:58:12) Executed mission script in 2.895 seconds.                                                           
 (12:58:18) Executed mission script in 1.467 seconds.                                                           
 (12:58:20) Executed mission script in 1.203 seconds.                                                           
 (12:58:23) Executed mission script in 1.067 seconds.                                                           
 (12:58:26) Executed mission script in 1.147 seconds.                                                           
 (12:58:28) Executed mission script in 1.063 seconds.                                                           
 (12:58:31) Executed mission script in 1.047 seconds.                                                           
 (12:58:34) Executed mission script in 1.004 seconds.                                                           
 (12:58:36) Executed mission script in 1.019 seconds.                                                           
 (12:58:38) Executed mission script in 1.009 seconds.                                                           
 (12:58:41) Executed mission script in 1.015 seconds.                                                           

CPU: Intel Core i9-9900K

RAM: 32 GB

Link to comment
Share on other sites

Back to reporting errors. Whenever I try to set a coast to periapsis of Minmus at the moment, the Mission Architect has an Out of Memory error:

https://imgur.com/doKJWf1

Mission file causing the error:

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

As you can see from the screenshot, this is on the 2022 pre-release, but it's doing the same thing for me on the 2021 version.

Link to comment
Share on other sites

Another bug report. I decided to branch out and use the Optimal Two Burn Orbit Change tool, and it's not sending values to the manoeuvre node uploader:

aW2JuEF.png

Both burn 1 & 2 come up all zeroes in the upload screen. Zeroes are in fact what KSP receives. I've tried with both the 2021 and 2022 pr6 versions, same thing.

Link to comment
Share on other sites

2 hours ago, Snoman314 said:

Back to reporting errors. Whenever I try to set a coast to periapsis of Minmus at the moment, the Mission Architect has an Out of Memory error:

https://imgur.com/doKJWf1

Mission file causing the error:

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

As you can see from the screenshot, this is on the 2022 pre-release, but it's doing the same thing for me on the 2021 version.

 

2 hours ago, Snoman314 said:

Another bug report. I decided to branch out and use the Optimal Two Burn Orbit Change tool, and it's not sending values to the manoeuvre node uploader:

aW2JuEF.png

Both burn 1 & 2 come up all zeroes in the upload screen. Zeroes are in fact what KSP receives. I've tried with both the 2021 and 2022 pr6 versions, same thing.

I believe both of these bugs are fixed.  I will upload a new version of PR6 tomorrow.  Thanks for the reports!

Link to comment
Share on other sites

Another bug?  In LVD if I put an Epoch for my initial orbit in, for example, 5 years, the image of the orbit is off center

n5s9rxy.png

And one question: there is much difference between using "KSP-like" and "RSS-like" in gravitational parameter? That option affect only to porkchop plot or also to LVD, MA, MFMS etc?

Link to comment
Share on other sites

3 hours ago, Rach said:

Another bug?  In LVD if I put an Epoch for my initial orbit in, for example, 5 years, the image of the orbit is off center

n5s9rxy.png

I couldn't reproduce the bug you showed.  Does this happen consistently?  Did you change anything in your LVD or KSPTOT settings that might impact this?  Are you using RSS like gravity or something else?

3V1xUI0.png

Quote

And one question: there is much difference between using "KSP-like" and "RSS-like" in gravitational parameter? That option affect only to porkchop plot or also to LVD, MA, MFMS etc?

RSS-like gravity uses the sum of the parent's gravitational parameter and the current body's gravitational parameter to compute the effective gravitational parameter of the parent body.  I would just stick with KSP-like gravitational parameters unless you know what you're doing, it can be a little unintuitive otherwise..

Link to comment
Share on other sites

21 minutes ago, Arrowstar said:

I couldn't reproduce the bug you showed.  Does this happen consistently?

Nop. I couldn't reproduce it more. Inconsistently. I don't know what happened. Sorry

Link to comment
Share on other sites

50 minutes ago, Rach said:

Nop. I couldn't reproduce it more. Inconsistently. I don't know what happened. Sorry

No worries!  It's probably some weird visualization thing.  Next time it happens please check the ksptot.log file and see if there's anything in there you can share with me. :)

Btw, PR6 has been updated again with fixes for the two bugs that were reported yesterday.

Link to comment
Share on other sites

2 hours ago, Arrowstar said:

No worries!  It's probably some weird visualization thing.  Next time it happens please check the ksptot.log file and see if there's anything in there you can share with me. :)

Btw, PR6 has been updated again with fixes for the two bugs that were reported yesterday.

As always, love your work. I feel really fortunate that you're still so reliable at fixing bugs and updating this tool that I love, after all this time.

That said, I think you introduced another bug..

It looks like you fixed the out of memory error for my Minmus encounter scenario, but now it's not detecting the SOI change. I created another similar situation to check:

In-game I've definitely got a Minmus encounter:

q7qmojs.png

And yet when I import that state to MA, I fly straight past (coast set to Periapsis):

ReJ6Sbw.png

The same thing happens with the mission file I originally uploaded. I'm 99% sure that should have been a Minmus encounter as well.

Link to comment
Share on other sites

4 hours ago, Snoman314 said:

As always, love your work. I feel really fortunate that you're still so reliable at fixing bugs and updating this tool that I love, after all this time.

That said, I think you introduced another bug..

It looks like you fixed the out of memory error for my Minmus encounter scenario, but now it's not detecting the SOI change. I created another similar situation to check:

In-game I've definitely got a Minmus encounter:

q7qmojs.png

And yet when I import that state to MA, I fly straight past (coast set to Periapsis):

ReJ6Sbw.png

The same thing happens with the mission file I originally uploaded. I'm 99% sure that should have been a Minmus encounter as well.

Okay, this bug was a pain in the neck that drove me insane for a few hours but I think I've got it figured out.  I see the Minmus encounter too now.  As usual it was a single line of code that, in this case, was missing.  Ah well lol. :)

I've updated PR6.  Can you check this new version out and see if it fixes your bug?  I believe I see it's fixed over here.

Link to comment
Share on other sites

EDIT: Oops! I just realized that I had "Include Arrival Hyp. Excess Velocity (VInf) in Cost Function?" selected. :blush: I was thrown off by the fact that an insertion burn wasn't included in the "DV Maneuver Information" window. When I unticked the option to include the cost of the arrival VInf, I got a result that was very similar to the one from my own code (which is great news!) and it became clear that the penalty score is just total ∆v in km/s.

 

Hi! I have a question about the Multi-Flyby Maneuver Sequencer -- what does the penalty value during the search represent, exactly?

Some context... I'm working on creating what is essentially a web version of the KSPTOT Multi-Flyby Maneuver Sequencer, and I've been testing it against the output from KSPTOT (which has been incredibly useful for debugging). In particular, I've been looking at a Kerbin-Eve-Jool-Eeloo flyby. Here are the results that I get when I run the maneuver sequencer without fiddling with the launch window or the max/min flight times (note the penalty value of ~2.9):

oPnqSKx.png

 

 

When I shrink the launch window and flight time bounds around a solution I've found using my own optimizer that just tries to minimize total ∆v, I get the following results (with a penalty value of ~3.9):

bsgMNPg.png

 

My question is: why does the solution with a lower ∆v (1.8 km/s vs 2.5 km/s) end up with a worse score during the search (3.9 vs 2.9)? Are the scores comparable for different searches, or are they normalized to some intra-search parameter? Is there some aspect of the trajectory in the second case that makes it undesirable?

 

My settings for the second run:

  • Launch Window
    • Open:   57600000 s
    • Close:   57700000 s
  • Kerbin -> Eve
    • Min:   50 days
    • Max:   51 days
  • Eve -> Jool
    • Min:   274 days
    • Max:   275 days
  • Jool -> Eeloo
    • Min:   70.5 days
    • Max:   71.5 days
  • All legs with 0 revolutions
Edited by theAstrogoth
Link to comment
Share on other sites

7 hours ago, Arrowstar said:

Okay, this bug was a pain in the neck that drove me insane for a few hours but I think I've got it figured out.  I see the Minmus encounter too now.  As usual it was a single line of code that, in this case, was missing.  Ah well lol. :)

I've updated PR6.  Can you check this new version out and see if it fixes your bug?  I believe I see it's fixed over here.

Yeah all seems to be fine here now as well. Love your work!

Link to comment
Share on other sites

Right, who wants to see something cool?

For a while now Launch Vehicle Designer (LVD) has had user customizable constraints and objective functions via the Plugins functionality.  Yesterday it occurred to me that the only thing we were missing were user-definable variables, or what I'm calling "plugin variables".   I put something together that's now accessible from the Plugins menu in LVD.

Mrmrqqd.png

Variables can be added and removed in the usual LVD way.  As you can see, each variable can be optimized between bounds that the user defines.  In the above case, I have a variable called "Initial Inclination" that is currently 36.68 deg and is set to be optimized between 0 and 90 degrees.  (The degrees bit is implied.  It's what I understand those numbers to mean as the analyst, but LVD doesn't care.)

So how do we use this?  The values of all plugin variables, regardless of if they are being optimized or not, are passed into the plugins now using a new variable: "pluginVarValues".  This is an array of numbers arranged in the same order as you'd see in the Edit Plugin Variables dialog box (above).   From here you can do anything you want with them.  Here's just one example of a possible use case.  Note that this is just a toy example and the possibilities for what anyone could do with this go far beyond what I'm about to show.

Optimizing an ascent trajectory from the surface of a body to space is complicated and often doesn't mesh well with trying to optimize the rest of the in-space trajectory.  With this new functionality, what users could do is run a bunch of launch trajectories at different launch azimuths, extract the orbit insertion state, and generate a look up table of those states.  You could then create a variable for "launch azimuth" that would be used to interpolate between the rows of your look up table, and the numbers that come out of that are your SMA, inclination, eccentricity, masses, etc.

Here I'm doing something slightly differently.  I'm skipping the launch azimuth bit and just tying orbit insertion inclination to mass in the "upper stage" tank.  This is the variable I created earlier in this post.

To do all this, we'll need to create a new plugin, so let's do that.

zQgR268.png

Let's break down what's going on here in the code first.

%Grab the initial inclination from the plugin variable value
initIncDeg = pluginVarValues(1);
initIncRad = deg2rad(initIncDeg);

This bit grabs the value of the plugin variable, which we know is in degrees, and converts it to radians.

%set the initial inclination in the initial state model's orbit model
%Note: to work the initial state's orbit element set must be Keplerian.
lvdData.initStateModel.orbitModel.inc = initIncRad;

This bit sets the initial inclination of the mission to be the initial inclination from the plugin variable in radians.

%Look up table for initial inclination to fuel in tank
%Pretend launch latitude is 28 deg so that's where we get our highest 
%initial tank mass, with tank mass going lower as you go further north or
%south.
%This table could also be imported from a CSV file using csvread() or from
%Excel using xlsread().
%Table Format: [Initial Inc (deg) | Init Tank Mass (mT)]
xv = [0  3;
      28 3.5;
      90 3];

Here I generate a very simple look up table, with inclination (in degrees) in the left column and tank mass in the right column.  Note that you could eventually set all this up so that this table reads in from a CSV or Excel file.  You definitely don't need to be hand coding it into the plugin like I'm doing here, but this is just a toy example.

%Use linear interpolation to compute the initial tank mass
initTankMass = interp1(xv(:,1), xv(:,2), initIncDeg);  

This bit here sucks in the look up table and linearly interpolates it using the initial inclination in degrees to find the initial tank mass of our upper stage.  The function "interp1" in MATLAB is used for 1D interpolation.

%Set the initial tank mass
lvdData.initStateModel.stageStates(1).tankStates(1).tankMass = initTankMass;

And finally, I take the interpolated tank mass and I put it in the initial state in the right place.

Note that the Plugin Data Explorer is super useful here for figuring out what's in the mission's data (the lvdData variable) that I've referenced a few times.  Use the button in the bottom right of the Plugin Manager UI to access it.

Q76gVTG.png

The last big thing to do is activate the plugin so it runs!  First,  the "Enable Plugins" checkbox in the bottom right must be checked.  Then, we know we want this to kick in before propagation occurs so that the initial inclination and tank mass are updated before the propagation engine does its thing and propagates the trajectory.  To do this, we check the "Execute Before Propagation" checkbox in the upper right.

After setting up this plugin and a few constraints for a target orbit, we can run the optimizer and see that it selects an inclination to maximize the final mass!  Note that the selected inclination isn't the target inclination of 45 degrees, which implies that our optimizer is trading off some initial inclination for a higher initial tank mass.

vVVWDPF.png

And mission accomplished!  This will be a new feature in PR7, and I'm going to make this MAT file an LVD example file for the upcoming release (and I'll put it in the PR7 build too). 

Any questions?

Link to comment
Share on other sites

I'm trying to plan a mission by copying an orbit created by Mission Architect into Rendezvous Maneuver Sequencer, but it gives me an error that the initial orbit mean anomaly at epoch must be within the range [-180, 360] (entered -293). Is there a conversion step I missed?

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.

 Share

×
×
  • Create New...