Jump to content

[1.3.0] Kerbal Engineer Redux 1.1.3.0 (2017-05-28)


cybutek

Recommended Posts

Anyone have an issue with KER only giving you data on the first rocket you loaded? As in you load up a 5 stage rocket and everything displays properly, then you decide to load an SSTO and KER gives you the info for the 5 stage rocket? Only way I've been able to fix it is by reloading the game...fine if you are flying one ship for a couple hours, then decide to do something else in the game...its usually about ready to crash anyways, but I'm building two 3-part Duna ships in orbit. I hope I'm doing something wrong, cuz I'd rather trial-and-error it, than reload the game every 10 minutes.

Sorry if this has been answered before, but with 75 pages to read..I wanna go to Duna!!

Thanks in advance.

(edit - spelling)

Link to comment
Share on other sites

I've got two problems with KER 0.6.2.3: First of all, the dv calculation sometimes stops updating while building a rocket in the VAB. I add more stages, or more weight to existing stages, and it just doesn't calculate any new values at all. I might have worked around it once or twice by removing and rebuilding entire stages, but so far this happens rather annoyingly often. Second, and maybe related to KER stopping the dv calculations, is that it doesn't seem to care about my fuel lines. I expect the dv to rise if I add asparagus-style fuel lines and staging.

Reading that the dv calculation code is being worked on right now, I'll eagerly await the next release. Just wanted to leave my report here, in case it is of any use.

Link to comment
Share on other sites

I've got two problems with KER 0.6.2.3: First of all, the dv calculation sometimes stops updating while building a rocket in the VAB. I add more stages, or more weight to existing stages, and it just doesn't calculate any new values at all. I might have worked around it once or twice by removing and rebuilding entire stages, but so far this happens rather annoyingly often. Second, and maybe related to KER stopping the dv calculations, is that it doesn't seem to care about my fuel lines. I expect the dv to rise if I add asparagus-style fuel lines and staging.

Reading that the dv calculation code is being worked on right now, I'll eagerly await the next release. Just wanted to leave my report here, in case it is of any use.

Usually that's because you haven't got the stages in the right order and KER thinks you're going to drop a load of fuel before it's ever used.

Link to comment
Share on other sites

I've got two problems with KER 0.6.2.3: First of all, the dv calculation sometimes stops updating while building a rocket in the VAB. I add more stages, or more weight to existing stages, and it just doesn't calculate any new values at all. I might have worked around it once or twice by removing and rebuilding entire stages, but so far this happens rather annoyingly often. Second, and maybe related to KER stopping the dv calculations, is that it doesn't seem to care about my fuel lines. I expect the dv to rise if I add asparagus-style fuel lines and staging.

Reading that the dv calculation code is being worked on right now, I'll eagerly await the next release. Just wanted to leave my report here, in case it is of any use.

Usually that's because you haven't got the stages in the right order and KER thinks you're going to drop a load of fuel before it's ever used.

Usually, yes. But I had the same issue last night, and I could remove the main engines without any change in the calculations. I got it to the point where it refused to calculate anything and the window was blank. Staging was correct when launched.

Link to comment
Share on other sites

Some of the issues with the calculations freezing are definitely caused by bugs in the simulation code. I believe that my modified version of the code has fixed these issues.

Crazor, I've not noticed any issues like you describe with fuel lines. I have quite a few asparagus and onion rockets and the deltaV values were always correct (and still are with the new code).

As for the typo in the rendezvous window, I've noticed it several times and have meant to say something about it but always forgot. I have added another commit to my pull request that fixes this.

Link to comment
Share on other sites

I figured it out. If I use tanks from the Horizon Aeronautics pack, it stops calculating DV below the tank.

http://forum.kerbalspaceprogram.com/threads/71835-0-23-Horizon-Aeronautics-Zenit-3SLB-v1-1

Edit: Any parts from that pack cause kerbal engineer to refuse to calculate any dV.

Thanks for working this out. I suspect the tanks from that mod have something "wrong" with them as far as KER is concerned and this is causing an exception in the simulation code causing the calculations to be aborted and possibly leaving KER thinking that the simulation is still running (so it doesn't run it again). I'll download it and have a look if I can see what is going wrong...

Edit: I've just downloaded the pack and my new code manages to calculate the deltaV with no problems for all the engines and fuel tanks. I'll give it a try with the 0.6.2.3 version in a little while...

Edit 2: By the way, that mod was updated to v1.1 yesterday so if you haven't got the latest version of it then I would give that a try. They may have fixed something in the definitions of the parts.

Edit 3: I've just tried it with 0.6.2.3 of KER and, sure enough, the simulation code is dying, though I haven't dug into it to see exactly why (not much point since my new code fixes it).

Edited by Padishar
Link to comment
Share on other sites

Crazor, I've not noticed any issues like you describe with fuel lines. I have quite a few asparagus and onion rockets and the deltaV values were always correct (and still are with the new code).

As I said, maybe it's because of the first problem I described, and it just stopped calculating while adding the fuel lines (and it stopped on me often yesterday).

I always wanted to give KSP plugin coding a shot, so I'm fiddling around with a build system (on OSX) right now, and if it works, I'll try the new code Padishar pushed to GitHub. Don't want to install VS in a VM, but XamarinStudio/MonoDevelop should work, shouldn't it? Padishar, if you like, you can PM me a binary of the code you pushed, so I can see if it fixes the problems I encountered.

@GavinZac: I'm playing KSP since .18, and have used older versions of KER which worked just fine. It's not because of funky staging, I'm pretty sure.

Link to comment
Share on other sites

@GavinZac: I'm playing KSP since .18, and have used older versions of KER which worked just fine. It's not because of funky staging, I'm pretty sure.

When trying to help someone, it is better to assume ignorance than expertise. Good luck!

Link to comment
Share on other sites

No Problem, GavinZac.

Padishar, I managed to build the .dll from your master branch. Had some xcopy error 127, but at least Xamarin spewed out the Engineer.dll amidst some other stuff, so I copied it over to my KSP dir, loaded up the ship that gave me problems yesterday, and so far I'm happily attaching and detaching whole stages, fuel tanks, engines, fuel lines, and the delta v updates just as I would expect it to.

I'll test it some more with different rockets and report my findings here.

Link to comment
Share on other sites

Doh! I've just sent you a link to the zipped dlls in a PM. I should have checked the thread first...

Could I perhaps get a copy of that zip? I've got this problem as well and if replacing some dlls will fix it that'd be great.

Link to comment
Share on other sites

Ok i posted it in another thread but i will post it again here :)

I think there are two feaures that woudl be extremly helpfull:

- Undocking event simulation - player woudl be able to state that between 76 and 77 stage (or 24 and 15 maybe?) undocking of specific port occured. That woudl influence delta v calculations.

- Docking simulation - player woudl state that after x stage y kg was added to ship.

Link to comment
Share on other sites

Yeah... I'm not quite yet willing to delve into KSP Coding again, but this particularly concerns me:

SimManager.cs

"catch { /* Something went wrong! */ }"

now, he is try/catch-and-ignore file io (why, idk... if it doesn't exist or there is a disk error the "crash" is more valuable than pretending you have no "bugs") but that is relatively benign, here he seems to indicate he KNOWS something is wrong and put the try catch in to mask massive underlying problems. Meh, I just realized I never really liked how unoptimized the simulation code was in the first place.

Right now, I'm looking at the "Threading Optimization" because he's trying to do it without a stack, which can be very dangerous (Remember, to be thread safe you should be able to enter into the program at any point in execution. If a flag changes mid-processing you have created a "bad situation"... even if that is only 100 cycles away from being "ready to execute".)

Only issue there is that it is "unsafely safe" due to a human being at the controls (I mean, less than a millisecond there)... but the plugins are all threaded anyways, aren't they? Perhaps not via the Primary OS but via Unity and how it handles the memory and processing. If it can interrupt the plugin to divert resources elsewhere then it certainly can turn that 100 cycles into 10000 cycles or longer.

*randomly ranting, doesn't matter I guess... thing keeps on crashing on me and it is getting annoying.

Link to comment
Share on other sites

Don't criticise the code too much (even though it is pretty bad), it's been through a number of major KSP updates that have completely trashed the whole thing. The basis of KER is still on old code that was put down back in 0.16 when it was a small mod for myself and released just for the hell of it. The only real solution for KER is a complete redo in my opinion, and that's where 1.0 comes in. The only things left to redo in 1.0 is the simulation code and the rendezvous readout modules. The simulation code is the biggest part to redo, a part which cannot be easily done with little chunks as and when time allows. I am eagerly awaiting the fruits of Padishar's efforts, of which will be implemented ASAP into 0.6 when all the issues have been ironed out. Shortly followed by an official release of 1.0.

Link to comment
Share on other sites

I am eagerly awaiting the fruits of Padishar's efforts, of which will be implemented ASAP into 0.6 when all the issues have been ironed out. Shortly followed by an official release of 1.0.

A quick update on progress for anyone not following the Test of new KER deltaV simulation code thread. The new simulation code appears to be much better but a couple of issues have cropped up with the Horizon Zenit mod.

First, this mod sets the electric charge on the engines to be tweakable even on those with zero capacity and this seems to trigger a bug in KSP that, when you open the tweak panel, it shows NaN/0.0 and this breaks the mass calculations (with knock on effects on other values). I have worked around this and reported it to the author who will fix it in the next release of his mod. I will also report it to Squad as a KSP bug as it should just refuse to make it tweakable if the capacity is zero.

The second issue is that KER is not currently handling engines with multiple engine modules correctly. It only uses one of the modules for the calculations which results in wildly wrong thrust (and hence TWR) values and (usually) somewhat less wrong ISP (and hence deltaV) values. This will require considerable work to fix "properly" as I think different engine modules could theoretically use different propellants which may mean sub-engines could burn-out part way through a stage, changing the effective ISP (as well as effectively simulating the individual engine modules as separate engines, this also needs the simulation to calculate the effective isp of the stage backwards from the stage's deltaV). Hopefully I will be able to look at this over the next few days.

There are a number of more intricate tweaks that could be done such as taking account of the orientation of engines which may be useful for landers with splayed out radial engines or shuttle type designs with angled main engines where some of the thrust is wasted but they need more thought to work out how to do them properly (e.g. this example actually needs the deltaV to be calculated as the final magnitude of the vector sum of the individual engine contributions throughout the stage to account for both early burn out and the direction of the thrusts).

Link to comment
Share on other sites

There are a number of more intricate tweaks that could be done such as taking account of the orientation of engines which may be useful for landers with splayed out radial engines or shuttle type designs with angled main engines where some of the thrust is wasted but they need more thought to work out how to do them properly (e.g. this example actually needs the deltaV to be calculated as the final magnitude of the vector sum of the individual engine contributions throughout the stage to account for both early burn out and the direction of the thrusts).

Don't know if it's worth asking sarbian about that, since MechJeb can include cosine losses in its dV calculations.

Edited by ObsessedWithKSP
Link to comment
Share on other sites

You haven't exactly given us a lot to go on. Which version did you used to have and which version are you having the problem with? Did you delete the old version before installing the new one? What does "it stops" mean? Does KSP quit or does it hang? Have you looked in the KSP_Data\output_log.txt file for any information?

Link to comment
Share on other sites

You haven't exactly given us a lot to go on. Which version did you used to have and which version are you having the problem with? Did you delete the old version before installing the new one? What does "it stops" mean? Does KSP quit or does it hang? Have you looked in the KSP_Data\output_log.txt file for any information?

Oops, turns out i accidently had two installs. Now it works. But it seems i am having a problem that i didn't have yesterday. Everytime i load the game, it stops on a different mod, and doesn't load. I exit, delete that mod, reeinstall it, but then another mod doesn't work. So it's not actually a problem with this mod. This mod now works, or at least it would when the game loads :P I will continue my current strategy :D

I'll ask my problem someplace else as it doesn't have to do with this mod annymore :)

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