Jump to content

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


cybutek

Recommended Posts

Hope this helps. I built the rocket again fully, then hit the Verbose Log button.

It does... Line 41152 is where the simulation proper starts (the previous 150 lines are the setup for it). This shows that the dodgy engine is incorrectly marked as active and the other engine is activated because it is in the initial stage. So, it is simulating both engines burning at the same time and the top engine presumably burns all its fuel before the lower one. If you turn the thrust limiter on the top engine right down you should be able to slow it down enough that it will still have some fuel left when the lower one runs out and then some deltaV will appear in stage 0. The active flag is read from ModuleEngines.isOperational so I would expect all engines to have this set to false in the VAB and for it to be false during flight until the engine is activated (either by the staging or any other method). I've no idea why this flag is being set while in the VAB but this should give the IFS and/or VSR folks something to look into...

Edited by Padishar
Link to comment
Share on other sites

So I've found a little but annoying bug that only occurs in quite specific circumstances.

Ingredients: KER 1.0.17.0, Interstellar Fuel Switch 1.14, any engine that also contains fuel (I use the Beagle from Stock Part Revamp) and a config that allows that fuel tank to be switched.

Recipe: Build a simple rocket that consists of any pod, any fuel tank, the aforementioned engine, a decoupler, some more fuel tanks and any other normal engine.

The problem is that KER doesn't calculate any ÃŽâ€v or TWR etc info for the rocket. Here's a picture that should help illustrate it:

http://i.imgur.com/YVNiwjr.jpg

You can (faintly) see the bottom two tanks and Swivel engine, (clearly) see the engine info, the Fuel Switch info and KER not accounting for this. The log gets spammed with

NullReferenceException: Object reference not set to an instance of an object
at ModuleEngines.CalculateThrust () [0x00000] in <filename unknown>:0

at ModuleEngines.ThrustUpdate () [0x00000] in <filename unknown>:0

at ModuleEngines.FixedUpdate () [0x00000] in <filename unknown>:0

(Filename: Line: -1)

NullReferenceException: Object reference not set to an instance of an object
at StackIconInfoBox.Update () [0x00000] in <filename unknown>:0

(full log here)

Removing InterstellarFuelSwitch does fix this issue, but then again, so would removing the modded engine or KER.. So, it's a little bug and one that I don't necessarily expect a fix for (though I'd like it), but it effectively renders that engine useless (which is annoying as it comes before the Terrier in the tech tree).

Huh, I just found the same bug with the CMM-158 radial liquid booster from Novapunch. Same error spam too.

Link to comment
Share on other sites

Are you using InterstellarFuelSwitch too? Have you tried removing KER and confirming if the spam stops or still happens? As I said before, I don't think this is caused by KER, it looks like stock code getting upset by some underlying problem with these engines. I suspect the engine is probably marked as operational, which confuses KER, because of the exception in ModuleEngines.FixedUpdate.

Link to comment
Share on other sites

I'm not blaming KER, just confirming that I'm seeing the same thing. I haven't checked if it still happens without KER and yes I'm using interstellarfuelswitch.

I wonder if some outdated KSPAPIextensions may have something to do with it.

Link to comment
Share on other sites

The deltaV calculations for air-breathing engines was modified to correctly ignore the mass of the IntakeAir in certain calculations to fix the incorrect burn times and deltaV. Are you saying that you were using 1.0.16.6 in KSP 1.0.4 and it was giving correct values for the intake air usage? If so, then the problem should be fairly easy to track down...

I didn't calculate what the true values were when running 1.0.16.6 and compare them, so I can't say for certain.

All I know is that values above 0% were shown then and aren't now. Whether those values were correct or not, I don't know. Sorry.

Immediately after I posted this, I saw that you wrote you'd pushed a new build which should correct the issue. Good deal.

Edited by Migz-DH
Link to comment
Share on other sites

First off, I just want to say that I LOVE your mod (even more since you added the two little HUD displays), it is always the first one I install and I never consider playing without it! They really need to make it stock one day.

But one suggestion: have you considered adding a "Lift/Weight" ratio of some kind, particularly in the hangar?

I used to love making glider type planes by adding up the lift ratings of all the wing parts until it was higher than the weight of the plane, making it a dream to fly as it takes off without even lifting the nose and can practically land itself. But this is time consuming even with stock, and almost impossible with mods like B9's procedural wings.

Thanks, and keep up the great work!

- - - Updated - - -

Huh, I just found the same bug with the CMM-158 radial liquid booster from Novapunch. Same error spam too.

I haven't checked the logs, but I don't get a TWR when using the thermal engine in the MK2 stock-like extensions pack, but I assumed that was just because KER didn't know what to do with uranium. I don't have the interstellar switch mod added.

Link to comment
Share on other sites

Hi, first of all, thank you for this mod. I can't imagine playing without it. It has taught me a lot of new things.

Second, I have noticed that the horizontal speed behaves in a way I wouldn't expect it to. For example, right after a vertical launch it immediately starts to grow, despite no horizontal speed relative to the surface. Or when I land on Minmus and then go on a suborbital trajectory, horizontal speed changes, I think it should be constant. I don't know if that's a bug or I am just being stupid. :blush:

Link to comment
Share on other sites

Hi, first of all, thank you for this mod. I can't imagine playing without it. It has taught me a lot of new things.

Second, I have noticed that the horizontal speed behaves in a way I wouldn't expect it to. For example, right after a vertical launch it immediately starts to grow, despite no horizontal speed relative to the surface. Or when I land on Minmus and then go on a suborbital trajectory, horizontal speed changes, I think it should be constant. I don't know if that's a bug or I am just being stupid. :blush:

I've noticed that too; I think it's a recent change. I used to use KER's horizontal velocity indicator to execute landings. I'd aim at the horizon parallel to the surface retrograde marker, burn until my horizontal velocity was close to zero, and then do a suicide burn. This doesn't work anymore, though, because I can't get the horizontal velocity down to zero.

Link to comment
Share on other sites

I've noticed that too; I think it's a recent change. I used to use KER's horizontal velocity indicator to execute landings. I'd aim at the horizon parallel to the surface retrograde marker, burn until my horizontal velocity was close to zero, and then do a suicide burn. This doesn't work anymore, though, because I can't get the horizontal velocity down to zero.

KER just displays an internal KSP value. There used to be a bug in the calculation of this value that made it noticeably wrong in some situations so Squad "fixed" it in 1.0.3. Unfortunately the "fix" is also incorrect and is actually worse than before because it is now wrong in more situations, including the most useful ones like landing. Squad are aware of it and a better fix is planned.

Meanwhile, we will probably have to change KER to do the calculation properly ourselves until Squad release a fixed version.

Edit: I've just submitted a PR that fixes this.

Edited by Padishar
Link to comment
Share on other sites

Thx for the fantastic mod, the game is almost unplayable without it.

Any change of getting orbital speed at important points on the orbit, like Peri in a future release. Its definately not in there now

Its really useful to have this other than working out the Visviva equation everytime When you are on a really eliptical orbit thats days away from peri and you have no idea what your speed will be when you get there. :)

Edited by leocrumb
Link to comment
Share on other sites

Any change of getting orbital speed at important points on the orbit, like Peri in a future release. Its definately not in there now

Its really useful to have this other than working out the Visviva equation everytime When you are on a really eliptical orbit thats days away from peri and you have no idea what your speed will be when you get there. :)

Yes, I think it would be quite useful to have speed at Ap and Pe options in the Orbital category. It should only take a few minutes to add them in...

Link to comment
Share on other sites

If it wouldn't be too much of a bother - if a stage has fuel and only Vernor engines (RCS) and no fixed engines, would it be hard to include them in the displayed calculations as if they were normal engines?

On my very light probes/drones/helpers/modules that do require RCS and quite a bit of it, I often forfeit the main engine entirely in favor of Vernors and I'd be very glad if I could get my dV readouts for these.

Link to comment
Share on other sites

Yes, I think it would be quite useful to have speed at Ap and Pe options in the Orbital category. It should only take a few minutes to add them in...

I've submitted a PR for this...

If you are adding readouts I've found myself wishing for a "time until atmosphere encounter" readout when aerobraking. :)

That would take a little more working out but, helpfully, it looks like the Orbit class already contains some helpful functions that will do what we want. Assuming a spherical atmosphere means it should be able to use Orbit.TrueAnomalyAtRadius and Orbit.GetUTforTrueAnomaly to work out the time of the encounter. Hopefully that will give the correct point (i.e. the next point you will hit) or some extra tweaks will be needed. Thankfully, due to how Keplerian orbits work, it should only need the true anomaly to be negated to get the other point (and possibly adding on an orbital period to make sure it ends up in the future).

Not sure whether it should live in the orbital or surface sections...

If it wouldn't be too much of a bother - if a stage has fuel and only Vernor engines (RCS) and no fixed engines, would it be hard to include them in the displayed calculations as if they were normal engines?

On my very light probes/drones/helpers/modules that do require RCS and quite a bit of it, I often forfeit the main engine entirely in favor of Vernors and I'd be very glad if I could get my dV readouts for these.

I would like to calculate deltaV for vernor/rcs based craft but the main difficulty lies in either correctly deciding which stages it should be done in or in devising a nice UI for the user to be able to control it. It might still be reasonably useful if it only did it for the final stage, so once the simulation gets to the end it would work out if any RCS based thrust is possible and would calculate it then as an extra stage. The calculation is a bit involved as it needs to take into account the directions of the thrusters and their individual ISPs just as for normal engines. It may happen at some point but no promises...

Edited by Padishar
Link to comment
Share on other sites

Jodo42:

First pair of pics: KER is assuming the upper part is dead mass that can be discarded before burning the engines. It has no way to designate payload aside from the root part, if you reroot from a part in the upper section it will give correct readings.

Second pair of pics: Not 100% sure. Might be easier to diagnose if you click the "All Stages" button.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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