Jump to content

Arrowstar

Members
  • Posts

    2,561
  • Joined

  • Last visited

Everything posted by Arrowstar

  1. I'm working the bug you mentioned in MA now and I'll put out an update pre-release soon (probably tomorrow at this rate) with a fix. As for LVD, please see my last post.
  2. Hey, this is a known issue with the App Designer GUI environment at the moment. To edit an event that doesn't seem to be working, right click the list of events and select Edit Event in red. Sorry about the confusion.
  3. There really isn't, sadly. In LVD it'll either be the body named Kerbin or the first body in the list. Otherwise, in some other places it could be the first body in the list or the third body in the list (Kerbin is the third in the default list). Sorry for the inconsistency here, I wrote all this code over the course of 8 years so sometimes things aren't always as they should be.
  4. Assuming you're talking about using MFMS, I think I've got something that might work for you. Today I built KSPTOT v1.6.9 pre-release 6. This new PR contains an update for MFMS that allows you to set a max delta-v limit on flyby maneuvers. You'll see it in the space with the flight time bounds and all that. If you set a delta-v limit to roughly zero (say 0.001 km/s), that'll hopefully allow you to solve your problem without breaking the optimizer too much. Can you try this out and see if it helps? By the way, everyone, a few things: Sorry I haven't been around much. Honestly there hasn't been much to do with KSPTOT lately (can't think of anything to add and haven't been made aware of any new bugs lol) and I've been digging into and learning more about reinforcement learning. Perhaps one day I'll be able to incorporate some machine learning into KSPTOT, but for the moment it's remaining just a personal interest. I had to go to building the Windows version of KSPTOT on a Win10 virtual machine to get around issues I was having building on my Windows 7 installation. I'm not sure if it's a code thing or if it's just that my PC is 9 years old (or some combination of all of the above). One day I'll hopefully get new hardware, but that day is going to come only when PC component prices drop. Anyway, happy orbiting!
  5. Unfortunately it is not, unless you begin using a faster CPU. I could look into those changes. Thanks for bringing them to my attention! Sure! You'll need the parallel computing toolbox, optimization toolbox, global optimization toolbox, instrument control toolbox, and robotics toolbox. Those are the ones I can think of off the top of my head. I can check later (might be next week) to find out for sure. Sorry for the super late replies everyone, apparently my setting to follow this thread got turned off at some point and I didn't notice it. I've re-enabled it for the future.
  6. KSPTOT author here. Thanks for the shoutout! Yes, KSPTOT can handle RSS solar systems if you feed it the celestial body information it needs to understand the RSS solar system. After that, it's just a matter of designing your tour using the Multi-flyby Maneuver Sequencer tool. Let me know if you have any questions, OP. You can post them over on the KSPTOT forum thread.
  7. Is anyone aware of either (1) any bugs in any of the previous pre-releases I've put out, or (2) any features that they might need but are otherwise not already in KSPTOT (particularly but not limited to LVD)?
  8. Hey there! Check out my KSP Trajectory Optimization Tool for use in generating porkchop plots. You can generate the file describing the OMP solar system easily from within KSPTOT, as well, and everything should "just work" at that point. Let me know if you have any questions!
  9. Hi everyone, Tonight I've built KSPTOT v1.5.9 pre-release 5. There are a lot of nice usability improvements and bug fixes in this one. Here's the change log: LVD: Added a camera controls UI to the View menu. Use this to pan, zoom, and rotate your camera view more effectively. LVD: Added the options dialog for the Second Order propagator. LVD: Tooltip for the warning/error labels is custom and now shows the proper width so everything that is meant to be on one line is actually on one line. Fixed bug in main UI options dialog. LVD: The tool tip string on the time slider text now shows the proper events. A few performance improvements. Please let me know if you find any bugs! Thanks and happy orbiting!
  10. I probably duplicated them accidentally when I was creating the tutorial for you. Delete the duplicated constraints, they are not necessary. This is actually coming soon in the next pre-release. I just haven't had time to get the PR pushed out, but yes, I know that it would be nice! Ahhh, this feature I described might actually not have made it into the last pre-release either. Okay, that would be my mistake if that's true. Well anyway, I'm glad you figured out how to add the constraint scale factors in there! Yes, that's what I meant. Thanks for figuring it out! It was getting late by the end of my tutorial and I missed that step. Thanks! I'm glad everything is working as it should now. Please let me know if you have any more questions!
  11. It's a guess. For an orbit to be hyperbolic (which it will be coming from outside the SoI), C3 must be strictly greater than 1. That's why I set the bounds on C3 to 1.001 and 20. Most hyperbolic C3 values show up in the single digit range so 20 is a safe guess for an upper bound. The actual value of 5.0 km^2/s^2 is just a guess that the optimizer will change as needed. The transfer duration for this trajectory is about 250 Earth days. Half of that is 125 Earth days, or 10800000 seconds. The bounds are just half of that and double that value, for lower and upper bounds respectively. I selected these bounds somewhat arbitrarily and they're also just mostly a guess. Good questions! Let me know if you have more.
  12. Hey sure! I know that LVD can be a bit more challenging to use because, as you said, it does have a ton of options. This is what makes it super powerful, but I do realize that it increases the learning curve a bit (or a lot lol). For what it's worth, I've done a decent job (IMHO) of picking decent default options for things, so usually you don't have to get down in the weeds unless you really want to. Here's how I would go about your Kerbin to Jool mission. Please grab the most recent pre-release of KSPTOT before starting. The general plan is this. We're going to create the initial Kerbin orbit state, then propagate in Kerbin orbit for a bit, use an impulsive delta-v to send us on our way, and then propagate forwards in time to a point about halfway between Kerbin and Jool. The magic then happens next: we are going to jump forwards in time to the Jool periapsis point and then propagate backwards in time to that same half-way point in space. We'll constrain our mission to make these points have the same time, position, and velocity, and we'll maximize the spacecraft mass at the end of the mission at the same time. Use the porkchop plot in the main KSPTOT UI to figure out when to depart Kerbin and arrive at Jool. I found 4291060.8566 sec UT and 25862156.6544 sec UT for those times, respectively. Then tap the Compute Departure button and get your departure delta-v. I got 1800 m/s prograde, 1541 m/s normal, and 256 m/s radial DV. Open LVD. Open up the Initial State dialog (Scenario -> Edit Initial State). Set the Frame Type to Body Centered Inertial. Click Frame Options and select Kerbin as the center of the frame. Set the Epoch to 4291060.8566 seconds. Click the "Opt?" checkbox and then in the first (left, lower bound) textbox enter 4291060.8566/2. Enter 4291060.8566*2 in the right (upper bound) textbox. You'll see that the textbox automatically does the math and evaluates those expressions to the numbers they work out to be, so that's normal. Set your departure orbit to whatever you would like. I used a circular orbit at an SMA of 700 km, but whatever you need is what you can do. Save and close the initial state dialog box. It's time to make our first three events to depart Kerbin: Event 1: Tap the Insert Sequential Event button on the main LVD UI. The Edit Event dialog box appears. Name the event "Coast to Departure DV". Open the Termination Condition dialog box. Enter 2000 seconds into the Event Duration line, check the "Opt?"box, and then 1000 seconds and 3000 seconds into the lower and upper bound textboxes. Save and Close. Save and Close the Edit Event dialog box. Event 2: Tap the Insert Sequential Event button on the main LVD UI. The Edit Event dialog box appears. Name the event "Departure DV". Leave the event termination condition at 0.000 seconds. Click the Add Action button and select "Add Impulsive Delta-v". A dialog box appears. Select the Orbit Frame (NTW) in the delta-v frame. Enter in your delta-vs from the Compute Departure tool into the three left textboxes. Check the three "Opt?" checkboxes. Enter 0 and 5000 for the lower and upper prograde bounds, -2000 and 2000 for normal bounds, and -1000 and 1000 for the radial bounds. Save and close. Save and close the event. Event 3: Tap the Insert Sequential Event button on the main LVD UI. The Edit Event dialog box appears. Name the event "Coast to Jool (+)". The "+" tells me that the event is propagating forwards in time. Tap the termination conditions button again. Enter "10800000.0" seconds into the event duration box, check the "Opt?" box, and then "10800000.0/2" into the left (lower bound) textbox and "10800000.0*2" into the right (upper bound) text box. Save and close. Make sure "Forward Propagation in Time" in selected in the lower right, and "Consider SoI Transitions" is checked. Save and close the event box. Now that we've created the events propagating away from Kerbin, it's time to create the next two that propagate backwards in time from Jool. This is a radical idea but you'll see how powerful it can be, and it's something you could not do in MA at all. Event 4: Tap the Insert Sequential Event button on the main LVD UI. The Edit Event dialog box appears. Title the event "Jool Periapsis State". Set the plotting type from Plot Continuous to Skip First State (three lines below the name). Tap Add Action and select "Set Kinematic State". The dialog box appears. On the Time Tab: Enter 25862156.6544 seconds, check the Opt? box, and then enter "25862156.6544/2" for the lower bound and "25862156.6544*2" for the upper bound. On the Orbit State tab: Set the Element Set to Universal Orbit Elements. Set the Frame Type to Body Centered Inertial. Set the Frame Options to Jool. Set your initial C3 to 5 km^2/s^2, check the Opt? box, and set your lower and upper bounds to 1.0001 and 20.0. Set your radius of periapsis to 7000 km. You can actually use whatever here so long as it's above the atmosphere of Jool, 6200 km. Set your inclination to 0 deg, check Opt?, and set bounds to 0 deg and 180 deg lower and upper respectively. Set RAAN to 0 deg, check Opt?, set bounds to -360 and 360 deg. Set arg peri to 0 deg, check Opt?, set bounds to -360 and 360 deg. Set time past peri to 0 seconds and DO NOT check the Opt? box. Save and close the Edit Action dialog box. Save and Close the event box. Event 5: Tap the Insert Sequential Event button on the main LVD UI. The Edit Event dialog box appears. Call the event "Coast to Jool (-)". The "-" means we are going to propagate backwards in time to me. Open up the termination conditions box. Set the event duration to 10800000 seconds, check the Opt? box, and set the lower and upper bounds to 6480000.0 seconds and 25920000.0 seconds, respectively. Save and close. Set the propagation direction drop down menu to "Backwards Propagation in Time" in the lower right. This is very important! Save and close the event dialog box. The next step is to create constraints for the optimizer that will make the trajectory continuous. To do this, right click the Sequential Events list, and select Create Continuity Constraints option. A dialog box appears. Make the first event Event 5 ("Coast to Jool (-)") and the second event Event 3 ("Coast to Jool (+)"). Select the Time, Position, and Velocity checkboxes. For time, set the scale factor to 10000000 seconds. For position, set the scale factor to 100000000 km. For velocity, set the scale factor to 10 km/s. Save and close. You should get a dialog box with a green checkbox saying constraints were created. Now we just need to create an objective function to minimize fuel usage. On the main LVD UI, Optimization -> Edit Objective Function. Click the Add Obj. Function button. Select the event to be Event 4, the Jool Periapsis State. Set the Scale Factor to be 10. Set the Optimization Type to be Maximize. Save and Close. Now we just optimize the mission! Optimization -> Optimize Mission. This should, in theory, end with all constraints satisfied and a decent objective function value. If you would like to see how I set up your mission, go ahead and load this MAT file into LVD. If you want to keep going in Jool orbit, keep adding events in the order I described above. First propagate forwards in time, then use a Set Kinematic State action to jump to the next periapsis point or other point in space, and then propagate back in time to meet up in the middle of empty space with continuity constraints. Let me know if you need any help! I'm happy to.
  13. Can you check your KSP and KSPTOT log files to see if any errors show up when you push the Create Bodies File menu?
  14. Yes! If you set your inclination, RAAN, and argument to match those in the departure orbit, your departure delta-v should drop considerably.
  15. Hi everyone, Tonight I've built KSPTOT v1.6.9 pre-release 4. Here's the change log: LVD: Added functionality to the script event list right click context to convert Add Impulsive Delta-V actions to finite burns. LVD: Final and initial spacecraft state displays now show earliest and latest state and not first and last state in state log. LVD: Added new UI to fine-tune creating continuity constraints. LVD: Added gravity only RKN1210 high precision integrator. LVD: There should be a 5%-10% performance increase when running scripts for most scenarios, especially those that make use of 3rd body gravity. All single UI apps (MFMS, RMS, etc) now display their central body spheres with the texture and not the colormap, if available. A few misc bug fixes. As always, please let me know if you find any bugs or have any questions! Happy orbiting!
  16. Okay so at this point, when you open up LVD, what works and what doesn't? Do any of the other tools in KSPTOT exhibit any issues?
  17. I wasn't able to reproduce this on my Linux VM. Can you try closing KSPTOT entirely and then reopening it. Immediately go to LVD and then the Halo Orbit Constructor tool. Do you still get the error? Evidently there's a limitation in Linux MATLAB where you can't change the OpenGL rendering method on Linux systems during runtime like you can in Windows. For now, just leave that setting where it is. If that doesn't work for you, then I'm guessing it could be the OpenGL stuff on your system. Investigate into that, and keep me in the loop as far as error messages you get go. I can help investigate them.
  18. As far as the solar system goes, yes, you can import exactly what's in KSP. You'll need to have the KSPTOTConnect plugin installed in the Gamedata folder (it ships with KSPTOT). Then just open up to the Flight Scene (basically, a rocket on the launch pad or in space) and then in KSPTOT, on the main UI, use the File Menu -> Create New Bodies File from KSP. Follow the prompts. As far as time goes, KSPTOT uses "universal time" under the hood for everything. So the year/day/hour/minute/second equivalent times might not be correct, but the UT will be because that's how KSP does it internally too. Yes, it's definitely possible in KSP and you can definitely model it in KSPTOT. Start with finding your flyby sequence in Multi-Flyby Maneuver Sequencer (MFMS). After that, you can export your trajectory to a binary file in MFMS and import it to Launch Vehicle Designer (LVD). You'll need the latest v1.6.9 pre-release 3 for this functionality (see above). Once you do that, you can optimize the trajectory to your heart's content and model the various tanks, engines, and dry mass on your vehicle (plus a bunch of other things!). Let me know if you have questions when you get to this point. Any other questions? I'm happy to answer any you have.
  19. Okay, thanks! So I'm actually going to encourage you to work with Launch Vehicle Designer instead of Mission Architect. LVD is basically everything I had hoped to make MA and a lot more. It's just a far more powerful tool, and while the learning curve is a bit steeper, it's way, way more powerful. You're welcome to post questions here and I'll do my best to help if you'd like. Anyway, glad it's working now!
  20. Oh goodness, that is... bad lol. Okay, some questions first: What operating system are you using? What is the resolution of your monitor set to? Does this happen with any of the other tools/UIs or just Mission Architect? Mission Architect is the only UI I didn't port over to the App Designer framework because it's "bug fix only" for me at this point. In your KSPTOT log, what does the header say for the version of MATLAB you're running? To answer your question, yes, there is actually a way for you to run the command yourself. Do the following: Open up Launch Vehicle Designer. Find the Plugins menu and click Manage Plugins . Create a new plugin with the button on the left. Copy/paste the code you created into the code editing area in the middle. Keep in mind that it's two lines there, and we don't include the ">>". That symbol is just the command prompt. So basically just the following, keeping in mind that you may need to play with that 1.5 number. s = settings; disp('Old Display Scale Factor:'); disp(s.matlab.desktop.DisplayScaleFactor.PersonalValue); s.matlab.desktop.DisplayScaleFactor.PersonalValue = 1.5; Check the box on the right that says to run the plugin before propagation. Check the box on the lower right which activates plugins. There should be a red area that appears when you have plugins activated. Save and close the plugin editor. Propagate the script (control-p). When you are finished with your plugin, your Plugin Manager should look something like this. You might need to restart MATLAB at this point. Can you tell me what happens when you do everything I've described? You probably also need to follow Step 2 in the Accepted answer of this post to calibrate the system DPI. Basically: Please let me know if any of this helps, as well as the answers to my questions above. Thanks!
  21. Hi everyone, I've just build KSPTOT v1.6.9 pre-release 3. This primarily includes the new MFMS data import functionality that I described the other day. I would certainly appreciate if anyone who uses MFMS and LVD could try out this functionality on their end and see if there are any breaking bugs. I have tested the functionality on both the stock solar system and the JNSQ solar system and everything seems to be in order. Here's the change log: MFMS: Inclusion of a new button on the UI that allows for binary data from the last run to be exported to file. LVD: New menu item to create a new mission scenario from MFMS binary data. MA/LVD: Initial state and final state shown in the UI are now the earliest and last (chronological) state in the state log, as opposed to the first and last state log entries. This is important in LVD because of the ability to use Set Kinematic State actions to move around in time, and because propagation can be both forwards and backwards. The Edit Constraint UI now shows the current scaled value of the selected constraint. Please let me know if you find any bugs! Happy orbiting.
  22. Haha, well, I'm glad I could come up with a tool that makes things a bit easier! I look forward to seeing what you come up with for new missions.
  23. Two of the big questions that I always seem to get from new users of KSPTOT and specifically the Multi-flyby Maneuver Sequencer (MFMS) are something in the form of: Why doesn't my MFMS trajectory match what I see in KSP? How do I actually execute my MFMS trajectory in KSP? Unfortunately, while MFMS is excellent for exploring the multiple gravity assist problem trade space, it was never designed to really be used in operations. What was designed to be used in operations, however, was Launch Vehicle Designer (LVD) and its higher fidelity orbit propagation models. Thus, the usual advice for people stuck on these two questions in the past has been "recreate your MFMS trajectory in LVD." Needless to say, this is sort of an ominous task for the beginner as LVD isn't the easiest to use. Today I want to introduce a new tool that will make the process of recreating your MFMS trajectories in LVD much, much easier. Say you start with this Kerbin-Eve-Jool-Eeloo flyby trajectory. Up until today, you basically had to import the trajectory by hand into LVD. This involved creating all of the events and initial state by hand, setting the variables, defining constraints, and everything else. It was definitely time consuming. Notice, though, the new button in the lower right portion of the window that reads Save Results to File for LVD. If you push this, it will prompt you to save a binary (MAT) file with the data generated from the last MFMS run. From there, all you have to do is open LVD up and use the File -> New Mission from MFMS Output menu option. When you do and select the file you just created, you'll see something like this: Well hey, that looks pretty close to the MFMS output! You'll notice that all of the legs of the trajectory have been imported, but they don't quite line up. You can see some discontinuities in the trajectory. If you mouse over the warning about optimization constraints being violated, you'll see that there's a bunch of continuity constraints that need to be brought in. You'll also notice that there are variables in the mission script. Were you to investigate these, you'd see that each impulsive delta-v, each leg's propagation duration, and each flyby periapsis state already has optimization variables associated with them. There's also a "maximize mass" objective function created too. Really, all you need to do at this point is scale the constraints properly and optimize the mission. The whole process has been reduced from 1 hour or more of event creation to just a few minutes at most (and when you get good, I think it's probably closer to just one minute or less). Anyway, after you let the optimizer run for a bit, your finalized mission plan should come in nicely. (Note, in the image that I show here, I imported a slightly different MFMS trajectory because I've been testing with this one. You get the idea though!) Pretty neat, huh? What do you all think?
  24. There is not, sorry. Maneuvers are generated when it becomes necessary for two orbits to be connected in a way that can't be achieved through a passive gravity assist maneuver. Because this, in turn, is strictly dictated by when various bodies are arrived at, there's no way to artificially limit the number of maneuvers.
×
×
  • Create New...