Jump to content

[1.3](Jun04/17) Automate Vertical Velocity and Altitude Control


Diazo

Recommended Posts

I'm encountering some NRE errors when debris gets blown up but i'm not sure if it's this mod or KJR. The errors seem to start with KJR though, any ideas?

11 explosions created.

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

Packing Armadyne HX-Z8 Bengal-Class Carrier Debris for orbit

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

Packing Armadyne HX-Z8 Bengal-Class Carrier Debris for orbit

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

Packing Armadyne HX-Z8 Bengal-Class Carrier Debris for orbit

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2[Vessel,System.Int32].get_Item (.Vessel key) [0x00000] in <filename unknown>:0

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

(Filename: Line: -1)

[SmokeScreen PersistentEmitterManager] : FixedUpdate cleaning parent go

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

[SmokeScreen PersistentEmitterManager] : FixedUpdate cleaning parent go

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

[SmokeScreen PersistentEmitterManager] : FixedUpdate cleaning parent go

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

[SmokeScreen PersistentEmitterManager] : FixedUpdate cleaning parent go

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

[SmokeScreen PersistentEmitterManager] : FixedUpdate cleaning parent go

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

[SmokeScreen PersistentEmitterManager] : FixedUpdate cleaning parent go

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

TWR1 Fixed Fail: 8 System.NullReferenceException:

at (wrapper managed-to-native) UnityEngine.Component:InternalGetGameObject ()

at UnityEngine.Component.get_gameObject () [0x00000] in <filename unknown>:0

at Vessel.recurseCoMs (.Part part) [0x00000] in <filename unknown>:0

at Vessel.findWorldCenterOfMass () [0x00000] in <filename unknown>:0

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

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

TWR1 Fixed Fail: 8 System.NullReferenceException:

at (wrapper managed-to-native) UnityEngine.Component:InternalGetGameObject ()

at UnityEngine.Component.get_gameObject () [0x00000] in <filename unknown>:0

at Vessel.recurseCoMs (.Part part) [0x00000] in <filename unknown>:0

at Vessel.findWorldCenterOfMass () [0x00000] in <filename unknown>:0

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

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2[Vessel,System.Int32].get_Item (.Vessel key) [0x00000] in <filename unknown>:0

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

(Filename: Line: -1)

TWR1 Fixed Fail: 8 System.NullReferenceException:

at (wrapper managed-to-native) UnityEngine.Component:InternalGetGameObject ()

at UnityEngine.Component.get_gameObject () [0x00000] in <filename unknown>:0

at Vessel.recurseCoMs (.Part part) [0x00000] in <filename unknown>:0

at Vessel.findWorldCenterOfMass () [0x00000] in <filename unknown>:0

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

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

TWR1 Fixed Fail: 8 System.NullReferenceException:

at (wrapper managed-to-native) UnityEngine.Component:InternalGetGameObject ()

at UnityEngine.Component.get_gameObject () [0x00000] in <filename unknown>:0

at Vessel.recurseCoMs (.Part part) [0x00000] in <filename unknown>:0

at Vessel.findWorldCenterOfMass () [0x00000] in <filename unknown>:0

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

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

B9.Structure.HX2.H collided into B9.Structure.HX1.H (Armadyne HX-Z8 Bengal-Class Carrier Debris) - relative velocity: 48.57705 - impact momentum: 48.6

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

B9.Structure.HX2.H Exploded!! - blast awesomeness: 0.5

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

[B9.Structure.HX2.H]: Deactivated

Link to comment
Share on other sites

@The Space Man:

Looking at that, I suspect it is in KSP itself and not actually an "error", despite what both this mod and KJR are reporting.

What is happening is that in the physics tick that a part is destroyed, the part still exists in memory until the end of that physics tick, but it has no actual physical values.

So this mod sees the part "exists", tries to find the part's center of mass which no longer exists as the part has been destroyed, and so throws that error.

Then the next physics tick KSP cleans up after itself and deletes the part that has been destroyed so the error is not thrown in the next frame.

I would assume something similar is happening to KJR.

As long as there is no gameplay effects and the message only comes up once per destroyed part, I would classify this as normal behavior. I'll modify the error message this mod throws to make that clear for the next version but it should be safe to ignore that error.

Well, safe to ignore as long as there is no other things happening, this should be a "silent fail" that you would not even notice if the output log was not visible to see the error message.

D.

Link to comment
Share on other sites

Why am I getting "no vessel" in the "vertical velocity control" window?

Only that text shows up and no buttons.

That is an error indicating that the GUI code can not find a vessel for some reason.

It should only come up in a situation where you are not controlling a vessel, such as after a crash in which all parts of the vessel were destroyed.

If you are in fact in control of a vessel that is a bug I will need to fix.

Can you please post a copy of your output_log.txt from you KSP\KSP_Managed directory so I can see any errors with a short description of how it is coming up? That should allow me to figure out what is going on.

D.

Link to comment
Share on other sites

  • 1 month later...

I'm about 50% done updating this mod.

As I feared, the changes to how engine thrust is calculated means all the math used by this mod is now wrong. I'm going through and revising my numbers and should have the update out tonight.

D.

Link to comment
Share on other sites

Version 1.19

Download here.

-KSP 1.0 Update, no functionality changes. (KSP 1.0.2 also)

Note that due to engines changing for the new aero model, this is a breaking update. KSP 1.0 players must update to version 1.19, KSP 0.90 players must stay on version 1.18

However, if you really want to summon the kraken for some reason, version 1.18 does a really good job of that on KSP 1.0

Happy KSPing all.

D.

Edited by Diazo
Link to comment
Share on other sites

That means that the GUI part of the mod can't find the vessel for some reason.

Most likely the partModule did not get added correctly. You do have the updated ModuleManager installed and control of the probe correct? If there are no parts with the ModuleCommand part module, then there is nothing for this mod to attach to.

There are no errors in the log? (Alt-F2).

D.

Link to comment
Share on other sites

Hi! I registered (first post) to first of all say that this is a great mod! :) I am new to KSP mods and this is one of the first I tried.

But I also wanted to say: could you add on the first page that ModuleManager is needed? I spent a good hour and a half wondering why it wouldn't work and only displayed "no vessel", especially for people not used to KSP modding. (noobs like me)

Thanks again for that great tool!

Link to comment
Share on other sites

Ack, sorry about that.

I could have sworn it did mention it, I must have gotten too aggressive updating the first post for KSP 1.0

Thank you for bringing that up, it is fixed now.

D.

Link to comment
Share on other sites

That shouldn't be an issue, the TWR should automatically account for the body you are orbiting.

I'll run a test and see if I can replicate.

D.

edit: Unfortunately a bug in another of my mods took longer then I expected and I was not able to look at this tonight. For reference, the TWR1 Low message is supposed to come up when an 80% throttle setting is less then TWR of 1. (Or a 100% throttle with a TWR of less the 1.25.) I suspect I'm calculation the available upwards thrust incorrectly as that changed in KSP 1.0 and I missed something when I updated. This will be the first thing I look at tomorrow, until then the Velocity Control should still work even if the TWR1 Low warning is displaying.

Edited by Diazo
Link to comment
Share on other sites

Alright, I was able to take a look at this and I am unable to replicate.

All that means however is that you are using a different engine then I am. Which engine are you using? (A .craft file would work also.)

For reference, the "TWR Low" warning should show with 100% throttle is less then a TWR of 1.25 and the "TWR High" warning should show if a 1% (one percent) throttle has a TWR of greater then 1.

As you have "TWR Low" showing on an actual TWR of greater then 10, something is certainly up, I just need more info to track it down.

D.

Link to comment
Share on other sites

Hey Diazo,

Thanks for looking into it. I just launched the same vessel again and with that it worked, so it seems to not be an issue with the mod but with the vessel itself. So i currently have the 2 versions of the exact same vessel. THe mod works perfectly fine with one and not at all with the other (even velocity limiter does not work). I will compare .craft files and report back.

Again, thanks for looking into it and sorry if i caused unnecessary work :/

Link to comment
Share on other sites

Hey Daizo, is there a way for this mod to control pitch? because if there is, it will be able to maintain altitude of a jet plane while also retaining speed.

I'd love that cause right now my contracts are asking me to haul my crew all the way to the opposite side of Kerbin, but orbital drops are rather expansive, and precision landing is difficult as well. If your mod can automatically pitch the plane down just a bit when it's going too high, then ill be able to let the game run and do other stuff while I wait.

Thanks in advance

Link to comment
Share on other sites

@Ferrous: That is not something this mod can do (or can be added to this mod).

This mod works by controlling the thrust of your downwards pointing engines, it does nothing with wings.

Once you wings are generating enough lift to keep you airborne, this mod is effectively disabled as the downwards point engines are no longer needed.

Rather, you are going to have to look at the various space plane helper mods out there. Although I have not used it yet, I've been keeping my eye on Pilot Assistant.

D.

Link to comment
Share on other sites

  • 2 weeks later...
  • 4 weeks later...

@brusura: Okay, this is a weird one. I am able to replicate but the cause seems to be that KSP doesn't fully unlink the vessels when you undock them. The workaround is to undock and then return to the space center and back to the vessels, the scene change fully unlinks them and this mod will behave correctly after loading back into the flight scene.

I will fix the mod so you don't have to reload to the space center and back, but I need to figure out what KSP is doing first in not fully unlinking the vessels so it will probably be a few days still.

D.

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