Jump to content

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


Recommended Posts

9 hours ago, Drew Kerman said:

@Arrowstar does the new figure rendering still allow anti-aliasing?

Did the old figure rendering not?  I haven't touched anything in that regard, and honestly, I'm not sure how much control MATLAB gives me over rendering at that level anyway.  Are you seeing something different?

Quote

Also do you agree MA/LVD should have the Rotate Figure option selected on load?

Yeah, this probably isn't a bad idea. (EDIT: Done for both MA and LVD, will be in next pre-release, which is coming today.)

Edited by Arrowstar
Link to comment
Share on other sites

3 hours ago, Arrowstar said:

Are you seeing something different?

Yea here is a figure rendered in previous releases, with smooth lines:

NSooNpw.png

here is one from the latest PR

LzDpjyT.png

Note how jagged the lines are as anti-aliasing (line smoothing) seems to be either switched off or no longer supported

Edited by Drew Kerman
Link to comment
Share on other sites

1 hour ago, Drew Kerman said:

Yea here is a figure rendered in previous releases, with smooth lines:

<snip>

here is one from the latest PR

<snip>

Note how jagged the lines are as anti-aliasing (line smoothing) seems to be either switched off or no longer supported

As far as I can tell, the difference is that MATLAB is now using OpenGL as the render instead of the built-in "painters" renderer (which, admittedly, is far, far slower).  Switching to painters gave the look you showed before but at the cost of a lot of performance.  Not sure there's anything I can do about this one (in this version of MATLAB, anyway).

Link to comment
Share on other sites

25 minutes ago, Arrowstar said:

As far as I can tell, the difference is that MATLAB is now using OpenGL as the render instead of the built-in "painters" renderer (which, admittedly, is far, far slower).  Switching to painters gave the look you showed before but at the cost of a lot of performance.  Not sure there's anything I can do about this one (in this version of MATLAB, anyway).

eh, it's a minor quibble. Obviously I prefer the anti-aliasing look better (cause who likes jaggies anyways) but it's not like the graphing isn't still perfectly functional. If possible, would still like the option to enable as once planning is over and I want to publish mission details I don't need performance anymore. If not possible to switch on in app, a separate build with the option toggled would work (as a manual thing for me to switch to the alternate .exe, not asking you to bother making it user-friendly or anything)

Edited by Drew Kerman
Link to comment
Share on other sites

39 minutes ago, Drew Kerman said:

eh, it's a minor quibble. Obviously I prefer the anti-aliasing look better (cause who likes jaggies anyways) but it's not like the graphing isn't still perfectly functional. If possible, would still like the option to enable as once planning is over and I want to publish mission details I don't need performance anymore

Done, it's in the view settings dialog of LVD, under the profile description text box.  Set to OpenGL for faster rendering and Painters for (what I hope is) the style you had before.

Link to comment
Share on other sites

15 minutes ago, Arrowstar said:

Done, it's in the view settings dialog of LVD, under the profile description text box.  Set to OpenGL for faster rendering and Painters for (what I hope is) the style you had before.

Note tho that the plots I showed you were from MA. Able to put the option there too?

Link to comment
Share on other sites

2 minutes ago, Drew Kerman said:

Note tho that the plots I showed you were from MA. Able to put the option there too?

Wait, this is happening in MA?  That makes no sense, because I haven't touched anything in MA between the past two builds that I can recall lol.  I honestly don't get what's going on, but I'll try to figure it out.

Link to comment
Share on other sites

Alright, here is KSPTOT v1.6.6 pre-release 7.  Here's the change log:

  • LVD: Added ground objects, which allow users to model stations and vehicles that primarily exist on or move relative to the surface of a celestial body. 
    • The view settings also allow rendering these ground objects in the display window, and ground track and line of sight can also be viewed. 
    • Graphical analysis tasks allow you to plot ground object quantities over time.
  • MA/LVD: Updated line of sight calculations (again), this time they should finally be right.
  • MA/LVD: Added the ability to change the renderer between OpenGL and Painters.
Edited by Arrowstar
Link to comment
Share on other sites

38 minutes ago, Arrowstar said:

MA/LVD: Added the ability to change the renderer between OpenGL and Painters.

Hrm, nope this wasn't the problem. When I turn on Painters it seems to just make everything bolder, not softer. It also has no effect when I pop out the figure into a new window.

Edited by Drew Kerman
Link to comment
Share on other sites

3 hours ago, Drew Kerman said:

Hrm, nope this wasn't the problem. When I turn on Painters it seems to just make everything bolder, not softer. It also has no effect when I pop out the figure into a new window.

Well drat.  I honestly don't know then.  Only that and the "Graphics Smoothing" option could have any impact to the way things are rendered, but I've played with Graphics Smoothing and it has no effect here.

Link to comment
Share on other sites

5 hours ago, Drew Kerman said:

Hrm, nope this wasn't the problem. When I turn on Painters it seems to just make everything bolder, not softer. It also has no effect when I pop out the figure into a new window.

I know what the issue is.  When I enabled edge transparency for the celestial body spheres, for some reason that broke the anti-aliasing and turns it off.  I haven't found a work around yet, but you can imagine that's pretty frustrating.  It might be a bug or limitation in this version of MATLAB, it certainly seems that way.

I'll keep digging.

EDIT: I just tried on my work computer using the latest version of MATLAB and it's still an issue.  This is definitely an internal bug with using surface edge transparency and anti-aliasing.

Edited by Arrowstar
Link to comment
Share on other sites

19 hours ago, Drew Kerman said:

bummer. Well, hopefully Matlab will address it at some point. Thx for looking into it

I talked to the MathWorks today and they confirmed it was a known issue.  They put in an enhancement request for me on my behalf, but I think that's as far as it'll go for now.  Best I can do is to create a user setting allowing for the transparency to be adjusted by the user so that anti-aliasing gets enabled or disabled.

EDIT: I added that edge transparency view option and rebuilt the application.  I've re-uploaded PR7 with the new feature.

Edited by Arrowstar
Link to comment
Share on other sites

4 minutes ago, DeltaDizzy said:

How well does TOT work for planning multistep transfers to very inclined bodies? (like Ulysses if it was rendezvousing with a comet)

If you're using the flybys to get out there, the multi-flyby maneuver sequencer would be fine for a quick initial analysis.  Otherwise, either Mission Architect or Launch Vehicle Designer, both of which solve general trajectory design problems, would work great, though the learning curve can be a bit steep on those two.

Link to comment
Share on other sites

2 hours ago, Arrowstar said:

If you're using the flybys to get out there, the multi-flyby maneuver sequencer would be fine for a quick initial analysis.  Otherwise, either Mission Architect or Launch Vehicle Designer, both of which solve general trajectory design problems, would work great, though the learning curve can be a bit steep on those two.

Well the flyby is only to change the inclination, which is why I had wondered about it.

Link to comment
Share on other sites

Just a minor update for next pre-release: all numeric text boxes in KSPTOT should now be able to handle more complex mathematical operations.  Basic trig functions, exponents (using "^" symbol),  square roots (using "sqrt()" function), and logarithms are supported, as are the constants PI (3.14159...) and eps (representation of the numeric precision of your computer, usually around 1E-16).  Parenthesis are now also supported.

I also found an fixed a few UI bugs with the GUIs that allow for Universal Elements that have existed through PR7, and those fixes will be coming next PR too.

Edited by Arrowstar
Link to comment
Share on other sites

Hi, I'm still struggling to get this MFMS trajectory into the Mission Architect:

Spoiler

	Hyperbolic Departure & Flyby Orbits
---------------------------------------------
Hyperbolic Departure Orbit from Kerbin
---------------------------------------------
Semi-major Axis =               -2409.9127 km
Eccentricity =                  1.331572424
Inclination =                   8.2676 deg
Right Ascension of AN =         71.8684 deg
Argument of Periapse =          356.3252 deg
---------------------
Out. Hyp. Vel. Vect Rt. Asc. =  -152.8308 deg
Out. Hyp. Vel. Vect Declin. =   5.8358 deg
Out. Hyp. Vel. Magnitude =      1.210556607 km/s
---------------------------------------------
Inbound Hyperbolic Flyby Orbit to Eve
---------------------------------------------
Semi-major Axis =               -1383.1471 km
Eccentricity =                  1.571161253
Inclination =                   166.5095 deg
Right Ascension of AN =         86.4688 deg
Argument of Periapse =          189.4027 deg
Periapse Radius =               790.0000 km
---------------------------------------------
Outbound Hyperbolic Flyby Orbit from Eve
---------------------------------------------
Semi-major Axis =               -562.7562 km
Eccentricity =                  2.4038
Inclination =                   166.5095 deg
Right Ascension of AN =         86.4688 deg
Argument of Periapse =          189.4027 deg
Periapse Radius =               790.0000 km
---------------------
Out. Hyp. Vel. Vect Rt. Asc. =  141.7366 deg
Out. Hyp. Vel. Vect Declin. =   -11.1533 deg
Out. Hyp. Vel. Magnitude =      3.810630582 km/s
---------------------------------------------
Inbound Hyperbolic Flyby Orbit to Jool
---------------------------------------------
Semi-major Axis =               -44515.4351 km
Eccentricity =                  10.570038925
Inclination =                   171.3331 deg
Right Ascension of AN =         267.7893 deg
Argument of Periapse =          72.7211 deg
Periapse Radius =               426014.4464 km
---------------------------------------------
Outbound Hyperbolic Flyby Orbit from Jool
---------------------------------------------
Semi-major Axis =               -44515.4358 km
Eccentricity =                  10.57
Inclination =                   171.3331 deg
Right Ascension of AN =         267.7893 deg
Argument of Periapse =          72.7211 deg
Periapse Radius =               426014.4464 km
---------------------
Out. Hyp. Vel. Vect Rt. Asc. =  99.5079 deg
Out. Hyp. Vel. Vect Declin. =   1.7733 deg
Out. Hyp. Vel. Magnitude =      2.519274182 km/s
---------------------------------------------
Inbound Hyperbolic Orbit to Kerbin
---------------------------------------------
Inb. Hyp. Vel. Vect Rt. Asc. =  126.8587 deg
Inb. Hyp. Vel. Vect Declin. =   1.8235 deg
Inb. Hyp. Vel. Magnitude =      2.9233 km/s



Sun-Centric Transfer Orbits
---------------------------------------------
Phase 1 Transfer Orbit (Kerbin -> Eve)
---------------------------------------------
Semi-major Axis =            11082816.2414 km
Eccentricity =                  0.232249064
Inclination =                   0.8646 deg
Right Ascension of AN =         277.3990 deg
Argument of Periapse =          189.5445 deg
Period =                     6770638.2441 sec
Departure True Anomaly =        170.4555 deg
Arrival True Anomaly =          289.2041 deg
Num. Full Revs Prior to Arrival = 0.0000
---------------------------------------------
Phase 2 Transfer Orbit (Eve -> Jool)
---------------------------------------------
Semi-major Axis =            45081436.3965 km
Eccentricity =                  0.785014675
Inclination =                   1.5572 deg
Right Ascension of AN =         245.2726 deg
Argument of Periapse =          159.5443 deg
Period =                    55545774.8056 sec
Departure True Anomaly =        351.3244 deg
Arrival True Anomaly =          194.4073 deg
Num. Full Revs Prior to Arrival = 0.0000
---------------------------------------------
Phase 3 Transfer Orbit (Jool -> Kerbin)
---------------------------------------------
Semi-major Axis =            50095988.5442 km
Eccentricity =                  0.728524864
Inclination =                   0.4366 deg
Right Ascension of AN =         37.1565 deg
Argument of Periapse =          359.8309 deg
Period =                    65066708.4867 sec
Departure True Anomaly =        202.2397 deg
Arrival True Anomaly =          0.1691 deg
Num. Full Revs Prior to Arrival = 0.0000
---------------------------------------------
Kerbin Departure Date = 
                Year 2, Day 116 02:52:01.411
                      (11695921.4107 sec UT)
Eve Arrival Date = 
                Year 2, Day 245 00:09:41.083
                      (14472581.0830 sec UT)
Jool Arrival Date = 
                Year 6, Day 323 05:48:28.557
                      (52984108.5573 sec UT)
Kerbin Arrival Date = 
                Year 8, Day 258 04:33:57.127
                      (69978837.1273 sec UT)
---------------------------------------------
Total Mission Duration = 
              6 Years, 142 Days 01:41:55.717



DV Maneuver Information

---------------------------------------------
Burn Information to Depart Kerbin
---------------------------------------------
Total Delta-V =                 1.1728 km/s
Prograde Delta-V =              1071.9495 m/s
Orbit Normal Delta-V =          461.0637 m/s
Radial Delta-V =                117.5044 m/s
---------------------
Burn True Anomaly =             71.8684 deg
---------------------------------------------
Burn Information to Depart Eve
---------------------------------------------
Total Delta-V =                 0.0000 km/s
Prograde Delta-V =              -0.0001 m/s
Orbit Normal Delta-V =          0.0000 m/s
Radial Delta-V =                -0.0000 m/s
---------------------
Burn True Anomaly =             0.0000 deg
---------------------------------------------
Burn Information to Depart Jool
---------------------------------------------
Total Delta-V =                 0.0000 km/s
Prograde Delta-V =              -0.0000 m/s
Orbit Normal Delta-V =          0.0000 m/s
Radial Delta-V =                -0.0001 m/s
---------------------
Burn True Anomaly =             0.0000 deg
---------------------------------------------
Total Mission Delta-V =         1.1728 km/s

 

I'm following the Solar System Edge tutorial, but no matter how many times I try, the optimizer can't get the inbound orbit for Eve to be anywhere near where it should be. If anyone with more experience would be so kind as to try it and tell me what the trick is I'd be much obliged. I've followed the steps in the tutorial as written, but it's just not working.

Link to comment
Share on other sites

12 hours ago, Drew Kerman said:

upload your mission file so Arrowstar can have a better look at what you are doing

This exactly, please.

In other news, I have a new feature to announce for the math nerds out there: general derivatives and integrals in Launch Vehicle Designer!

Oftentimes in spacecraft mission design, we are interested not in a particular quantity but in its derivative or integral.  For example, we might be interested in the pitch rate of our vehicle, not the pitch angle itself.  Or we might be interested in the range rate to another spacecraft for docking purposes, not our actual range.  That's where these come in.

You can compute the derivative or integral of any quantity available to be computed in Launch Vehicle Designer with this system.  They work exactly like Extrema, too, which means that derivatives and integrals can be used as constraints for optimization and can be output to a plot or text file in Graphical Analysis.

Here's an example of what you end up with when you try this out.  I set up a simple, low Kerbin orbit case and took the derivative of x-position and the integral of x velocity.  In theory, these should match the x velocity and the x position, respectively.  Here are the results.

XwvYQQD.png

Notice how the velocity plot (upper right) and the x position derivative (lower left) plot match?  That's the derivative at work.  Also note how the shape of the x-position plot (upper left) and the x velocity plot (lower right) are the same, just shifted.  Why are they shifted?  Because definite integrals need an offset, and KSPTOT has no way of knowing what that offset should be, so it defaults to 0.0. 

These derivative and integral items are created on the Launch Vehicle menu, "Edit Calculus Calculations."

This feature will be coming in the next pre-release, so stay tuned! :)

Link to comment
Share on other sites

8 hours ago, ra4nd0m said:

Hi. I've got some wierd problem with TOT. It suddenly stopped working. When I launch it it just hangs a few seconds in task manager, then closes itself. What should I do?

after it happens, share somewhere the ksptot.log file you will find in the main KSPTOT folder - actually just copy and paste it here inside a Code block. It's not usually that large

Edited by Drew Kerman
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...