Boris-Barboris

[1.8.0-1.8.1] AtmosphereAutopilot 1.5.16

Recommended Posts

7 hours ago, Boris-Barboris said:

Sorry, nothing comes to mind. Does adding the tail-fin (I know, I know) fix the problem?

Tried configurations with two vertical tails, one vertical tail, and two canted tail fins.

For starters, I can't spin stall - hooray! - even when I try to induce it. 

However, I did notice something thanks to the greater degree of lateral control. Immediately after takeoff I lose ALL authority in yaw unless I turn off the sideslip moderation (set to 0.45 at 40 m/s IAS due to previous sideslip issues), and unless I lose pitch authority until I turn off AoA moderation (set to 42 to take effect after 82 m/s IAS). It seems to prefer stopping me from pulling downwards. Neither one of these values has proven an issue until now, but I tweaked them to no avail. Engines get locked off-center when the moderators are on, too. 

G-moderation, however, works just fine. 

Edited by ProgradeInProgress

Share this post


Link to post
Share on other sites

Boris, Really glad to see that work is continuing on this mod, and hoping that the Devs can fix your null ref problem for 1.8.1.  Thanks for all the great work and this terrific mod! 

Share this post


Link to post
Share on other sites
1 minute ago, Torch said:

Boris, Really glad to see that work is continuing on this mod, and hoping that the Devs can fix your null ref problem for 1.8.1.  Thanks for all the great work and this terrific mod! 

Thanks. The same problem should hit the FAR guys when they'll start porting it to 1.8 if my assumption is correct.

Share this post


Link to post
Share on other sites
        if (partModule.GetType().Name == "ModuleControlSurface")
        {
            return partModule as ModuleControlSurface;
        } 

Wow. Sometimes I wonder how the game even launches without crashing.

Share this post


Link to post
Share on other sites
1 hour ago, Morse said:

        if (partModule.GetType().Name == "ModuleControlSurface")
        {
            return partModule as ModuleControlSurface;
        } 

Wow. Sometimes I wonder how the game even launches without crashing.

Wait.. when/how would that fail/nullref? Tech speak appreciated. 

Share this post


Link to post
Share on other sites
8 hours ago, Jognt said:

Wait.. when/how would that fail/nullref? Tech speak appreciated. 

This snippet in itself won't fail. That is unless you inherit ModuleControlSurface, in which case this will fail instantly. Nullref comes later: the function returns null if no component with the class name "ModuleControlSurface" is found.

Having said that, I can see at least three reasons to never do that even if inheritance is not an issue. This does represent the overall quality of the KSP codebase though.

Share this post


Link to post
Share on other sites

Forgive me if I missed the answer somewhere back, but at the moment is this usable in 1.8 with that bug mentioned above?

Edited by Motokid600

Share this post


Link to post
Share on other sites
13 minutes ago, Motokid600 said:

Forgive me if I missed the answer somewhere back, but at the moment is this usable in 1.8 with that bug mentioned above?

Old dlls are unusable, on my rebuild this bug breaks SPH badly.

I also had the same symptoms as this gentleman:

It's probably better to just wait for a patch: too many bugs.

Edited by Boris-Barboris

Share this post


Link to post
Share on other sites
1 minute ago, Morse said:

@Boris-Barboris I guess it'll take some time for squad to fix things. In the meantime you can try the quick-and-dirty fix that I just made. Didn't test it though, but it does seem to at least not make things worse :)

In the archive are both sources and a compiled dll.

https://drive.google.com/open?id=1urH693pKZDQhiIQn9Gf5VCE0D7QKqSI0

What is that v180_ModuleControlSurface class, did they rewrite them for 1.8.0? If I derive from it instead of ModuleControlSufrace, will that help?

Share this post


Link to post
Share on other sites

It's "SaveUpgradePipeline.v180_ModuleControlSurface" which deals with save files upgrading. I guess. With KSP you never know, but that's my assumption. I inherited from these classes and replaced the class name comparison with "is". Tried to not touch anything else as much as possible.

Share this post


Link to post
Share on other sites
9 minutes ago, Morse said:

It's "SaveUpgradePipeline.v180_ModuleControlSurface" which deals with save files upgrading. I guess. With KSP you never know, but that's my assumption. I inherited from these classes and replaced the class name comparison with "is". Tried to not touch anything else as much as possible.

Ok, thanks, we'll have to use that if the devs won't fix that. In the meantime someone's gotta find out why are these SaveUpgradePipeline needed in the first place. These ConvertControlAuthority and ConvertControlAuthorityAxisGroup may indicate that my control surface code will have to be updated as well, since something has changed significantly enough to require upgrade code.

I'll spin up windows wm some day to do this, just not today.

Edited by Boris-Barboris

Share this post


Link to post
Share on other sites
Spoiler

For control surface:


    protected static void ConvertControlAuthority (ConfigNode mNode, ModuleControlSurface module) {
      float num;
      float.TryParse (mNode.GetValue ("authorityLimiter"), out num);
      float value = module.ctrlSurfaceRange * num * 0.01f;
      mNode.AddValue ("deployAngle", value);
    }

    protected static void ConvertControlAuthorityAxisGroup (ConfigNode mNode) {
      ConfigNode node = mNode.GetNode("AXISGROUPS");
      if (node != null) {
        if (node.nodes != null) {
          int count = node.nodes.Count;
          while (count-- > 0) {
            ConfigNode configNode = node.nodes[count];
            if (configNode.name == "authorityLimiter") {
              configNode.name = "deployAngle";
            }
          }
        }
      }
    }

For aero surface:


    protected static void ConvertAeroAuthority (ConfigNode mNode, ModuleAeroSurface module) {
      float num;
      float.TryParse (mNode.GetValue ("aeroAuthorityLimiter"), out num);
      float value = module.ctrlSurfaceRange * num * 0.01f;
      mNode.AddValue ("aeroDeployAngle", value);
    }

    protected static void ConvertAeroAuthorityAxisGroup (ConfigNode mNode) {
      ConfigNode node = mNode.GetNode("AXISGROUPS");
      if (node != null) {
        if (node.nodes != null) {
          int count = node.nodes.Count;
          while (count-- > 0) {
            ConfigNode configNode = node.nodes[count];
            if (configNode.name == "aeroAuthorityLimiter") {
              configNode.name = "aeroDeployAngle";
            }
          }
        }
      }
    }

 

BTW, I use the dnSpy tool to decompile and look into KSP sources. Helps me tremendously when work around KSP bugs in my mods.

Share this post


Link to post
Share on other sites
24 minutes ago, Morse said:
  Hide contents

For control surface:



    protected static void ConvertControlAuthority (ConfigNode mNode, ModuleControlSurface module) {
      float num;
      float.TryParse (mNode.GetValue ("authorityLimiter"), out num);
      float value = module.ctrlSurfaceRange * num * 0.01f;
      mNode.AddValue ("deployAngle", value);
    }

    protected static void ConvertControlAuthorityAxisGroup (ConfigNode mNode) {
      ConfigNode node = mNode.GetNode("AXISGROUPS");
      if (node != null) {
        if (node.nodes != null) {
          int count = node.nodes.Count;
          while (count-- > 0) {
            ConfigNode configNode = node.nodes[count];
            if (configNode.name == "authorityLimiter") {
              configNode.name = "deployAngle";
            }
          }
        }
      }
    }

For aero surface:



    protected static void ConvertAeroAuthority (ConfigNode mNode, ModuleAeroSurface module) {
      float num;
      float.TryParse (mNode.GetValue ("aeroAuthorityLimiter"), out num);
      float value = module.ctrlSurfaceRange * num * 0.01f;
      mNode.AddValue ("aeroDeployAngle", value);
    }

    protected static void ConvertAeroAuthorityAxisGroup (ConfigNode mNode) {
      ConfigNode node = mNode.GetNode("AXISGROUPS");
      if (node != null) {
        if (node.nodes != null) {
          int count = node.nodes.Count;
          while (count-- > 0) {
            ConfigNode configNode = node.nodes[count];
            if (configNode.name == "aeroAuthorityLimiter") {
              configNode.name = "aeroDeployAngle";
            }
          }
        }
      }
    }

 

BTW, I use the dnSpy tool to decompile and look into KSP sources. Helps me tremendously when work around KSP bugs in my mods.

I see, they switched from percent-based limiter to angle-based one.

Share this post


Link to post
Share on other sites

Yea, the 1.7.3 version "Works" in 1.8 *IE.. doesn't crash the game and corrupt all your saves*. However control authority seems to be severely restricted regardless of if you have the master switch disabled or not.

Share this post


Link to post
Share on other sites
21 hours ago, Oscar_Muffin said:

Yea, the 1.7.3 version "Works" in 1.8 *IE.. doesn't crash the game and corrupt all your saves*. However control authority seems to be severely restricted regardless of if you have the master switch disabled or not.

Can confirm. I tried a clean install with no other mods than AtmosphereAutopilot, resulting in loss of control authority.

Edited by NippyFlippers

Share this post


Link to post
Share on other sites

 

On 10/26/2019 at 10:03 AM, Morse said:

@Boris-Barboris I guess it'll take some time for squad to fix things. In the meantime you can try the quick-and-dirty fix that I just made. Didn't test it though, but it does seem to at least not make things worse :)

In the archive are both sources and a compiled dll.

https://drive.google.com/open?id=1urH693pKZDQhiIQn9Gf5VCE0D7QKqSI0

Where should I put this dll to try it out?

Share this post


Link to post
Share on other sites
1 hour ago, CanisLupus518 said:

 

Where should I put this dll to try it out?

Pretty sure that isn't going to make the mod magically work. Just gotta wait for an update, may be some time. Until then my spaceplane program is on hold unfortunately,

Share this post


Link to post
Share on other sites
7 hours ago, CanisLupus518 said:

 

Where should I put this dll to try it out?

Just somewhere in GameData folder, like every other mod.

But it indeed won't magically fix everything, just the NPEs in case you're upgrading your save or craft files from 1.7

Share this post


Link to post
Share on other sites

Just wanted to say thank you for any and all work being done with this mod. You dont really appreciate something until its gone :P. I fly alot of planes for long periods of time. Sorties that take me all around the planet with multi hour flights. Simply cannot be done without AA. Highly look forward to the update. Hope 1.8.1 helps.

Share this post


Link to post
Share on other sites
12 hours ago, Boris-Barboris said:

https://github.com/Boris-Barboris/AtmosphereAutopilot/releases/tag/v1.5.16rc1

Try this one please, I'm interested in insufficient authority bug.

The borked craft editor will have to be fixed with Morse's code, I'm afraid.

It seems to work fine, everything I've tested works. Four things I've noted though.

1 - Craft sometimes feel a bit floaty at low airspeeds ~100m/s. May just be my new designs from 1.8.
2 - Performance hit is more noticeable than the previous version, more so on the ground. In the air it feels fine.
3 - Seems to have trouble with the FAT-455 Aeroplane tail fin being used as wings. Uncontrollable and extreme roll rates, even with the roll rate tuned right down.|
4 - Coordinated turn appears to be stuck on, regardless of whether the button is selected or not.

Apart from those, control authority is fine, Stability is good and all the stuff I've tested works.

Edited by Oscar_Muffin

Share this post


Link to post
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.