-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gLim disengages #47
Comments
Thanks for the super detailed report. So if I understand correctly: v1.2 correctly held constant acceleration, even if a jettison event occurred during the const-acc phase, but v1.3 suddenly throttles up at this event? And you're sure it's a throttle up, i.e. it's not possible that the mass drops so low that your engine even at the lowest throttle setting cannot hold the requested acceleration? (From the look of those awesome plots I suppose not, but just making sure.) If so, this certainly shouldn't happen. Sounds like an issue with the virtual stage generation, and if so, should be fairly easy to track. I'll look at this as soon as I can. Also thanks for pointing out the issue with engine spool up. I've noticed this in my own designs, I'm pondering on how to do this. I'll open a separate issue for this and ping you there if I have any ideas. Also thanks for the proof of concept for solving #45. I'll test it and push a fix. Oh boy, v1.3.1 here we go ;D |
Thank you for taking this on so quickly :D I remember vaguely, I had a similar problem when going from 1.1 to 1.2, but that was while designing a new launch vehicle, so I didn't think much of it and it has never happened since. Apart from what I mentioned above I don't remember changing anything else about the code in v1.2. Great, I'll have a look into the spool up issue ;) So yes, the #45 solution is more of a brute force approach. I noticed PEGAS crashing, saw this issue and simply went on reducing everything by 1. Don't know if this is a good solution, or simply works in this particular instance. The workaround didn't crash with other vehicles, so maybe it's ok :D |
Hi @theLXMB and sorry for the delay. I've pushed fixes for #45 and #46, feel free to check them out. However, this one will require more of my attention and time - I'll ask for a bit more of your patience, as I'll be unable to work on this for the next 3 weeks, perhaps longer. In the meantime, if you were so kind to provide any details on your first stage (total & fuel mass, engine parameters) to make it easier for me to reproduce your case, I'd be very grateful. |
Hey @Noiredd, I haven't had the time to play KSP myself for the last few weeks, so no problem ;) If I'm lucky I'll be able to have a look at your fixes next weekend. Regarding the gLim problem: calculated from the boot script above the dry mass of the first stage alone should be 17117, propellant 129898+158765, isp and thrust 339.0/5393700 Don't sweat it, take the time you need ;) |
Oh damn, I completely missed the When I get back to this, I'll start with building something that resembles your vehicle as closely as I can, to hopefully reproduce the issue. |
I managed to (roughly) recreate your vehicle today, getting most of the numbers pretty close - masses to within 1 ton, engines a little bit off since I couldn't find the exact parts you're using. Hence I ended up flying triple RD-191's on the first stage, with Isp 337 (vs your 338) and total thrust 6255kN (5% more than yours), and triple RL-10B/CECE (CECE Base config), with Isp 460 (vs your 468) and 201kN total thrust (16% less than yours). I needed to adjust the booster ignition delay from -1.5 to -3.5 seconds, but didn't make the same changes as you did to override the watchdog (wasn't necessary). This is about all the difference from your scenario, but the key factor - mass jettison during const-acc phase - remained very much the same. I estimated the mission parameters from your screenshot, although I had to guess the payload mass, so I put 13 tons on it (a bit too much, it missed orbit narrowly but that's irrelevant). The issue you're describing occurred in my test as well. It is caused by an apparent bug in
For some reason which eludes me at the moment, this post-jettison virtual stage 1 is not being transformed into a pair of const-thrust and const-acc stages, even though it still has the Funny enough, I had one difficulty reproducing your problem, and on the way found another bug: initially, the vehicle flew perfectly well because PEGAS completely ignored the jettison event in the calculations. That was because the event happened exactly between the two stages how they would look like if there was no gLim condition - this line kicked in because So, thank you for pointing those two bugs to me. I'm working on them both now. |
I cracked it. The direct reason is line 723 in There exists a simple fix to the issue: just insert the following alternate clause after the 723-745 block:
This essentially switches the entire stage to the constant acceleration mode and the vehicle performs normally. At least my recreation of your vehicle seemed to ;) Now that was a simple and slightly hacky fix which still leaves the second problem (missing the jettison event). I don't think I'll end up committing the above code into the repo, since there is a better way to fix all the bugs in one fell swoop (also making the code more understandable in the process). The real issue behind all those bugs is that
This ensures that no combination of events will be a surprise, i.e. any order can be dealt with. Additionally, this almost automatically resolves the final issue (user event too close to UPFG-scheduled staging), a situation which cannot be smoothly detected in the current state. Of course it can be argued that this is a user error (one should've either moved the jettison earlier, later, or merge it with the ordinary staging), but at least we will be able to detect the potential issue and emit a warning. |
Wow, that's brilliant! I'll let you know my results once I get around to testing your fix. Thank you so much for working on this! |
That looks promising indeed! That throttle blip would be a pretty serious issue if that was a real world launch vehicle, but let's not analyze that too deeply for now. I'm about to send a PR which completely overhauls |
Hey, updating from v1.2 to v1.3 for most of my rockets the g limiter disengages between fairing separation and burnout of the first stage. This happens to all rockets where the fairings separate after PEGAS throttles the engines for constant acceleration.
Nothing in the boot scripts changed, although I have changed the PEGAS code in a few ways:
In 1.2:
In 1.3
This is the same launch vehicle with the same script, just going from 1.2 to 1.3 including everything mentioned above. The scaling is different, but the sudden throttling is easily noticable:
And here the boot script as it originally was:
With this rocket I could mitigate the problem by moving fairing separation within seconds of burnout without losing an appreciable amount of payload, as there is a around five second delay from jettison to 100% throttle. But with some vehicles it's immediate and I'd need to carry the fairings to way outside the atmosphere.
Apart from that, the ascent trajectory is so much smoother in 1.3, so really good work on that! I (mostly) really enjoy using PEGAS. ;)
The text was updated successfully, but these errors were encountered: