Jump to content

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


Recommended Posts

On 1/9/2019 at 10:30 PM, Drew Kerman said:

So yea here's an updated case file and excel report. Looks like the thrusting is spot on - yay! However I don't think LVD will ever do a good job compensating for a ballistic spin, which likely drags on the rocket enough to slow its ascent compared to the projected values. I'm interested in your opinion on whether the wobble evident in the rocket's actual ascent data (pitch & yaw) could cause the difference in the altitude, velocity and dynamic pressure. Plus the spin itself removes energy from the rocket

Also is it accurate to refer to the Yaw value as Heading?

*YAWN*

Yes, any periodic "wobbling"  around a vector will cause the vehicle to not gain as much altitude as it would otherwise.  This is because when it spins some thrust goes into a vector component not along the velocity vector, and half a revolution later, that component is canceled out by an equal but opposite component.  Energy is wasted on each revolution.

It is okay to refer to Yaw as Heading in that case because, given the way I've defined it, yaw actually is heading in that context. :)

Link to comment
Share on other sites

On 1/11/2019 at 7:12 AM, Arrowstar said:

For anyone who wants to try it out, here's the link to KSPTOT v1.6.1 Linux.  Please make sure you read the readme file, as it explains how to actually run the application via the .sh script and what argument needs to be passed to said script for it to run.

Super cool, thanks! The porkchop plotter isn't working for me though: I installed MCR with no apparent issue (to /opt/MATLAB/MATLAB_Runtime/v93/) and launch KSPTOT with

./run_KSPTrajectoryOptimizationTool.sh /opt/MATLAB/MATLAB_Runtime/v93/

When I click "Compute Porkchop Plot" the progress window appears, then nothing happens - the progress bar never shows any activity and the KSPTrajectoryOptimizationTool process never uses more than 0.5% CPU after having left it for 10+ minutes.

Everything else I've poked at so far looks great though :D:D

Link to comment
Share on other sites

1 hour ago, russm said:

Super cool, thanks! The porkchop plotter isn't working for me though: I installed MCR with no apparent issue (to /opt/MATLAB/MATLAB_Runtime/v93/) and launch KSPTOT with


./run_KSPTrajectoryOptimizationTool.sh /opt/MATLAB/MATLAB_Runtime/v93/

When I click "Compute Porkchop Plot" the progress window appears, then nothing happens - the progress bar never shows any activity and the KSPTrajectoryOptimizationTool process never uses more than 0.5% CPU after having left it for 10+ minutes.

Everything else I've poked at so far looks great though :D:D

Go ahead and redown the package I linked to above.  That should resolve the issue.  Please let me know if you find any more problems! :)

Link to comment
Share on other sites

OK re-downloading now. One other question (where I'm perhaps missing something obvious) - is there any way to import current vehicle state from KSP to MA? I see pushing maneuvers back through KSPTOTConnect, but no way to set the initial MA state (other than hand-transcribing).

Link to comment
Share on other sites

@Arrowstar still not quite right with the porkchop plotter, but at least it's more verbose now:

------------------------------------------
Setting up environment variables
---
LD_LIBRARY_PATH is .:/opt/MATLAB/MATLAB_Runtime/v93//runtime/glnxa64:/opt/MATLAB/MATLAB_Runtime/v93//bin/glnxa64:/opt/MATLAB/MATLAB_Runtime/v93//sys/os/glnxa64:/opt/MATLAB/MATLAB_Runtime/v93//sys/opengl/lib/glnxa64

Invalid MEX-file '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64': Missing dependent shared libraries:
'/usr/local/MATLAB/R2017b/bin/glnxa64/libmwblas.so' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
'libm.so.6' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
'libc.so.6' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'

Missing symbol 'clock' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
Missing symbol '__ctype_toupper_loc' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
Missing symbol 'daxpy_' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
Missing symbol 'ddot_' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
Missing symbol 'dgemm_' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
Missing symbol 'dgemv_' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
Missing symbol 'dger_' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
Missing symbol 'dsyr2k_' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
Missing symbol 'dsyrk_' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
Missing symbol 'memcpy' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
Missing symbol 'saxpy_' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
Missing symbol 'sdot_' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
Missing symbol 'sgemm_' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
Missing symbol 'sgemv_' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
Missing symbol 'sger_' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
Missing symbol 'sin' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
Missing symbol 'sqrt' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
Missing symbol 'ssyr2k_' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
Missing symbol 'ssyrk_' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
Missing symbol '__stack_chk_fail' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
Missing symbol 'strcmp' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
Missing symbol 'sysconf' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'.

Error in lambert_vector (line 36)


Error in computePorkChopData (line 78)


Error in generatePorkChopPlot (line 28)


Error in mainGUI>testPorkChopper_Callback (line 376)


Error in gui_mainfcn (line 95)


Error in mainGUI (line 42)


Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)mainGUI('testPorkChopper_Callback',hObject,eventdata,guidata(hObject))

Error using waitforallfiguresclosed (line 9)
Error while evaluating UIControl Callback.

The "Invalid MEX-file" line and following appear when I click "Compute Porkchop Plot". Looks like something's expecting your build environment at /usr/local/MATLAB/R2017b/ instead of the portable MCR environment. If I put symlinks under /usr/local/MATLAB to fake it out then the porkchop plotter works fine, but if there's an obvious fix in the build settings that'd be nice.

Many thanks for this!

Link to comment
Share on other sites

issue in the Comm Network Analysis tool. MAT file.

I have it setup like this:

UArO3vz.png

The Standard model craps out after a bit of calculation. The other two models calculate all the way through but I'm not using either of them (I'm using RemoteTech without any root or range modification settings). If you want to make the analysis error out immediately, set the Start Time to the end UT of the coast to apokee event.

Also it asks you where to save the analysis file even though I have a saved MAT file. Can it instead mirror the behavior of the GA tool and just save the comm analysis under the name and location of the MAT file, but if you have an unsaved MAT file it asks you for a location?

Also also the Ground Station edit window has Tab focus jumping around

Link to comment
Share on other sites

7 hours ago, Drew Kerman said:

issue in the Comm Network Analysis tool. MAT file.

I have it setup like this:

UArO3vz.png

The Standard model craps out after a bit of calculation. The other two models calculate all the way through but I'm not using either of them (I'm using RemoteTech without any root or range modification settings). If you want to make the analysis error out immediately, set the Start Time to the end UT of the coast to apokee event.

Also it asks you where to save the analysis file even though I have a saved MAT file. Can it instead mirror the behavior of the GA tool and just save the comm analysis under the name and location of the MAT file, but if you have an unsaved MAT file it asks you for a location?

Also also the Ground Station edit window has Tab focus jumping around

  1. "Standard" model error resolved for next release.
  2. Yes, I could do this.  Would not be hard.  I'll implement it for v1.6.2.
  3. Ground Station tab order issue resolved.
22 hours ago, russm said:

OK re-downloading now. One other question (where I'm perhaps missing something obvious) - is there any way to import current vehicle state from KSP to MA? I see pushing maneuvers back through KSPTOTConnect, but no way to set the initial MA state (other than hand-transcribing).

Yes, there is!  Right click on any area that holds an orbit and you should see dialog boxes for importing the orbit from either an SFS file or from KSP using the KSPTOTConnect plugin.

21 hours ago, russm said:

@Arrowstar still not quite right with the porkchop plotter, but at least it's more verbose now:


------------------------------------------
Setting up environment variables
---
LD_LIBRARY_PATH is .:/opt/MATLAB/MATLAB_Runtime/v93//runtime/glnxa64:/opt/MATLAB/MATLAB_Runtime/v93//bin/glnxa64:/opt/MATLAB/MATLAB_Runtime/v93//sys/os/glnxa64:/opt/MATLAB/MATLAB_Runtime/v93//sys/opengl/lib/glnxa64

Invalid MEX-file '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64': Missing dependent shared libraries:
'/usr/local/MATLAB/R2017b/bin/glnxa64/libmwblas.so' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
'libm.so.6' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
'libc.so.6' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'

Missing symbol 'clock' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
Missing symbol '__ctype_toupper_loc' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
Missing symbol 'daxpy_' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
Missing symbol 'ddot_' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
Missing symbol 'dgemm_' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
Missing symbol 'dgemv_' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
Missing symbol 'dger_' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
Missing symbol 'dsyr2k_' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
Missing symbol 'dsyrk_' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
Missing symbol 'memcpy' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
Missing symbol 'saxpy_' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
Missing symbol 'sdot_' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
Missing symbol 'sgemm_' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
Missing symbol 'sgemv_' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
Missing symbol 'sger_' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
Missing symbol 'sin' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
Missing symbol 'sqrt' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
Missing symbol 'ssyr2k_' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
Missing symbol 'ssyrk_' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
Missing symbol '__stack_chk_fail' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
Missing symbol 'strcmp' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'
Missing symbol 'sysconf' required by '/home/russm/.mcrCache9.3/KSPTra0/helper_methods/math/mtimesx/mtimesx.mexa64'.

Error in lambert_vector (line 36)


Error in computePorkChopData (line 78)


Error in generatePorkChopPlot (line 28)


Error in mainGUI>testPorkChopper_Callback (line 376)


Error in gui_mainfcn (line 95)


Error in mainGUI (line 42)


Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)mainGUI('testPorkChopper_Callback',hObject,eventdata,guidata(hObject))

Error using waitforallfiguresclosed (line 9)
Error while evaluating UIControl Callback.

The "Invalid MEX-file" line and following appear when I click "Compute Porkchop Plot". Looks like something's expecting your build environment at /usr/local/MATLAB/R2017b/ instead of the portable MCR environment. If I put symlinks under /usr/local/MATLAB to fake it out then the porkchop plotter works fine, but if there's an obvious fix in the build settings that'd be nice.

Many thanks for this!

Yeah, something is goofy with that.  I'll have to see if I can't build it with that file included or something (though it should be in the MCR... so I'm not sure what the deal is).  If there's not a way to resolve this by changing the way that MEX file is built, any suggestions for something I can include in the download ZIP to handle this directly?  I really don't have much Linux experience...

Link to comment
Share on other sites

30 minutes ago, Arrowstar said:

Yes, there is!  Right click on any area that holds an orbit and you should see dialog boxes for importing the orbit from either an SFS file or from KSP using the KSPTOTConnect plugin.

Cool, I assumed it was in there somewhere but hadn't found it :)

31 minutes ago, Arrowstar said:

Yeah, something is goofy with that.  I'll have to see if I can't build it with that file included or something (though it should be in the MCR... so I'm not sure what the deal is).  If there's not a way to resolve this by changing the way that MEX file is built, any suggestions for something I can include in the download ZIP to handle this directly?  I really don't have much Linux experience...

The problem isn't a missing file in the bundled app, but rather for *one* of the built executable objects (helper_methods/math/mtimesx/mtimesx.mexa64) it's looking for the BLAS library where it's installed on your build host and only in that location, rather than using the system tools for finding libraries (which would find the MCR version wherever that's installed).

If you can't see a way to chage/fix that the simple workaround for end users is to either a) install MCR to the specific path "/usr/local/MATLAB/R2017b", or b) put a symlink at "/usr/local/MATLAB/R2017b" that points to wherever MCR is installed.

I've done b) and everything seems to be working fine. I hate to recommend doing it that way since it's an ugly workaround rather than an actual solution, but it's certainly good enough so *shrug* I guess it'll do.

 

As an aside, it looks like Matlab under linux doesn't play well with HiDPI displays :confused:

ilrR8vs.png

Link to comment
Share on other sites

Just wondering, is there any reason (other than "historical reasons") for the distinction between constraints and the optimisation objective function? Is there a way to change the weighting of different constraints for the constraint violation metric?

Link to comment
Share on other sites

15 hours ago, russm said:

Cool, I assumed it was in there somewhere but hadn't found it :)

The problem isn't a missing file in the bundled app, but rather for *one* of the built executable objects (helper_methods/math/mtimesx/mtimesx.mexa64) it's looking for the BLAS library where it's installed on your build host and only in that location, rather than using the system tools for finding libraries (which would find the MCR version wherever that's installed).

If you can't see a way to chage/fix that the simple workaround for end users is to either a) install MCR to the specific path "/usr/local/MATLAB/R2017b", or b) put a symlink at "/usr/local/MATLAB/R2017b" that points to wherever MCR is installed.

I've done b) and everything seems to be working fine. I hate to recommend doing it that way since it's an ugly workaround rather than an actual solution, but it's certainly good enough so *shrug* I guess it'll do.

Assuming I wanted to go the second route and have Linux users create a symlink as you described, could you provide me some easy to follow instructions I can post in the OP of this thread for them to follow?

Quote

As an aside, it looks like Matlab under linux doesn't play well with HiDPI displays :confused:

Yes, this is a known bug with MATLAB.  You'll need to disable HiDPI scaling for KSPTOT in order to get things to show up correctly.  There's not much I can do about it.  Sorry! :(

8 hours ago, russm said:

Just wondering, is there any reason (other than "historical reasons") for the distinction between constraints and the optimisation objective function? Is there a way to change the weighting of different constraints for the constraint violation metric?

MATLAB's fmincon function, which is the most full-featured optimizer in the package, treats the objective function and constraints differently.  I could dig into the algorithms more, but that's the gist of it.  There isn't a way to change the weighting in Mission Architect (it tries to pick it intelligently).  It Launch Vehicle Designer, constraints do have a scale factor you can set that works essentially as you described.

On 1/12/2019 at 3:10 PM, Drew Kerman said:

Also it asks you where to save the analysis file even though I have a saved MAT file. Can it instead mirror the behavior of the GA tool and just save the comm analysis under the name and location of the MAT file, but if you have an unsaved MAT file it asks you for a location?

Implemented for next release.

Link to comment
Share on other sites

8 minutes ago, Drew Kerman said:

two outstanding issues I'm still wondering about:

  1. what did I do wrong when I combined the 4 engines to get such a short burn time?
  2. how did the script propagate when the terminating event never occurred?

Oh sure.  Can you send me the mat file that shows these?

Link to comment
Share on other sites

3 hours ago, Arrowstar said:

Assuming I wanted to go the second route and have Linux users create a symlink as you described, could you provide me some easy to follow instructions I can post in the OP of this thread for them to follow?

The simplest is "You *must* install MCR to the path /usr/local/MATLAB/R2017b/ for KSPTOT to work. Once MCR is installed in the correct location you should have a file /usr/local/MATLAB/R2017b/MCR_license.txt present on your Linux system."

3 hours ago, Arrowstar said:

Yes, this is a known bug with MATLAB.  You'll need to disable HiDPI scaling for KSPTOT in order to get things to show up correctly.  There's not much I can do about it.  Sorry!

Yeah it's clearly a MATLAB issue. I just pointed it out for lulz, not with any expectation you could do anything about it. :)

And now a couple of questions:

* When departing a planet I think I understand the reason for splitting the long coast into a "to next SoI" and a "to body periapsis", but it makes me (probably pointlessly) nervous about triggering on an inferior SoI instead of the superior one. Is there any downside (significant calculation cost?) to instead using Coast > to Function Value > Central Body ID to ensure that segment only ever triggers when expected?

* Is it viable to add a "minimise delta-v" optimisation target? If my initial parking orbit isn't great but I find an ejection burn with significant normal/radial components, it'd be nice to be able to constrain on arrival bodyID/UT and then go back to optimise the parking orbit elements with a target of minimising delta-v. Is this a dumb approach?

Link to comment
Share on other sites

1 hour ago, Drew Kerman said:

two outstanding issues I'm still wondering about:

  1. what did I do wrong when I combined the 4 engines to get such a short burn time?
  2. how did the script propagate when the terminating event never occurred?
  1. The issue in the 4x example case is that the initial state for the SRB-S engines 2, 3, and 4 is "inactive".  This causes the runtime on the script to be 4x longer. :)
  2. The script terminates because the minimum altitude of -1 km is reached.  This is configuration in the integration settings.  I'll try to put a warning in for this for the next release. :)
    1. EDIT: Done for next release.
Edited by Arrowstar
Link to comment
Share on other sites

4 minutes ago, russm said:

* When departing a planet I think I understand the reason for splitting the long coast into a "to next SoI" and a "to body periapsis", but it makes me (probably pointlessly) nervous about triggering on an inferior SoI instead of the superior one. Is there any downside (significant calculation cost?) to instead using Coast > to Function Value > Central Body ID to ensure that segment only ever triggers when expected?

* Is it viable to add a "minimise delta-v" optimisation target? If my initial parking orbit isn't great but I find an ejection burn with significant normal/radial components, it'd be nice to be able to constrain on arrival bodyID/UT and then go back to optimise the parking orbit elements with a target of minimising delta-v. Is this a dumb approach?

  1. I wouldn't worry too much about triggering inferior SoI transitions.  Work on setting up the SoI transition you want first and make it stable so that perturbations to the script don't send you somewhere you don't want to go, and then use the "Go to Next SoI transition" event.  As far as what you're talking about with the function value... you could do something like that in theory, but it'd be pretty touchy and prone to failure I think.  Best to not use the Central Body ID stuff as much as possible (because it has no slope or anything to help the optimizer key off of).
  2. You can minimize delta-v by using the "maximize spacecraft mass" objective function.  It does the same thing in the end. :)
    1. It's not a dumb approach at all actually.  I do something like that myself.  Just use the maximize spacecraft mass objective function and you should be all set.
Link to comment
Share on other sites

Can I get some MA advice?

I'm trying to do a Kerbin-Eve-Eve-Jool flight, and I can't get my desired first Eve approach. I'm following the basic script of the Solar System's Edge tutorial.

I hit Eve's SoI, added constraints for UT and the plane of the Eve inbound hyperbolic trajectory, and got those correct. But when I add constraints for Eccentricity and either SMA or Periapse Radius the solver can't get those final parameters right. I've also tried locking all the departure variables and adding a deep space maneuver at various points on the Kerbin to Eve coast, and it still can't seem to find a way to get the SMA and eccentricity right - they don't get closer than several %. Based on the constraint ranges in the tutorial I'm assuming this isn't near close enough. My current .mat file and the MFMS info I'm trying to follow are at https://ufile.io/w4bo3

Thanks!

Edited by russm
Link to comment
Share on other sites

I have been working on something for a bit now that I can finally share!  In Launch Vehicle Designer, one thing that has not been capable up until now is to look at the minimum or maximum values of some quantity.  For example, want to constraint maximum dynamic pressure during your lift off and ascend?  This is not possible in KSPTOT v1.6.1.  However, it is now. :)  I call the new feature "Extrema", as that's what they are.

CZvx0jS.png

These are plots of dynamic pressure.  The top is the straight up quantity: it is the time history of dynamic pressure during some ascent from Kerbin to orbit.  The bottom plot, however, is the time history of the maximum dynamic pressure.  This means that as dynamic pressure goes up, the maximum keeps increasing.  However, after the peak dynamic pressure (when dynamic pressure starts dropping), the maximum stays up where it was at the peak.

This allows you to set constraints for, say maximum dynamic pressure or minimum altitude or any such thing.  Just about every quantity in the Graphical Analysis tool is available for use as Extrema, and of course both minimum and maximum extrema are available.

I look forward to seeing how the KSPTOT community makes use of this. :)

Link to comment
Share on other sites

17 hours ago, russm said:

Can I get some MA advice?

I'm trying to do a Kerbin-Eve-Eve-Jool flight, and I can't get my desired first Eve approach. I'm following the basic script of the Solar System's Edge tutorial.

I hit Eve's SoI, added constraints for UT and the plane of the Eve inbound hyperbolic trajectory, and got those correct. But when I add constraints for Eccentricity and either SMA or Periapse Radius the solver can't get those final parameters right. I've also tried locking all the departure variables and adding a deep space maneuver at various points on the Kerbin to Eve coast, and it still can't seem to find a way to get the SMA and eccentricity right - they don't get closer than several %. Based on the constraint ranges in the tutorial I'm assuming this isn't near close enough. My current .mat file and the MFMS info I'm trying to follow are at https://ufile.io/w4bo3

Thanks!

Thanks for the file.  I took a look but didn't have much luck that was better than you.  I did notice that since it's your eccentricity (or really, SMA, since with the radius of periapsis constraint in there, they are one in the same) that won't come in, you might consider adding another course correction maneuver just before arrival to Eve's SoI.  Or, just insert the 32 m/s Eve departure burn and let that try to make up the difference.  You'd need to remove the constraints on the inbound Eve orbit and put them into the outbound Eve orbit.  That's better practice anyway, really since if you've got the time and outbound orbits figured out, then it really doesn't matter much.  Also keep in mind that the MFMS output makes the infinitesimal SoI assumption, so those outbound/inbound orbits are only approximate anyway.   If you can't get a constraint to come in, you can always drop it and try to let the optimizer figure out the mission without that constraint.

Let me know if you have any more questions! :)

Link to comment
Share on other sites

MA Bug: selecting Optimization > Re-optimize Mission fails ("There was an error optimizing the mission script: Index exceeds array dimensions")

Is re-optimize meant to do anything different to just re-running the solver with the last-used settings?

Link to comment
Share on other sites

Hi everyone,

Here is a link to KSPTOT v1.6.2 pre-release 3. This file is about twice as big as the previous pre-releases as I wanted to push out a Linux v1.6.2 release to see how that goes for people.  Feel free to delete the files you don't need after downloading. :)

The change log is pretty straightforward:

  • LVD: Added "extrema" to allow for recording and constraining of minimum and maximum values of various quantities.
  • Lots of bug fixes as discussed above.

Please note that if you're a Linux user and you don't have the MATLAB Compiler Runtime installed, you need to install it at "/usr/local/MATLAB/R2017b/ " for the software to work.

Please let me know if you find any bugs or problems.  Thanks! :)

1 minute ago, russm said:

MA Bug: selecting Optimization > Re-optimize Mission fails ("There was an error optimizing the mission script: Index exceeds array dimensions")

Is re-optimize meant to do anything different to just re-running the solver with the last-used settings?

I think I actually just fixed this bug in the latest v1.6.2 pre-release, so check out what I just posted.

And yes, that's all it does is rerun the optimizer with the last settings.  It's a convenience, nothing more. :)

Link to comment
Share on other sites

FWIW the packaged Linux executables don't have their execution bit correctly set - after unzipping you'll need to run

chmod +x run_KSPTrajectoryOptimizationTool.sh KSPTrajectoryOptimizationTool

to fix that (this only needs to be done once after unzipping), and then launch KSPTOT from within the extracted directory like so:

./run_KSPTrajectoryOptimizationTool.sh /usr/local/MATLAB/R2017b/

 

Link to comment
Share on other sites

12 minutes ago, russm said:

FWIW the packaged Linux executables don't have their execution bit correctly set - after unzipping you'll need to run


chmod +x run_KSPTrajectoryOptimizationTool.sh KSPTrajectoryOptimizationTool

to fix that (this only needs to be done once after unzipping), and then launch KSPTOT from within the extracted directory like so:


./run_KSPTrajectoryOptimizationTool.sh /usr/local/MATLAB/R2017b/

 

I'll add it to the instructions, thanks. :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...