Jump to content

vitorboschi

Members
  • Posts

    94
  • Joined

  • Last visited

Everything posted by vitorboschi

  1. @Arrowstar Thanks! I've seen this error log being generated when I try to add the "Set Kinematic State" event, which might be related to it not being added to the list afterwards: Nonfinite endpoints or increment for colon operator in index. Error in lvd_EditActionSetKinematicStateGUI_App/populateGUI (line 284) Error in lvd_EditActionSetKinematicStateGUI_App/lvd_EditActionSetKinematicStateGUI_OpeningFcn (line 1357) Error in lvd_EditActionSetKinematicStateGUI_App>@(app)lvd_EditActionSetKinematicStateGUI_OpeningFcn(app,varargin{:}) (line 4540) Error in appdesigner.internal.service.AppManagementService/runStartupFcn (line 103) Error in matlab.apps.AppBase/runStartupFcn (line 69) Error in lvd_EditActionSetKinematicStateGUI_App (line 4540) Error in SetKinematicStateAction.openEditActionUI (line 443) Error in lvd_editEventGUI_App/addActionButton_Callback (line 427) Error in appdesigner.internal.service.AppManagementService/executeCallback (line 138) Error in matlab.apps.AppBase>@(source,event)executeCallback(appdesigner.internal.service.AppManagementService.instance(),app,callback,requiresEventData,event) (line 63) Error in matlab.ui.internal.controller.uicontrol.UicontrolRedirectStrategy/executeCallback (line 231) Error in matlab.ui.internal.controller.uicontrol.PushButtonRedirectStrategy/handleCallbackFired (line 13) Error in matlab.ui.internal.controller.uicontrol.PushButtonRedirectStrategy>@(varargin)obj.handleCallbackFired(varargin{:}) (line 19) Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback Error while evaluating Button PrivateButtonPushedFcn. Another, unrelated bug: When I try to optimize this LVD mission, I get: Error using optimfcnchk/checkfun Supplied function '@(x)lvdOpt.constraints.evalConstraintsWithGradients(x,true,evtToStartScriptExecAt,true,[])' returned NaN when evaluated; FMINCON cannot continue. Error in fmincon (line 672) Error in lvd_executeOptimProblem (line 30) Error in FminconOptimizer/optimize (line 106) Error in LvdOptimization/optimize (line 62) Error in ma_LvdMainGUI_App/optimizeMissionMenu_Callback (line 2865) Error in appdesigner.internal.service.AppManagementService/executeCallback (line 138) Error in matlab.apps.AppBase>@(source,event)executeCallback(appdesigner.internal.service.AppManagementService.instance(),app,callback,requiresEventData,event) (line 63) Caused by: Failure in initial nonlinear constraint function evaluation. FMINCON cannot continue. Error using matlab.ui.internal.controller.WebMenuController/fireActionEvent Error while evaluating Menu Callback.
  2. @Arrowstar a few more bugs on the LVD: - In some cases, while a chart manipulation tool is active (Pan, rotate, zoom...), you cannot properly interact with the events list: double clicking an event will not open the edit window, and right-clicking will open a menu with chart options rather than the usual event popup menu. - When inserting a "Set kinematic state" action, I cannot set the epoch using the date/time editor. When I choose that option, the editor will appear, but when I click "Ok", the time is not set. Instead, the console will show this error: Error using matlab.ui.control.EditField/set Unrecognized property String for class EditField. Error in lvd_EditActionSetKinematicStateGUI_App/enterUTAsDateTimeContextMenu_Callback (line 1536) Error in appdesigner.internal.service.AppManagementService/executeCallback (line 138) Error in matlab.apps.AppBase>@(source,event)executeCallback(appdesigner.internal.service.AppManagementService.instance(),app,callback,requiresEventData,event) (line 63) Error using matlab.ui.internal.controller.WebMenuController/fireActionEvent Error while evaluating Menu Callback. - Also when inserting the "Set kinematic state" action, in some cases it will not appear at the list after I change the settings and click "Save & Close". I couldn't find the exact steps to reproduce this one yet, but will report once I do. - I noticed the initial state doesn't always match what I set as the scenario initial state (see image for ref) . Is that expected?
  3. @Arrowstar I've found a bug with LVD's node upload feature: it seems to always set the node execution to the end time of the event, even when it was set to execute the actions before propagation.
  4. Thanks for the answers! What's the best way to do this? Simply changing/optimizing the Epoch field of the initial state would change the orbit, no? That's not desirable in my case because the rocket is already in a parking orbit. Scratch that. I realized I asked the same question a year or two ago. Cool! I kinda expected it should be allowed, but since the MFMS mission importer stay with the force model propagator, I was a bit wary about changing it
  5. Hey @Arrowstar, long time no see! I'm a returning user after quite some time away from KSP (and KSP-TOT) and was quite happy to see the amount of features/polishing you put into the tool.While trying to [re]learn the tool, I'm modelling a simple mission to Duna starting from a parking orbit. I just imported a mission from the MFMS and tweaked it to for my needs (I want the ship to enter a polar orbit at Duna), but there are some problems which might be bugs or just me not knowing how to use the tool. Here's the LVD mission for reference. Now the problems: - When I change the event 1 from Two body propagator to the Force model propagator, the orbit seems to decay to the ground, even though there shouldn't be any thrust/drag to the ship at that orbit - Propagating it takes less than 5 seconds, but actually optimizing it is *very* slow. It can take multiple minutes between steps. I wasn't expecting that much from a simple mission like this one Related to that slowness, I'm curious: can I use two body propagators on steps that have only an impulsive delta-v (the instantaneous one) as the action (plus a non-zero event duration) to optimize that?
  6. OMG, sorry to hear that. I hope they help you recover the account and hopefully the content too, and thank you for the heads up!
  7. Not really. A PID is just a small part of the problem. What I meant by closed loop is a guidance controller that will try to achieve a given orbit instead of blindly following the calculated attitude/throttle over time
  8. Yeah, but still way better than I could do myself Do you know some keywords I can search for, if I ever try to write a closed loop guidance control? Sure thing: https://www.dropbox.com/s/x9i5mao7cx333i8/execlvdcontrolt.ks?dl=0 I have used the csvtool application (available on Linux) to transpose the generated CSV and test it. Yes, customization would require changes in the kOS script too, but that part is already easily changeable. I know I can generate data from the GA tool, but I was thinking in a slightly more advanced workflow, like, for example, generating a few lines at the beginning of the file with the expected state after each event, and only after that putting the throttle/attitude data points. That would allow me to display how much the ship is deviating from the plan, and maybe add some sort of closed loop guidance to the mix
  9. Awesome! I have just reworked the script side of the thing to work that way (worked like a charm) and made a launch from Kerbin using it. Here are my stats: Expected orbit / Actual orbit: SMA: 6993.698km / 7077.637 km ECC: 0.9248807 / 0.92720 INC: 179.8792 deg / 179.844 deg RAAN: 57.00031 deg / 30.664 deg AOP: 184.3414 deg / 154.729 deg
  10. @ArrowstarHow hard would it be to implement the CSV exporter as a plugin instead of being embedded into the application? I'm asking because it looks to me that it would be a great example plugin (that people can learn from in order to make their own) and also enable really easy customization.
  11. Ok, it seems to have worked now, although I couldn't yet make the launch work 'till the end because KSP keeps crashing mid flight (looks like a KOS issue), but I have found a small issue with roll: it happened many times that the ship performed a full roll while it shouldn't (roll was set to zero all the time), and I'm pretty sure this is because of the way it's represented in KOS/KSP-TOT: as a 0-360 degree value (or rad, but it doesn't really matter). Since the set value is 0, a small perturbation may make it wrap to something like 359.9, and the ship does a complete roll to fix that. Now, I'm not sure this is easily fixable into the KOS script or if it's something that should/must be fixed in KOS itself, but just setting the roll to a value far from 0 and 360 should workaround this problem. @ArrowstarAnother suggestion to the KOS feature: if you transpose the data when exporting (so that each line represents a point in time instead of a column), it would be possible to make the script work by reading a line at a time. This would likely reduce memory usage, but most importantly, would cut the long loading time to zero
  12. Thank you! I'll retry now. I've also got a couple of suggestions: 1. I recommend using only lowercase chars for KOS filenames. The reason is that it'll convert to lowercase internally, which makes it unable to load files with uppercase characters on case sensitive filesystems (Linux and Mac, I think) 2. When exporting the CSV files, I think it makes more sense to be able to select only a few events (or time range) of the mission for exportation, because we'll usually have to tweak the mission after each burn to correct imprecisions. 3. The global integration output affects other things besides the CSV export, no? Would it make sense to let the user select a specific step size when exporting the CSV (so that other things are not changed)
  13. @Arrowstar Ok, I finally finished the mission planning stage (.mat is here: https://www.dropbox.com/s/m7g64hybdpsl2kz/Mun impact mission4.mat?dl=0) and generated the .csv out of it (https://www.dropbox.com/s/70r33wsk8lewfap/testKerbinLiftoff.csv?dl=0 Now, I tried to run it on the launchpad but it does not work: - It seems to keep waiting at the first event with throttle = 0 (which is expect) - When the time comes, the script will quickly jump until the coast event (number 9 at the .mat) without really running the other steps, which of course just crash the ship Am I missing something?
  14. Got it! I remember seeing some mentions about this problem earlier in this thread, but wasn't sure this was the same thing. Thank you for the clarification Cool! Will do! That did it, thanks! Maybe it's a good idea to add an error message when the user try to set pitch (or any other parameter, really) to an invalid/out of range value.
  15. @Arrowstar I'm trying to launch retrograde, but for some reason I can't get the pitch to go over 90 degrees. I have also tried to roll 180 degrees before pitching from 90 to 0, but it doesn't helped either. However, if I set the initial steering pitch to 90.01 instead of 89.99, at least the graphical visualization seems to be correct (the ship launches retrograde), but the pitch values still are between 90 and 0. Question: What is the correct approach to get a retrograde orbit? Is this a bug?
  16. Alright, I'll do it. Thanks for the explanation! Maybe bug: - LVD is somewhat unresponsive for some time after scrubbing the mission time slider. QoL suggestions: - Let the user select select (or do it automatically) the reference frame for the Spacecraft state panels (Initial Spacecraft State, Final Spacecraft State, view state after event). It would be a lot more useful for times where the spacecraft is at ground - For the objective function, let the scaling factor be negative. This would allow us to, for example, minimize distance to body while maximizing spacecraft mass
  17. Found another one while optimizing this mission: https://www.dropbox.com/s/59fp4n0j85tohik/Mun impact mission3.mat?dl=0 Error using optimfcnchk/checkfun (line 242) Supplied function '@(x)lvdOpt.constraints.evalConstraints(x,true,evtToStartScriptExecAt,true,[])' returned NaN when evaluated; FMINCON cannot continue. Error in fmincon (line 623) Error in lvd_executeOptimProblem (line 26) Error in FminconOptimizer/optimize (line 78) Error in LvdOptimization/optimize (line 53) Error in ma_LvdMainGUI>optimizeMissionMenu_Callback (line 601) Error in gui_mainfcn (line 95) Error in ma_LvdMainGUI (line 42) Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)ma_LvdMainGUI('optimizeMissionMenu_Callback',hObject,eventdata,guidata(hObject)) Caused by: Failure in initial nonlinear constraint function evaluation. FMINCON cannot continue. Error using waitforallfiguresclosed (line 9) Error while evaluating Menu Callback. I guess it's related to 2BImpactPoint{Lat,Long} constraints. Btw, am I using then correctly? I've put the lat/long where I want the impact to happen in there. Since there's no thrust/atmosphere on the event it happens, I've assumed the Two-body constraints are the correct ones
  18. Awesome! I'm planning an atmospheric launch and will report back when I have the results. Now, time for bug reports: 1. Trying to add a Two-Body Impact Latitude constraint will add a Two-Body Impact Longitude instead. 2. After adding the above constraint, I get this error when the script is propagated: Operands to the || and && operators must be convertible to logical scalar values. Error in findSoITransitions (line 112) Error in ma_executeCoast_goto_tru (line 67) Error in lvd_TwoBodyImpactPointTasks (line 34) Error in TwoBodyImpactPointLongitude/evalConstraint (line 31) Error in ConstraintSet/evalConstraints (line 107) Error in LaunchVehicleScript/executeScript (line 329) Error in ma_LvdMainGUI>propagateScript (line 260) Error in ma_LvdMainGUI>runScript (line 235) Error in ma_LvdMainGUI>editConstraintsMenu_Callback (line 661) Error in gui_mainfcn (line 95) Error in ma_LvdMainGUI (line 42) Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)ma_LvdMainGUI('editConstraintsMenu_Callback',hObject,eventdata,guidata(hObject)) Error using waitforallfiguresclosed (line 9) Error while evaluating Menu Callback. 2. My current mission seems to hit the Mun directly, but LVD still thinks the mission ends at Kerbin. Here's the .mat: https://www.dropbox.com/s/hw3keljbm67yqqr/Mun impact mission2.mat?dl=0
  19. I didn't bothered to keep it because the problem is gone when you load the file again,so I don't have it anymore, unfortunately. I'll keep a sample next time it happen.
  20. Thank you! I feel a bit dumb now >< Another bug: there seems to be another issue with events/variables being optimized when they shouldn't be. This time it happened with events that still exists, but with optimization toggled off (ctrl+F). As the previous one, it fixes itself when the .mat is reloaded from disk.
  21. @Arrowstar hey, thank you for the update! I have tried to reproduce the problem on the Multiflyby porkchop plotter and it's still consuming a ton of memory here. Unfortunately I couldn't test it on a Windows machine yet. Another one which I'm not sure is a bug or user problem: I tried to model a direct launch to impact mission to Mun, in order to test the new KOS script, but I couldn't model the mission. For some reason, event 2 is never completed (reach 0.6km altitude). I tried to enable "Show S/C Body Axes" on the view settings to help me understand what is wrong, but I've got this error on the log: Error using makehgtform (line 80) Arguments to translate must be finite Error in LaunchVehicleViewProfileBodyAxesData/plotBodyAxesAtTime (line 108) Error in timeSliderStateChanged (line 22) Error in LaunchVehicleViewProfile>@(src,evt)timeSliderStateChanged(src,evt,lvdData,handles) (line 427) Error in LaunchVehicleViewProfile/configureTimeSlider (line 430) Error in Generic3DTrajectoryViewType/plotStateLog (line 335) Error in LaunchVehicleViewProfile/plotTrajectory (line 99) Error in LaunchVehicleViewSettings/plotTrajectoryWithActiveViewProfile (line 25) Error in lvd_processData (line 14) Error in ma_LvdMainGUI>editViewSettingsMenu_Callback (line 2002) Error in gui_mainfcn (line 95) Error in ma_LvdMainGUI (line 42) Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)ma_LvdMainGUI('editViewSettingsMenu_Callback',hObject,eventdata,guidata(hObject)) Error using waitforallfiguresclosed (line 9) Error while evaluating Menu Callback. Care to take a look? Here is the .mat: https://www.dropbox.com/s/5aaniunzgdel6s6/Mun impact mission.mat?dl=0
  22. Out of curiosity, do you know how precise are real life orbital maneuvers today? In terms of dV/timing/thrust direction?
×
×
  • Create New...