Jump to content

[WIN/MAC/LINUX] KSP Trajectory Optimization Tool v1.6.10 [Major LVD Improvements!]


Recommended Posts

10 hours ago, Drew Kerman said:

@Arrowstar both PR1 and PR2 of 1.6.4 give me the following error: Operands to the || and && operators must be convertible to logical scalar values

I see this in the Warnings & Alerts section when I create a new file, import data from the game, enter the TA from the imported data into a TA coast event and set the coast number to 1 (so, to propagate a single full orbit of the object). Reverted back to the 1.6.3 final release and it worked as expected

Is this MA or LVD?  Can you send me a mat file that has the error?

Thanks for the report!

Link to comment
Share on other sites

5 hours ago, Drew Kerman said:

MA. File is here, made using PR2.

Okay, fixed!  See KSPTOT v1.6.4 pre-release 3 here.  Here's the change log:

  • Resolved an issue with comparing spacecraft generated body object IDs;
  • LVD: Added patternsearch solver to the available optimization routines.

@Drew Kerman, please let me know if this resolves (or not) your issue. :)

Link to comment
Share on other sites

Hi! I'm not sure if I'm doing something wrong while using KSPTOT.

What I do, in order, is:

  1. Select the 3 bodies (centre, departure and arrival)
  2. Right click on the 'Earliest Departure/Arrival Time' boxes and select to 'Get UT from KSP'
  3. Click to 'Computer Porkchop Plot'
  4. Once done I click on 'Computer Departure Burn'
  5. In the new window I right click on a field in the 'Initial Elliptical Orbit Information' and 'Get Orbit from KSP (Active Vessel)', it populates correctly
  6. Click on 'Compute Departure Burn'
  7. The maneuver looks good, it roughly matches what other DV calculators estimate for the same kind of transfer
  8. I then right click on it and 'Upload maneuver to KSP', I follow through by clicking the red 'Upload Maneuver' button.
  9. The values uploaded to KSP match what was in the window
    But the predicted orbit after maneuver in KSP makes no sense, it's in a completely different plane then needed, Ap does not reach target

Example of Mun to Minmus transfer:

https://imgur.com/a/SPZht7q

Any suggestions what I should do differently?

Link to comment
Share on other sites

1 hour ago, KrisRogo said:

Hi! I'm not sure if I'm doing something wrong while using KSPTOT.

What I do, in order, is:

  1. Select the 3 bodies (centre, departure and arrival)
  2. Right click on the 'Earliest Departure/Arrival Time' boxes and select to 'Get UT from KSP'
  3. Click to 'Computer Porkchop Plot'
  4. Once done I click on 'Computer Departure Burn'
  5. In the new window I right click on a field in the 'Initial Elliptical Orbit Information' and 'Get Orbit from KSP (Active Vessel)', it populates correctly
  6. Click on 'Compute Departure Burn'
  7. The maneuver looks good, it roughly matches what other DV calculators estimate for the same kind of transfer
  8. I then right click on it and 'Upload maneuver to KSP', I follow through by clicking the red 'Upload Maneuver' button.
  9. The values uploaded to KSP match what was in the window
    But the predicted orbit after maneuver in KSP makes no sense, it's in a completely different plane then needed, Ap does not reach target

Example of Mun to Minmus transfer:

https://imgur.com/a/SPZht7q

Any suggestions what I should do differently?

The burn is most likely in the wrong point in the orbit.  Move the maneuver node around until you get the intersection you're looking for. :)

Link to comment
Share on other sites

Hi, wanted to try the Multi Flyby plotter and got an error:

Not enough input arguments.

Error in multiFlybyObjFunc (line 43)
Error in flyByPorkchopPlotterGUI>@(x)multiFlybyObjFunc(x,numRevsArr,wayPtBodies,celBodyData) (line 513)

Error in flyByPorkchopPlotterGUI>computeFlybyPorkchopPlotButton_Callback (line 514)

Error in gui_mainfcn (line 95)

Error in flyByPorkchopPlotterGUI (line 42)

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

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

 

I filled in all of the visible fields, times and waypoint values for everything I could find on the screen. Would you please check?

Edit1: It was a Kerbin-Eve-Jool, and start window was Y2D120 to Y10D1

Edited by Gilph
Link to comment
Share on other sites

5 hours ago, Gilph said:

Hi, wanted to try the Multi Flyby plotter and got an error:

Not enough input arguments.

Error in multiFlybyObjFunc (line 43)
Error in flyByPorkchopPlotterGUI>@(x)multiFlybyObjFunc(x,numRevsArr,wayPtBodies,celBodyData) (line 513)

Error in flyByPorkchopPlotterGUI>computeFlybyPorkchopPlotButton_Callback (line 514)

Error in gui_mainfcn (line 95)

Error in flyByPorkchopPlotterGUI (line 42)

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

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

 

I filled in all of the visible fields, times and waypoint values for everything I could find on the screen. Would you please check?

Edit1: It was a Kerbin-Eve-Jool, and start window was Y2D120 to Y10D1

I couldn't duplicate this, can you give me some more information regarding how to get this error to show up?

Link to comment
Share on other sites

Using v 1.6.3 base version, selected multiflyby porkchop plotter. Sun is central body

First waypoint - Kerbin: min 150 days, max 200 to next

Second waypoint: Eve: min 800, max 1500 to next

Last: Jool

all other settings unchanged. Press button. At the computing delta-v stage, error occurs.

screenshot and log are  Here

Thanks

 

 

 

 

Link to comment
Share on other sites

19 minutes ago, Gilph said:

Using v 1.6.3 base version, selected multiflyby porkchop plotter. Sun is central body

First waypoint - Kerbin: min 150 days, max 200 to next

Second waypoint: Eve: min 800, max 1500 to next

Last: Jool

all other settings unchanged. Press button. At the computing delta-v stage, error occurs.

screenshot and log are  Here

Thanks

Thanks, found it.  Issue will be resolved in next release. :)

Link to comment
Share on other sites

  • 3 weeks later...
2 minutes ago, Drew Kerman said:

hey @Arrowstar good news, kOS has an update with more atmospheric data exposure. I'm not actually playing in KSP 1.7.3 yet but I have gone so far as to set up a version I can launch in. What kind of stuff should I add to my telemetry log that will help you compare ascent performance with LVD?

Hey that's great!  The big things would be atmospheric pressure, atmospheric density, atmospheric temperature, and drag coefficient.  If I can think of anything else, I'll be sure to let you know. :)

Link to comment
Share on other sites

Minor issue, not sure if it's a bug or working as inteded - when I plot out engine activation in the GA the engine stays active even after the stage does not:

oJZ97Se.png

Is it done this way on purpose for some reason and if we want to see an engine shutdown we have to add the event ourselves? I know LVD ignores any engines attached to a disabled stage so I'm not concerned it's still calculating thrust on it. I just thought it would show it deactivated with an inactive stage when plotted as well

Link to comment
Share on other sites

On 8/4/2019 at 11:16 PM, Drew Kerman said:

Minor issue, not sure if it's a bug or working as inteded - when I plot out engine activation in the GA the engine stays active even after the stage does not:

oJZ97Se.png

Is it done this way on purpose for some reason and if we want to see an engine shutdown we have to add the event ourselves? I know LVD ignores any engines attached to a disabled stage so I'm not concerned it's still calculating thrust on it. I just thought it would show it deactivated with an inactive stage when plotted as well

This is working as intended.  The engine's state is still "active" even if the stage is inactive.  This should indicate to the user that if the reactivate the stage, that engine will still be on.

On 8/5/2019 at 1:33 AM, Drew Kerman said:

additional suggestion: have the Optimizer automatically order constraints by the sequential event they are assigned to when you add them?

I'd rather not reorder anything without the user doing it themselves, could be confusing later.  I could always have a button or context menu that reorders by event number for the user, if that would work?

On 8/5/2019 at 4:21 AM, Drew Kerman said:

Altitude of Apoapsis/Periapsis would be good LVD event termination conditions as well no?

These could be done, yes!  Good suggestion. :)

Link to comment
Share on other sites

On 8/5/2019 at 4:21 AM, Drew Kerman said:

Altitude of Apoapsis/Periapsis would be good LVD event termination conditions as well no?

Added for next build (which is hopefully coming tonight).

EDIT: And here it is: KSPTOT v1.6.4 pre-release 4.

Change log:

  • Resolved issue with multi-flyby porkchop plotter.
  • Resolved issue with LVD constraint dialog box.
  • Added periapsis and apoapsis altitude event termination conditions to LVD.

Please let me know if you find any bugs.  Thanks!

Edited by Arrowstar
Link to comment
Share on other sites

9 hours ago, Arrowstar said:

I'd rather not reorder anything without the user doing it themselves, could be confusing later.  I could always have a button or context menu that reorders by event number for the user, if that would work?

yea that would work, allowing for manual re-ordering

Also new suggestion:

rGWLMzv.png

These two warnings are showing up because I disabled thrust modeling when an engine is throttled up and also drag modeling when in atmosphere for pre-launch events while still on the pad. Perhaps these could be ignored if the launch clamp is active?

Link to comment
Share on other sites

what would be the LVD equivalent of "hold prograde"? I'm done with my lifter burn at 45km and just want to coast out of the atmosphere and start up my vacuum engine in space. Not really as efficient I know because I lose speed on the coast but I'm not concerned about that. Mission profile has its reasons, dammit :P MECO comes at -3° AoA and I'm not sure how to set things up to zero out and hold 0° AoA for the remainder of the time in the atmosphere. Also, I'm assuming getting to and holding 0° AoA is the same as holding prograde - pretty sure that's right tho

Aaaaand 10min of playing around later I realized I could switch the steering model - set it to Body Fixed Aero Angles Steering. Didn't notice any diff between that and Inertial Aero

Edited by Drew Kerman
Link to comment
Share on other sites

Is it possible for the GA to output movement torque in newtons? Can the simulation tell how much force is required for the rocket to move as it does? So I have it on a linear pitch movement and would like to know how much force is being applied to make that turn-over rate. This would be very useful in knowing if my RCS thrusters are adequate - I can use RCS Build Aid mod to see the amount of torque produced along all the axis of the vehicle

Also, I had to redo a LVD case file because I realized way late into it that Kerbin was missing an atmosphere again :/ Can a warning be added to detect this? I was able to select the atmosphere option in the Celestial Body Catalog and it just shows up as a flat line. So it can tell that Kerbin is supposed to have an atmosphere, and if that's the case then it should assume that a curve would be present. If not, it should raise a warning.

Edited by Drew Kerman
Link to comment
Share on other sites

On 8/6/2019 at 10:40 PM, Drew Kerman said:

yea that would work, allowing for manual re-ordering

Also new suggestion:

rGWLMzv.png

These two warnings are showing up because I disabled thrust modeling when an engine is throttled up and also drag modeling when in atmosphere for pre-launch events while still on the pad. Perhaps these could be ignored if the launch clamp is active?

I'll look into it and see if that's an intuitive thing to add.  It might be, but I could also see it being confusing for the user.

On 8/7/2019 at 4:42 AM, Drew Kerman said:

what would be the LVD equivalent of "hold prograde"? I'm done with my lifter burn at 45km and just want to coast out of the atmosphere and start up my vacuum engine in space. Not really as efficient I know because I lose speed on the coast but I'm not concerned about that. Mission profile has its reasons, dammit :P MECO comes at -3° AoA and I'm not sure how to set things up to zero out and hold 0° AoA for the remainder of the time in the atmosphere. Also, I'm assuming getting to and holding 0° AoA is the same as holding prograde - pretty sure that's right tho

Aaaaand 10min of playing around later I realized I could switch the steering model - set it to Body Fixed Aero Angles Steering. Didn't notice any diff between that and Inertial Aero

You got it.  Body Fixed Aero angles are relative to the body-fixed rotating frame velocity vector, whereas the the inertial aero angles are relative to your inertial velocity.  If you want to true prograde, use the inertial aero angles with all three angles set to 0 degrees.

11 hours ago, Drew Kerman said:

Is it possible for the GA to output movement torque in newtons? Can the simulation tell how much force is required for the rocket to move as it does? So I have it on a linear pitch movement and would like to know how much force is being applied to make that turn-over rate. This would be very useful in knowing if my RCS thrusters are adequate - I can use RCS Build Aid mod to see the amount of torque produced along all the axis of the vehicle

Also, I had to redo a LVD case file because I realized way late into it that Kerbin was missing an atmosphere again :/ Can a warning be added to detect this? I was able to select the atmosphere option in the Celestial Body Catalog and it just shows up as a flat line. So it can tell that Kerbin is supposed to have an atmosphere, and if that's the case then it should assume that a curve would be present. If not, it should raise a warning.

Unfortunately it is not.  I don't model torques directly, steering is only proscribed, it isn't computed.  This is actually not a trivial thing to do.  Maybe the analysis tools in FAR can help?

Regarding the atmo question: I guess I could have some very specific warnings for the original planets/moons that have an atmosphere, but it would be impossible to do generically.  Why did your atmosphere disappear again?  Do you know?

Link to comment
Share on other sites

2 hours ago, Arrowstar said:

This is actually not a trivial thing to do

That's what I was afraid of. Ah well, just have to resort to ye old method of "try and see!" :P

2 hours ago, Arrowstar said:

I guess I could have some very specific warnings for the original planets/moons that have an atmosphere, but it would be impossible to do generically

the issue as I've seen it so far is that I can still select the atmosphere toggle, the curve is just a flat line. So you wouldn't have to code the workaround to know by default what planets should have an atmosphere, all you need is to code that determines "this planet has an atmosphere enabled but it has no pressure" and throw a warning based on that. Here's the MAT file with the problem, in case it will help.

2 hours ago, Arrowstar said:

Why did your atmosphere disappear again?  Do you know?

No. I have yet to catch it in the act. Both times it's happened I haven't realized it right away. No idea what it could be caused by. Consider my above suggestion a debugging method to help me catch it

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