Jump to content

Arrowstar

Members
  • Content Count

    2,245
  • Joined

  • Last visited

Everything posted by Arrowstar

  1. You're running into a case where the true anomaly target you want is too close to the discontinuity at 0 degrees and the integrator is getting confused. There's not much I can do about this except suggest using a smaller maximum integrator step size or smaller integration tolerances. That said: I cannot recommend enough avoiding the true anomaly termination condition in particular and most of the non-duration event termination conditions in general. Things can get numerically very unstable with these just as a matter of physics. Time is the only genuinely stable parameter to target or
  2. There's definitely nothing wrong with letting the code figure out the best place, so long as you get close. You can also always just set a true anomaly constraint at the end of your event and let that handle it if there's a definite place you want your maneuver. But the optimizers are pretty good, so as long as you get close, they should figure out the best spot on their own without much effort. I'd need to see the MAT file for the second thing you mentioned.
  3. Going to a true anomaly of zero is actually pretty tricky because of the 360 -> 0 discontinuity there. I would ask yourself if you really, truly need to propagate to periapsis. What are you trying to accomplish by doing that? Is it something that you can just let fall out of the optimization naturally? Same thing the "leave Kerbin SOI" event: do you really need to propagate to that or can you just coast for some period of time and let the SOI transition happen naturally?
  4. When I went to go optimize, I saw this first thing in the log: This is definitely going to be the problem. One of your variables is probably right on a bound. Figure out which one it is and push it to be just inside the bounds. Also, I noticed that you had your optimization objective function as minimize distance to body and a constraint for periapsis. This is a bit redundant. I would consider switching your objective function to Maximize Mass. In general, I think LVD is the superior tool for just about everything at this point. Yes, it's more complicated, but it's wo
  5. Okay, there's a bug in the dynamic pressure calculation in GA. I think I've got it isolated and I'll fix it tonight or tomorrow. EDIT: Nevermind, what I thought was wrong is not wrong. The search continues. EDIT2: Okay, here's what I think is going on, and why I think this isn't a problem. At 61.366 seconds, the vehicle in your MAT file hits a point where the slope of the atmospheric density curve (which, remember, is a piecewise linear curve as far as KSP models it goes) changes drastically. This point in time is also when the dynamic pressure curve starts ascending again. I'm
  6. This afternoon I've build KSPTOT v1.6.8 pre-release 3. This PR has a bunch of new features that I'm looking forward to sharing. Here's the change log: LVD: T2W throttle model now checks minimum throttle T2W as well as maximum. LVD: Sim Driver now warns if integrator output event index (ie) is empty. LVD: When editing non-seq events, the event UI now greys out any non-relevant widgets. LVD: New geometry type: Angles. Angles measure the angle between other geometric objects. Right now there are angles between vectors and angles between a vector and planes.
  7. The final state does correspond to event 7. The issue is that your two coast segments both say to go to a true anomaly of 0, but event 4 is already at 0 and the Event 6 DV is all zeros, so there's nothing to be done. That's why they don't propagate out in time further.
  8. Okay. And can you describe for me what you wanted to do, what actually happened, and how I can reproduce the issue? EDIT: I couldn't reproduce any hanging while optimizing, but it did take a while because the optimizer step size got pretty small in the last iteration. This is probably because the constraint values aren't well scaled, which is sort of a flaw in the way MA is set up. I might encourage you to go give Launch Vehicle Designer a try. Despite its name, it's really an all-around better spacecraft mission design tool, and can help you avoid some of these issues.
  9. Check out the "lvdExample_TwoStageToOrbit.mat" example that's included with the main KSPTOT download. It's not a single stage to orbit like you're asking, but I think it's close enough to illustrate what you need. Let me know if you have any questions with it. Can I see the MAT file?
  10. Thanks for the reminder! At this point it'll be next week, but I'll look into it. It is not, sadly. LVD case files are basically made up of objects instatiated from user-defined classes, and there's no way to export those in a reasonable manner to anything other than a binary format like MAT. This is also why you're running into issues with trying to read the file externally: it's basically just a bunch of pointers with some data here and there that MATLAB can understand with the help of the class definitions (which you don't have). You're not going to be able to open LVD MAT in O
  11. I've tested KSPTOT on just about every version of MATLAB since R2019b and I've never had an issue with backwards compatibility thus far. I'm not saying it can't happen, but I haven't seen it. In general, KSPTOT should work fine on newer versions of MATLAB.
  12. If you have MATLAB R2017b, the executable should just work. If you have a version equal to or greater (newer) than R2017b, you can pull the source code off github and run it directly (projectMain.m).
  13. It's not deprecated, but it's also not under active development anymore. I still release bug fixes and the like for MA from time to time as needed, but LVD has quickly become much easier to maintain and expand. MA still has a place when you need very quick, analytic two-body propagation and impulsive delta-v in a simple trajectory, but LVD is generally what I've been recommending to people now.
  14. The solution is to do this in LVD and not MA. I have done something very similar actually and it's already available as an example. Check out the LVD example "lvdExample_BackPropagationExToDunaViaMun.mat" that ships with the KSPTOT download package. It shows you how to set something like this up using patch points and continuity constraints. Let me know if you have any questions. Both of these have been added for next release. In particular, when integration gets unstable, you'll now see a red error message in that area of the UI that suggests what to do.
  15. You're probably right, actually. It'll take a bit of thought to figure out how to do that, because most of the errors and warnings are discovered after propagation has occurred, whereas this is something that happens more at "runtime" as it were. But yes, you're right, there should be a warning for it. I'm not actually sure if it's possible to set the scroll position of the textbox directly. I'll have to look into that. Sure. When you run into numerical stability issues, switching to a fixed step size integrator like ODE5 can go a long way towards fixing the problem. This
  16. The issue here is that, for whatever reason, your integration is numerically unstable. If you check your output log, you'll see a bunch of warnings about the integrator not being able to hit the desired integration tolerances at the minimum step size. This is causing the integration to terminate early and thus you see what appears to be a different vehicle behavior. Try switching events 5, 7, and 8 to the ODE5 integrator and pick a step size (1 second is probably okay, but you can lower it to get a bit more accuracy). After I did this, I saw about 250 km of altitude at the final state cons
  17. I think I've got this one figured out. It was an issue where the minimum thrust to weight achievable (at zero throttle) was actually greater than your target T2W ratio, causing the system to basically not know what to do. I've added a check for this case, which is in addition to the existing check for a maximum T2W being less than the target T2W.
  18. Hey that's like a 25-30% performance improvement! Not bad, not bad at all. I have to laugh at your "overdue for an upgrade" comment though because I'm still rocking a 3rd generation Core i5 lol.
  19. Anyone know if this bug is resolved or mitigated in KSP 1.11.1? I didn't see anything in the release notes but I also don't have a chance to fire up KSP right now.
  20. Hi everyone, This afternoon I've built KSPTOT v1.6.8 pre-release 2. Here's the change log: LVD: Added three new constraints: ground object elevation, azimuth, and range. MA: Mission Animator now properly rotates central celestial bodies. LVD: Added a new vector, vector projected onto a plane, to the geometry system. LVD: A few bug fixes and performance improvements. Please let me know if you find any bugs or have any suggestions. Thanks!
  21. I think I'll probably leave it for now, as this is the only use. However, it's worth noting that because you're plotting orbits, there shouldn't an expectation for the rotation of the body to mean anything, since those orbits take place over a wide range of times. You could always just note this somewhere and be done with it. Most professional trajectory design software that can show body surfaces doesn't worry about it too much. Great, glad you figured it out. Your final orbit is there, but you're viewing the full trajectory within the Duna SoI so that's why things look small. Yo
  22. Unfortunately this proved to be quite the pain in the neck. I don't think it'll be possible. You can always export the lat vs long from Graphical Analysis to see the 2D trajectory, of course. In MA's main display, the body does not rotate at all because there is not really a singular time to rotate it to. I've fixed the issue for mission animator, though. The central body will now rotate properly. I suppose. What's the use case here? I generally feel like the textured spheres are an improvement all around and there isn't much of a reason to go back to them.
  23. Hi everyone, Tonight I've built KSPTOT v1.6.8 pre-release 1. This pre-release introduces a major new feature to Launch Vehicle Designer, the geometry system. Please see my post above for details. Here's the full change log: LVD: The function to export a kOS CSV file has been updated to allow users to select the event(s) they want to export. LVD: Introduction of the geometry system. LVD: The "launch vehicle" menu is now called "scenario," and the "edit launch vehicle" menu beneath it is now called "edit vehicle configuration." Some additional bug fixes and perfor
×
×
  • Create New...