Jump to content

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


Recommended Posts

Hi, the manual input on the porkchop screen is fixed, but the import from KSPTOT connect is having a problem. See below.

 

Spoiler

Error using matlab.ui.container.Menu/set
Unrecognized property String for class Menu.

Error in mainGUI>getUTFromKSP_Callback (line 641)

Error in gui_mainfcn (line 95)

Error in mainGUI (line 42)

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

Error while evaluating Menu Callback.
 

Thanks

Link to comment
Share on other sites

18 minutes ago, Gilph said:

Hi, the manual input on the porkchop screen is fixed, but the import from KSPTOT connect is having a problem. See below.

 

  Hide contents

Error using matlab.ui.container.Menu/set
Unrecognized property String for class Menu.

Error in mainGUI>getUTFromKSP_Callback (line 641)

Error in gui_mainfcn (line 95)

Error in mainGUI (line 42)

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

Error while evaluating Menu Callback.
 

Thanks

Looks like I missed one.  I have fixed it and I'll try to put out a PR6 with it fixed tomorrow.  Thanks for the report!

Link to comment
Share on other sites

Hi everyone,

I decided to get out the v1.6.8 pre-release 6 build earlier than I thought I might.  Here's the change log:

  • LVD: Different steering models can be selected for each Euler angle now using the Selectable Model steering mode.
  • LVD: All constraints now support the ability to evaluate themselves relative to the value of the same quantity at the end of another event.  This is in addition to evaluating them relative to fixed bounds as well.
  • Fixed an issue with importing the UT from KSPTOTConnect into the main KSPTOT user interface (the porkchop plot).

Please let me know if you find any bugs, especially with the two new features as they are certainly experimental at this point!

Edited by Arrowstar
Link to comment
Share on other sites

Hi everyone,

Tonight I want to share some changes that are coming to Launch Vehicle Designer's Graphical Analysis tool.  This is the system in LVD that lets users extract data from an LVD mission, plot it, and export it to CSV files.  As usual, the easiest way to start is to just show how things look now.

NnzL4fI.png

There are two new elements to this system.  First, you'll notice on the left a list of Tasks.  These tasks are what GA will execute when you tap the "Plot Graphical Analysis Tasks" button on the bottom.  Each task line item has two parts: the name of the task and the associated reference frame. 

This brings me to the second new element.  Each task now has a reference frame associated with it.  What this means is that if you want to compute, for example, the position of your spacecraft in any available reference frame, you can do it.  That's what's shown in the example above.  Here I'm outputting the position of the vehicle in the Kerbin Centered Inertial frame as well as the Kerbin-Mun two body rotating frame.

Most tasks respond to the reference frame at this point.  Right now, the two still outstanding on my list are related to extrema values and calculus values.  There are some peculiarities with these two so I'm still considering how I might go about it.  Critically, though, anything associated with vehicle kinematics (position, velocity, and all Keplerian, Geographic, and Universal Elements, plus related quantities) now handle GA task reference frames correctly.  This means that if you want to output SMA in a rotating frame, or longitude in an inertial frame, you can!  It might not make any sense, but you can. :)

Of course, some tasks are frame independent.  The density of the atmosphere does not care about what frame it's in, for example.

All of the usual buttons and check boxes and inputs from the original LVD GA are still there, of course, just on the right instead of the left.  They all work the same way they did before.

Lastly, you might notice that the appearance of this UI looks a bit different from before.  I've migrated this UI over to MATLAB's new (sort of) UI system, App Designer.  The old system, GUIDE, is going away at some point in the future, so presumably at some point every UI in KSPTOT will get this treatment.  I'm starting with simple UIs that have no outputs, since that actually doesn't work yet (MATLAB doesn't allow UIs in App Designer to return values yet, ugh!).  I expect the main KSPTOT UI (the porkchop plot) and many of the single UI, standalone tools will get this treatment for the next version too.  Mission Architect will likely not be updated in this way.  It will still run, of course, no worries there, it will just be a bit harder to update in the future if I need to.

Please let me know if you've got any questions!  Happy orbiting. :)

Link to comment
Share on other sites

Hey everyone!

Last week I found a pretty serious bug in the 3rd body gravity model within LVD.  I fixed the bug and I'm happy to report that you can now create those fun halo orbits and the like in KSP, as if you were using Principia (for example).

srQtPYx.png

Happy orbiting!

Link to comment
Share on other sites

Did anyone order a Near Rectilinear Halo Orbit?

lcWM1ya.png

A while back I mentioned that I had fixed the 3rd body gravity model code in LVD.  The past few days I've been working on a new tool within LVD called "Halo Orbit Approximator" which will allow users to construct these orbits fairly easily.  It's not ready to be shown yet (I only have code now, no UI), but I should be able to get it into the next pre-release. 

I'm not sure how many people here use the Principia mod for KSP (the n-body gravity mod), but if you do, I would certainly appreciate real feedback from this new tool!

Link to comment
Share on other sites

Hi everyone,

Tonight I've built KSPTOT v.1.6.8 pre-release 7.  This is a fairly large pre-release with a number of new features.  Here's the change log:

  • LVD: Bug fixes to the 3rd body gravity model.
  • LVD: Bug fixes to optimizing Cartesian elements.
  • LVD: Graphical Analysis is now using the App Designer framework and sports a new look.
  • LVD: All fluid types are now their own GA tasks.
  • Main KSPTOT user interface window is now ported over to App Designer framework.
  • LVD: Constraints and objective functions now are aware of and respect user selected reference frames when evaluating values.
  • LVD: Added halo orbit examples.  The L2 halo orbit example is a full mission from low Kerbin orbit to the halo orbit around the Mun!
  • LVD: Added third body gravity validator that checks to see if third body gravity sources are active with no force model or if the 3rd body gravity force model is active with no bodies.
  • LVD: Extrema, Calculus Calculation objects, ground objects, and geometry objects now respect reference frames when computing their values.
  • LVD: View Settings dialog now moved over to App Designer framework and sports a new look!
  • LVD: Added Halo Orbit Constructor tool (Tools -> Halo Orbit Constructor menu)
  • LVD: Performance improvements to frame conversions.

Let's talk about the Halo Orbit Constructor tool for a moment!  This is the new big feature I've been working on and will be very handy to those using Principia (or other n-body gravity mods for KSP).  Halo orbits are a special kind of orbit that only appear in the circular restricted 3 body problem.  They have a lot of special uses, but in general, you can think of them as orbits that are designed to stick around Lagrange points, or points where gravity between two celestial bodies sort of "balances".

as5Zqyy.png

We see a few things here. 

  1. Halo orbits are always constructed around a primary body and a secondary body that orbits it.  In this case, I've selected to create a halo orbit near the Kerbin-Mun system.
  2. The Libration point (or Lagrange point) is the location around which the halo orbit will be closest.  L2 is on the far side of the Mun from Kerbin.  L1, the other option, is on the near side of the Mun.
  3. The "Z Amplitude" is an estimate of the height of the halo orbit above the plane of the Mun's orbit around the Mun.  That "height" can be positive or negative depending on if you select a Northern or Southern sense.
  4. The differential corrector parameters allow you to adjust how the orbit is solved for. 
    1. The Step Size Factor is used to provide numerical stability at the cost of longer computations.  The smaller the number (> 0), then slower the code will run but it should not diverge as frequently.
    2. The Coordinate to Adjust defines which part of the initial estimated position vector the solver will adjust to compute your halo orbit.  You can get very different results by changing this parameter.
  5. On the right you'll see the completed calculation results displayed.  The blue line is the approximated halo orbit (derived from something called Richardson's 3rd Order method), the yellow line is what would happen if we propagated the approximated halo orbit directly, and the green line is the final result after using the differential corrector to make the orbit periodic.  The green line is the final product of the calculations.

MH73qwq.png

On the results tab we have the initial state of the halo orbit you can use in LVD along with instructions on how to use it properly.  Basically you can use it as an initial state or put it into a Set Kinematic State Action and away you go.  You will need to do a bit more optimization with an LVD optimizer to get an actual periodic orbit, but it's not too hard if you follow the instructions.

And if you do, magical things like this are possible:

R9HRvG9.png

This is a full up mission to a halo orbit from LKO.  You can see the green initial orbit line around Kerbin, the cyan coast out to the Mun, the blue Munar flyby orbit, and the orange halo orbit.  The halo is actually moving clockwise and so the spacecraft turns around a bit down at the apoapsis, but that's okay. 

And where did the idea for this mission profile come from?  NASA, of course!  Check out this image that they're using for getting out to the Moon.  Look familiar? ;)

Comparison-of-Earth-to-NRHO-transfers.pn

Happy orbiting everyone!  Feedback on the PR7 release is highly sought, especially for all the new bits that use App Designer now as well all the new items in LVD using reference frames.

EDIT: PR7 download link now available!

Edited by Arrowstar
Link to comment
Share on other sites

6 minutes ago, Razgriz1 said:

+1 for Halo orbit planner! I've always meant to learn how to plan a mission to one, but now I guess I don't have to! :D

I'm always amazed at how quickly you add things to this, @Arrowstar! Keep up the great work!

Thank you!  Halo orbits have been a point of personal and professional curiosity for me for some time now, and so I sat down to learn a bit about them recently.  I'm glad the new tool worked out as well as it did!  It doesn't take all of the work out of planning halo orbit missions, but it does make it a lot easier to get started, and that's what I was after.

If you have any thoughts on how it could be improved, please let me know. :)

Link to comment
Share on other sites

Hi everyone,

I want to introduce a few new features in Launch Vehicle Designer.  First, the paradigm for event actions is changing a bit.  As many of you know,  event actions occur after the event has finished propagating.  However, I have made a modification which enables the user to select which side of propagation the actions should occur: before the start of propagation or after it (the current behavior).

hlQOFAG.png

The default selection for this is the current behavior, "Execute Actions After Propagation."  Existing mission plans therefore should not require updates.  Hopefully this will provide a bit more flexibility.  As an example, in the past when a Set Kinematic State action was used it was necessary to make that action a zero duration propagation and then begin propagation from the new state in a new event.  This is no longer necessary, since you can execute the Set Kinematic State action prior to propagation now.

The next feature I want to present is the new ability to evaluate constraints at either the start or end of an event.

eOWXyVn.png

You'll notice two new line items in the Edit Constraint dialog "Event Node" and "Comparison Node."  This allows you to select if you want to evaluate the constraint at the final state (after propagation and actions) or the initial state (before propagation and actions).  Uses for selecting initial state generally include comparing state parameters between the start and end of an event.  The current behavior of grabbing the final state for a constraint is the default behavior so no updates should be necessary to existing mission plans.

Let me know if you have any questions, and happy orbiting!

Link to comment
Share on other sites

Hi everyone,

Tonight I've built KSPTOT v1.6.8 pre-release 8.  This is a pretty big update with a fair number of new things.  Here's the change log:

  • LVD: Task list area now has a search box.
  • LVD: Formal continuity constraints are replaced with state comparison constraints for position, velocity, and time.
  • LVD: Event termination conditions now have ref frame awareness.
  • LVD: Halo Orbit Constructor now shows arrival/departure transfer orbits too.
  • LVD: Event actions can now be executed before or after propagation on events.
  • LVD: Constraints can now be evaluated at either the initial state or final state of an event.  Same goes for the state comparison constraints and the node of the comparison event.
  • Converted a whole bunch of the standalone analysis tools (MFMS, RMS, OTBOC, etc) over to the App Designer framework.
  • Celestial bodies can now be propagated using numerical integration in addition to two body propagation.

The last two of this list are the most critical.  First, if you regularly use any of the Maneuver Planning tools or the Vehicle Sizer tool in KSPTOT, please give them a shot in this PR and help me make sure that the migration to the new App Designer framework went as planned.

Second, yes, you read correctly: KSPTOT can now numerically propagate the motion of celestial bodies in addition to the normal "two body" method of computing position and velocity (the latter is how KSP works).  Why would we want to be able to do this?  Well, if you use Principia or any other n-body motion mod for KSP, then the two body motion dynamics will not hold up.  This functionality is what you'll need to use instead.  There are a few tricks to getting this to work, though.

 First, there's a new entry to each body's information in the bodies.ini files:

propType

This parameter can take one of two values, as explained at the top of the default bodies.ini file:

propType = analytic_two_body
propType = numerical_integration

The default, "analytic_two_body" behaves as KSP expects it to.  The second one enables numerical integration of the equations of motion for that body.  You can do this on a per-body basis, but the recommendation is to set all bodies to one or the other.

What happens when you do this?  Well, it would be too CPU intensive to compute the position of the body at every time its needed everywhere in KSPTOT, so upon starting KSPTOT or loading a bodies.ini file with a celestial body that is using numerical_integration, KSPTOT will create a "state cache" where it propagates the states of all numerically integrated bodies and stores them.  Splines are then used to fit the data later for rapid calculation of position and velocity at any arbitrary point within the bounds of the state cache

euXkf9u.png

The default state cache bounds start at UT = 0 sec and end at UT = 100 (Earth) days.  Trying to get a state for a numerically integrated body outside of these bounds will throw an error.

So what happens if you want to go beyond 100 Earth days?  Fortunately there's a solution!  A new tool will allow you to set the bounds of the state cache.

F2pcEBx.png

This tool is available in two different places right now.

  1. The main KSPTOT UI: Edit -> Configure Celestial Body State Cache
  2. Launch Vehicle Designer: Settings -> Configure Celestial Body State Cache

The tool is also required to be accessible in LVD because the celestial body data there is likely not the same as what's in the rest of the application, particularly if you have just loaded a mission case from disk.

So if you get an error telling you that you need to adjust your state cache bounds, you can use this tool to do so easily. 

Finally, you can tell if a particular body is integrated or uses two body motion by opening the Celestial Body Catalog (now also available from the main KSPTOT UI).

plrYcbE.png

I think that's it for now!  Any thoughts or questions?  Happy orbiting. :)

Link to comment
Share on other sites

4 hours ago, Briso said:

Hello. Is there a manual on how to calculate gravity slingshots ?

Hi there!  There isn't a manual, but I can get you started:

Open up KSPTOT and use the Tools -> Maneuver Planning -> Multiflyby Maneuver Sequencer menu item.  This will open up MFMS.

First thing I would do is just tap "Compute Flyby Maneuver Sequence" and watch the application go.  Take a look at the data it gives you (all of the orbits plus maneuver data).  From there, start playing with the waypoints list on the left.  There are no hidden menus or anything in MFMS, so what you see is what you get.  It's very straightforward once you've spent a bit of time with it. 

I will warn you up front that this is only going to get you 95% of the way there, though.  The zero-radius SoI assumption that tools like MFMS (and similar tools in other mods) use does not account for the patched conics system that KSP uses.   The maneuver plans you get out of MFMS will therefore bit a bit off.  You'll need to hand tune them a bit in KSP with the maneuver nodes.  If you are actually after high-fidelity mission planning then Launch Vehicle Designer is your best bet, but LVD is far more difficult to pick up and use.  Master MFMS first and then give that a try.

Give me a shout here in this thread if you have any questions or problems!

Link to comment
Share on other sites

6 hours ago, Arrowstar said:

Hi there!  There isn't a manual, but I can get you started:

Open up KSPTOT and use the Tools -> Maneuver Planning -> Multiflyby Maneuver Sequencer menu item.  This will open up MFMS.

First thing I would do is just tap "Compute Flyby Maneuver Sequence" and watch the application go.  Take a look at the data it gives you (all of the orbits plus maneuver data).  From there, start playing with the waypoints list on the left.  There are no hidden menus or anything in MFMS, so what you see is what you get.  It's very straightforward once you've spent a bit of time with it. 

I will warn you up front that this is only going to get you 95% of the way there, though.  The zero-radius SoI assumption that tools like MFMS (and similar tools in other mods) use does not account for the patched conics system that KSP uses.   The maneuver plans you get out of MFMS will therefore bit a bit off.  You'll need to hand tune them a bit in KSP with the maneuver nodes.  If you are actually after high-fidelity mission planning then Launch Vehicle Designer is your best bet, but LVD is far more difficult to pick up and use.  Master MFMS first and then give that a try.

Give me a shout here in this thread if you have any questions or problems!

Thanks. I'll try the option you suggested.

Link to comment
Share on other sites

Hey @Arrowstar, maybe found a bug when trying to build the state cache for RSS with Principia using Prerelease 8.

I generated the bodies.ini file using KSPTOTConnect, then added propType = numerical_integration to all of the bodies in the file changed the Sun's epoch to match the others, and then tried loading the file.

Log file:

Spoiler

Error using CelestialBodySunRelStateDataCache/getCachedBodyStateAtTime (line 30)
At least one of the points in time queried are out of the bounds of the numerical integration:  sec to  sec

Error in getStateAtTime (line 28)

Error in getPositOfBodyWRTSun (line 53)

Error in BodyCenteredInertialFrame/getOffsetsWrtInertialOrigin (line 24)

Error in AbstractElementSet/convertToFrame (line 81)

Error in CelestialBodyIntegration/integrateCelestialBodies (line 67)

Error in CelestialBodyData (line 58)

Error in projectMain (line 53)

 

 

Link to comment
Share on other sites

Just now, Razgriz1 said:

Hey @Arrowstar, maybe found a bug when trying to build the state cache for RSS with Principia using Prerelease 8.

I generated the bodies.ini file using KSPTOTConnect, then added propType = numerical_integration to all of the bodies in the file changed the Sun's epoch to match the others, and then tried loading the file.

Log file:

  Hide contents


Error using CelestialBodySunRelStateDataCache/getCachedBodyStateAtTime (line 30)
At least one of the points in time queried are out of the bounds of the numerical integration:  sec to  sec

Error in getStateAtTime (line 28)

Error in getPositOfBodyWRTSun (line 53)

Error in BodyCenteredInertialFrame/getOffsetsWrtInertialOrigin (line 24)

Error in AbstractElementSet/convertToFrame (line 81)

Error in CelestialBodyIntegration/integrateCelestialBodies (line 67)

Error in CelestialBodyData (line 58)

Error in projectMain (line 53)

 

 

Please share the bodies.ini file you generated.  Thanks!

Link to comment
Share on other sites

1 minute ago, Arrowstar said:

Please share the bodies.ini file you generated.  Thanks!

Here you go: https://drive.google.com/file/d/1fp1eys6KXnP9DHfRBhQAYIAjumfo2q_S/view?usp=sharing

The only changes I made to it from the base file generated were:

  1. added propType = numerical_integration to all bodies
  2. changed Sun's epoch (was 0.0000, changed to 224.9 to match other bodies) as the first popup I got suggested
  3. Changed bodycolor values for most bodies because gray is boring :D
Link to comment
Share on other sites

4 hours ago, Razgriz1 said:

Here you go: https://drive.google.com/file/d/1fp1eys6KXnP9DHfRBhQAYIAjumfo2q_S/view?usp=sharing

The only changes I made to it from the base file generated were:

  1. added propType = numerical_integration to all bodies
  2. changed Sun's epoch (was 0.0000, changed to 224.9 to match other bodies) as the first popup I got suggested
  3. Changed bodycolor values for most bodies because gray is boring :D

Bug fixed for next release!  I ended up needing to process the body data in descending order down the solar system hierarchy (Sun, planets, moons, etc) in order to make sure that when the inertial reference frame for the body being processed is figured out, the parent body's data is already there.

Thanks for the report!

Link to comment
Share on other sites

12 hours ago, Arrowstar said:

I ended up needing to process the body data in descending order down the solar system hierarchy

That's interesting! I noticed that some of the moons came before their respective parents but didn't think much about it since the celestial body catalog still properly ordered them. I rearranged the config file myself and that did fix the problem as well.

 

I've got another one for you. I was playing around with the Halo Orbit Constructor in Prerelease 8 using the stock bodies and the same parameters used in your example from a few posts ago:

Spoiler
On 5/10/2021 at 7:46 PM, Arrowstar said:

Let's talk about the Halo Orbit Constructor tool for a moment!  This is the new big feature I've been working on and will be very handy to those using Principia (or other n-body gravity mods for KSP).  Halo orbits are a special kind of orbit that only appear in the circular restricted 3 body problem.  They have a lot of special uses, but in general, you can think of them as orbits that are designed to stick around Lagrange points, or points where gravity between two celestial bodies sort of "balances".

as5Zqyy.png

 

This example works fine in Prerelease 7, but when trying the same thing in Prerelease 8 gives the following error:

Log file:

Spoiler

Warning: JAVACOMPONENT will be removed in a future release. For more information see <a href="https://www.mathworks.com/products/matlab/app-designer/java-swing-alternatives.html">UI Alternatives for MATLAB Apps</a> on mathworks.com.
> In javacomponent (line 85)
In ma_LvdMainGUI>ma_LvdMainGUI_OpeningFcn (line 90)
In gui_mainfcn (line 220)
In ma_LvdMainGUI (line 40)
In mainGUI_App/launchVehicleDesignerMenu_Callback (line 479)
In appdesigner.internal.service/AppManagementService/tryCallback (line 369)
In matlab.apps.AppBase>@(source,event)tryCallback(appdesigner.internal.service.AppManagementService.instance(),app,callback,requiresEventData,event) (line 37)
In matlab.ui.internal.controller/WebMenuController/fireActionEvent (line 67)
In matlab.ui.internal.controller/WebMenuController/handleEvent (line 55)
In matlab.ui.internal.controller.WebMenuController>@(varargin)obj.handleEvent(varargin{:}) (line 36)
In viewmodel.internal.factory.ManagerFactoryProducer>@(src,event)callback(src,viewmodel.internal.factory.ManagerFactoryProducer.convertStructToEventData(event)) (line 106)
In waitforallfiguresclosed (line 16)
Warning: The JavaFrame figure property will be removed in a future release. For more information see <a href="https://www.mathworks.com/products/matlab/app-designer/java-swing-alternatives.html">UI Alternatives for MATLAB Apps</a> on mathworks.com.
> In LimitFigSize (line 110)
In ma_LvdMainGUI>ma_LvdMainGUI_SizeChangedFcn (line 2272)
In gui_mainfcn (line 95)
In ma_LvdMainGUI (line 42)
In matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)ma_LvdMainGUI('ma_LvdMainGUI_SizeChangedFcn',hObject,eventdata,guidata(hObject))
In ma_LvdMainGUI>ma_LvdMainGUI_OpeningFcn (line 137)
In gui_mainfcn (line 220)
In ma_LvdMainGUI (line 40)
In mainGUI_App/launchVehicleDesignerMenu_Callback (line 479)
In appdesigner.internal.service/AppManagementService/tryCallback (line 369)
In matlab.apps.AppBase>@(source,event)tryCallback(appdesigner.internal.service.AppManagementService.instance(),app,callback,requiresEventData,event) (line 37)
In matlab.ui.internal.controller/WebMenuController/fireActionEvent (line 67)
In matlab.ui.internal.controller/WebMenuController/handleEvent (line 55)
In matlab.ui.internal.controller.WebMenuController>@(varargin)obj.handleEvent(varargin{:}) (line 36)
In viewmodel.internal.factory.ManagerFactoryProducer>@(src,event)callback(src,viewmodel.internal.factory.ManagerFactoryProducer.convertStructToEventData(event)) (line 106)
In waitforallfiguresclosed (line 16)
Approx Az Achieved: 1237.987 km
Corrected Az Achieved: 2719.117 km
Error using cd
Unable to change current folder to 'C:\Program Files\MATLAB\MATLAB Runtime\v910\toolbox\matlab\funfun' (Name is nonexistent or not a folder).

Error in deval (line 52)

Error in HaloOrbitApproximator/computeManifold (line 106)

Error in lvd_HaloOrbitConstructor_App/computeManifold (line 138)

Error in lvd_HaloOrbitConstructor_App/ComputeHaloOrbitButtonPushed (line 244)

Error in appdesigner.internal.service.AppManagementService/tryCallback (line 369)

Error in matlab.apps.AppBase>@(source,event)tryCallback(appdesigner.internal.service.AppManagementService.instance(),app,callback,requiresEventData,event) (line 37)

Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 410)
Error while evaluating Button PrivateButtonPushedFcn.

It seems to run the computation fine, but somewhere it's trying to access a function that is not included in the compiled script. I'm not super familiar with compiling matlab scripts, but shouldn't that sort of thing get wrapped into the compiled file? At least that's my understanding of how it's supposed to work.

Link to comment
Share on other sites

Hi everyone !

I got two questions :

First : Is there a tutorial for the LVD ?

And second : How can I get a path into Eve SOI with Mission Architect ? I used MFMS to design burns, and then I would use MA to get it more precisely, but it doesn't who me the path into Eve SOI, and I don't know if I have to tweak something, or tell MA to take me into Eve SOI, or... something else ?

Thanks for all the investment @Arrowstar !!

Link to comment
Share on other sites

4 hours ago, Razgriz1 said:

That's interesting! I noticed that some of the moons came before their respective parents but didn't think much about it since the celestial body catalog still properly ordered them. I rearranged the config file myself and that did fix the problem as well.

 

I've got another one for you. I was playing around with the Halo Orbit Constructor in Prerelease 8 using the stock bodies and the same parameters used in your example from a few posts ago:

  Reveal hidden contents

 

This example works fine in Prerelease 7, but when trying the same thing in Prerelease 8 gives the following error:

Log file:

  Hide contents

Warning: JAVACOMPONENT will be removed in a future release. For more information see <a href="https://www.mathworks.com/products/matlab/app-designer/java-swing-alternatives.html">UI Alternatives for MATLAB Apps</a> on mathworks.com.
> In javacomponent (line 85)
In ma_LvdMainGUI>ma_LvdMainGUI_OpeningFcn (line 90)
In gui_mainfcn (line 220)
In ma_LvdMainGUI (line 40)
In mainGUI_App/launchVehicleDesignerMenu_Callback (line 479)
In appdesigner.internal.service/AppManagementService/tryCallback (line 369)
In matlab.apps.AppBase>@(source,event)tryCallback(appdesigner.internal.service.AppManagementService.instance(),app,callback,requiresEventData,event) (line 37)
In matlab.ui.internal.controller/WebMenuController/fireActionEvent (line 67)
In matlab.ui.internal.controller/WebMenuController/handleEvent (line 55)
In matlab.ui.internal.controller.WebMenuController>@(varargin)obj.handleEvent(varargin{:}) (line 36)
In viewmodel.internal.factory.ManagerFactoryProducer>@(src,event)callback(src,viewmodel.internal.factory.ManagerFactoryProducer.convertStructToEventData(event)) (line 106)
In waitforallfiguresclosed (line 16)
Warning: The JavaFrame figure property will be removed in a future release. For more information see <a href="https://www.mathworks.com/products/matlab/app-designer/java-swing-alternatives.html">UI Alternatives for MATLAB Apps</a> on mathworks.com.
> In LimitFigSize (line 110)
In ma_LvdMainGUI>ma_LvdMainGUI_SizeChangedFcn (line 2272)
In gui_mainfcn (line 95)
In ma_LvdMainGUI (line 42)
In matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)ma_LvdMainGUI('ma_LvdMainGUI_SizeChangedFcn',hObject,eventdata,guidata(hObject))
In ma_LvdMainGUI>ma_LvdMainGUI_OpeningFcn (line 137)
In gui_mainfcn (line 220)
In ma_LvdMainGUI (line 40)
In mainGUI_App/launchVehicleDesignerMenu_Callback (line 479)
In appdesigner.internal.service/AppManagementService/tryCallback (line 369)
In matlab.apps.AppBase>@(source,event)tryCallback(appdesigner.internal.service.AppManagementService.instance(),app,callback,requiresEventData,event) (line 37)
In matlab.ui.internal.controller/WebMenuController/fireActionEvent (line 67)
In matlab.ui.internal.controller/WebMenuController/handleEvent (line 55)
In matlab.ui.internal.controller.WebMenuController>@(varargin)obj.handleEvent(varargin{:}) (line 36)
In viewmodel.internal.factory.ManagerFactoryProducer>@(src,event)callback(src,viewmodel.internal.factory.ManagerFactoryProducer.convertStructToEventData(event)) (line 106)
In waitforallfiguresclosed (line 16)
Approx Az Achieved: 1237.987 km
Corrected Az Achieved: 2719.117 km
Error using cd
Unable to change current folder to 'C:\Program Files\MATLAB\MATLAB Runtime\v910\toolbox\matlab\funfun' (Name is nonexistent or not a folder).

Error in deval (line 52)

Error in HaloOrbitApproximator/computeManifold (line 106)

Error in lvd_HaloOrbitConstructor_App/computeManifold (line 138)

Error in lvd_HaloOrbitConstructor_App/ComputeHaloOrbitButtonPushed (line 244)

Error in appdesigner.internal.service.AppManagementService/tryCallback (line 369)

Error in matlab.apps.AppBase>@(source,event)tryCallback(appdesigner.internal.service.AppManagementService.instance(),app,callback,requiresEventData,event) (line 37)

Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 410)
Error while evaluating Button PrivateButtonPushedFcn.

It seems to run the computation fine, but somewhere it's trying to access a function that is not included in the compiled script. I'm not super familiar with compiling matlab scripts, but shouldn't that sort of thing get wrapped into the compiled file? At least that's my understanding of how it's supposed to work.

This looks like an issue with the MATLAB Compiler Runtime.  If it's repeatable, can you redownload and reinstall the R2021a MCR?  Hopefully that will clear up the issue.

Link to comment
Share on other sites

51 minutes ago, Sppion1 said:

Hi everyone !

I got two questions :

First : Is there a tutorial for the LVD ?

And second : How can I get a path into Eve SOI with Mission Architect ? I used MFMS to design burns, and then I would use MA to get it more precisely, but it doesn't who me the path into Eve SOI, and I don't know if I have to tweak something, or tell MA to take me into Eve SOI, or... something else ?

Thanks for all the investment @Arrowstar !!

1) There is a tutorial for LVD but it's old and probably more than a bit outdated.  I wouldn't look too closely at it at this point.

2) I would actually use LVD for what you're trying to do.  It has some nice functionality for implementing flybys.  Take a look at the example mission case "lvdExample_ToEelooViaJool_BackPropExample.mat".  The idea is to use forward and backwards propagation in order to create patch points in deep space that are easier to optimize to.  Study that mission file and feel free to ask any particular questions! It's not too hard to put something together actually. :)

Link to comment
Share on other sites

2 minutes ago, Arrowstar said:

1) There is a tutorial for LVD but it's old and probably more than a bit outdated.  I wouldn't look too closely at it at this point.

2) I would actually use LVD for what you're trying to do.  It has some nice functionality for implementing flybys.  Take a look at the example mission case "lvdExample_ToEelooViaJool_BackPropExample.mat".  The idea is to use forward and backwards propagation in order to create patch points in deep space that are easier to optimize to.  Study that mission file and feel free to ask any particular questions! It's not too hard to put something together actually. :)

Right, I was suspecting that for the second point.

I'm gonna look into it, probably next week, I suppose it is possible to start already in orbit, by using current vessel orbit in initial state ?

Thanks for the reply, much appreciated :)

Link to comment
Share on other sites

9 minutes ago, Sppion1 said:

Right, I was suspecting that for the second point.

I'm gonna look into it, probably next week, I suppose it is possible to start already in orbit, by using current vessel orbit in initial state ?

Thanks for the reply, much appreciated :)

Yes, you can definitely start in orbit.  Just adjust the Initial State of the vehicle as desired.

Hi everyone,

Tonight I've build KSPTOT v1.6.8 PR9.  Here's the change log:

  • LVD: Added an Open Recent Mission item to File menu
  • LVD: Migrated main UI and numerous other UIs to App Designer framework.  There are still a number of LVD UIs that still need to be migrated, but this is a start.
  • LVD: Plotting state logs should now be a bit faster due to updated frame rotation behavior.
  • Added UI progress bars when opening all tools from main KSPTOT UI.
  • Resolved bug with state caches for numerically integrated celestial body states.

@Razgriz1, this should resolve the issue you mentioned earlier about the celestial body state cache.

Please let me know if you find any bugs, especially in any of the new LVD user interfaces!  Thanks!

Link to comment
Share on other sites

18 hours ago, Arrowstar said:

This looks like an issue with the MATLAB Compiler Runtime.  If it's repeatable, can you redownload and reinstall the R2021a MCR?  Hopefully that will clear up the issue.

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

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