Jump to content

[1.8.0-1.12.5] AtmosphereAutopilot 1.6.1


Boris-Barboris

Recommended Posts

13 hours ago, Boris-Barboris said:

Can't get this one, see if you have some error spam in logs, cause no such thing happens on my machine.

No spam or anything out of the ordinary.

I'm on a clean install with just AA. Example, using the Aeris 3A. 

Fly-by-wire.
Moderation (Default settings with AoA disabled)
Coordinated turn off.

Take off and roll the plane about 20 degrees to the right and hold it there. The heading will slowly drift to the right despite coordinated turn being disabled. Turning it on makes no difference either, it still keeps turning.

Only way I've found of stopping it is by turning "Rocket mode" on. That seems to disable coordinated turn.

I'm not entirely sure what rocket mode actually does apart from that.

Link to comment
Share on other sites

3 hours ago, Oscar_Muffin said:

Take off and roll the plane about 20 degrees to the right and hold it there. The heading will slowly drift to the right despite coordinated turn being disabled. Turning it on makes no difference either, it still keeps turning.

Only way I've found of stopping it is by turning "Rocket mode" on. That seems to disable coordinated turn.

I'm not entirely sure what rocket mode actually does apart from that.

It's working as intended. FBW maintains zero sideslip, and the only way to maintain zero zideslip when you have rolled the craft is to yaw and change heading.

Rocket mode makes your yaw similar to pitch and maintains angular velocity.

Link to comment
Share on other sites

8 hours ago, Boris-Barboris said:

It's working as intended. FBW maintains zero sideslip, and the only way to maintain zero zideslip when you have rolled the craft is to yaw and change heading.

Rocket mode makes your yaw similar to pitch and maintains angular velocity.

If that's what you say boss then that's how it's supposed to be. Just didn't happen the same way in 1.7.3 for me. In 1.7.3 rocket mode seemed useless as disabling coordinated turn achieved the same thing. Whereas this time disabling rocket mode activated what I know as coordinated turn.

Edit - Okay, so disabling coordinated turn doesn't stop the plane turning when you roll (That's what I thought it did). Instead, it maintains your current pitch. With it disabled the plane will drift perpendicular to the yaw axis relative to itself. whereas with it enabled, AA wil give elevator input to keep the nose of the plane at the same angle so it doesn't drift down the navball as it turns. Got it.

 

Edited by Oscar_Muffin
Link to comment
Share on other sites

@Boris-Barboris I just wanted to take a moment and thank you for this great mod! I have been using this since I discovered it a long time back, and it's everything that I wish SAS was - and more! The "coordinated turn" mode for an aviation enthusiast is pure gold. This one item alone is something that has always bugged the Hell out of me with SAS - as it isn't possible to execute a coordinated turn with it. And for those that are not aware, nearly all aircraft IRL use this for turning, and is one of the very first things taught if you take flying lessons.

So once again Boris, Thank you!

Edited by Rocketology
Link to comment
Share on other sites

Just some fancy graphs of the telemetry of AA pitch angular acceleration controller during rapid hard pitch down and pitch up vertical snake manoeuvre:

cg4bydo.png

You can see the never-ending struggle, caused by the model that is too simple to reflect the real craft and has to be constantly updated.

The core assumption is simple:

AeroTorque = DynPressure * (Constant + K1 * AoA + K2 * ControlSurfacePos)

This is a very useful linear formula that approximates both real and KSP airplanes on small angles of attack. If we were to plot AoA, ControlSurfacePos and AeroTorque as points in 3D space, this linear formula would imply that these points should lie on a plane. Let's see the data from KSP flight:

https://i.imgur.com/pQMGsTl.mp4

 

Link to comment
Share on other sites

  • 2 weeks later...

There are some problems yet with SyncModuleControlSurface aside from update scripts. Right now, I noticed that some engines from Mk2 expansion mod do not work properly. There is this VTOL engine that uses ModuleControlSurface to turn itself into vertical position using the "deploy" action. And it doesn't work properly. The deployment happens fast, much faster than it should be, and the retraction happens instantly. I looked at the code of the vanilla ModuleControlSurface.CtrlSurfaceUpdate, and I see that it differs substantially from what you have. What was the original purpose of this module? Is it still needed? I tried disabling the GimbalRearranger, and it still worked (and fixed the issue with the VTOL deployment). Maybe it was meant to fix the KSP problems that are long gone?

Also, why do you use the custom module loader. Isn't it the purpose of the module manager?

Link to comment
Share on other sites

1 hour ago, Morse said:

What was the original purpose of this module? Is it still needed? I tried disabling the GimbalRearranger, and it still worked (and fixed the issue with the VTOL deployment). Maybe it was meant to fix the KSP problems that are long gone?

The purpose is to fix stock module bugs (inversion on angled wings, quaternion comparison bug, less than 1 meter from CoM bug) and to synchronize all surfaces by hardcoding their actuation speed. No, these problems are not gone.

https://bugs.kerbalspaceprogram.com/issues/5172
https://bugs.kerbalspaceprogram.com/issues/21949
https://bugs.kerbalspaceprogram.com/issues/9407
https://bugs.kerbalspaceprogram.com/issues/9460

and their duplicates

 

1 hour ago, Morse said:

Also, why do you use the custom module loader. Isn't it the purpose of the module manager?

I need features (module reordering, regex matching) that are not present in MM.

 

The easiest way to tackle this is to simply ignore this part, like I do for breaking grounds propeller blades based on their names. What's the part name?

Edited by Boris-Barboris
Link to comment
Share on other sites

20 minutes ago, Boris-Barboris said:

The easiest way to tackle this is to simply ignore this part, like I do for breaking grounds propeller blades based on their names. What's the part name?

Ignoring by name would be cludgy. The ModuleControlSurface that is included with this engine has some very specific set of parameters

ctrlSurfaceArea = 0
ignorePitch = true
ignoreYaw = true
ignoreRoll = true

I guess either ctrlSurfaceArea = 0 or the fact that all the controls are ignored will be enough to understand that this is not the part you are looking for :). You could safely ignore those.

Link to comment
Share on other sites

 

On 10/26/2019 at 9:43 AM, Morse said:

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

If I may ask ever so humbly, which KSP sources are you referring to? I want to improve my debugging skills.

King regards,

~G

Link to comment
Share on other sites

8 hours ago, FuzzyG said:

which KSP sources are you referring to?

In Unity game in most of the cases all the game logic is stored in the Assembly-CSharp.dll file.

8 hours ago, FuzzyG said:

I want to improve my debugging skills.

It has nothing to do with debug. For debug you need to attach to the running process to observe it step-by-step. This is just looking at the sources. And I wouldn't recommend looking at KSP sources for educational purposes. They are terrible.

Link to comment
Share on other sites

  • 2 weeks later...

Hi, @Boris-Barboris

I found this DLL on the Installation ZIP, KSPUpgradeScriptFix.dll, and I don't have the smallest clue about what this is neither from where to check the source!

The AA doesn't link against it, so I think you can run AA without it (something to be tested when I'm properly awaken  :P ).

What it does?

Link to comment
Share on other sites

4 hours ago, Lisias said:

Hi, @Boris-Barboris

I found this DLL on the Installation ZIP, KSPUpgradeScriptFix.dll, and I don't have the smallest clue about what this is neither from where to check the source!

The AA doesn't link against it, so I think you can run AA without it (something to be tested when I'm properly awaken  :P ).

What it does?

It's a hack to prevent vessel part upgrade code, intoduced by squad in 1.8.0, from crashing on custom control surfaces. Previous page (27) of this forum topic contains the rationale and sources.

Link to comment
Share on other sites

1 hour ago, Boris-Barboris said:

It's a hack to prevent vessel part upgrade code, intoduced by squad in 1.8.0, from crashing on custom control surfaces. Previous page (27) of this forum topic contains the rationale and sources.

Ah. now I see. You are talking about this problem, solved by this code?

humm.. yeah. Now that I downloaded the file, I can see it. The download link doesn't mention the filename, so it was not indexed, and so I could not find it!

So, for indexing reasons: 

Quote

The KSPUpgradeScriptFix.dll and its source can be found on this post (link for convenience).

Thanks!

Edited by Lisias
slightly less entertaining grammars =D
Link to comment
Share on other sites

Maybe it will be good idea to put same piece of code on github too, along with AtmosphereAutopilot. Source might be lost from someone private google drive if current maintainer get bored, need more space on private cloud or for whatever other reason. Then it will be again difficult to track down what this piece code is used for, if someone need to check it for some reason in the future.

Link to comment
Share on other sites

  • 1 month later...

I'm having a problem using this to launch a tiny SSTO I have.  What I do is turn on the Cruise Flight Controller, set the Heading to 90 and Vertical Motion to 100.

This SSTO takes a little bit to start climbing, so I use my joystick to keep full up until it climbing at 100m/sec.  But when I let go, the autopilot doesn't seem to be activated, the plane pitches forward into the sea.

I'm using AFBW, could there be an issue with these two mods?

Link to comment
Share on other sites

4 hours ago, linuxgurugamer said:

I'm having a problem using this to launch a tiny SSTO I have.  What I do is turn on the Cruise Flight Controller, set the Heading to 90 and Vertical Motion to 100.

This SSTO takes a little bit to start climbing, so I use my joystick to keep full up until it climbing at 100m/sec.  But when I let go, the autopilot doesn't seem to be activated, the plane pitches forward into the sea.

I'm using AFBW, could there be an issue with these two mods?

Check the Crafting Settings, the Director Strength to be more exact. I should be "0.95". Also check the Limiters (Moderate AoA, Moderate G, etc).

I have a situation in which the Director Strength value goes to 0 "by itself". I know why, it's something on the way that window reads input, and I'm trying to fix it on my sparing time. I kinda fixed this, but it made entering new values cumbersome. I'm managing to fix it right, I will do a pull request.

Edited by Lisias
additional
Link to comment
Share on other sites

I got a few minutes, so did some testing without my joystick.

One thing I noticed was that the entry fields seem to keep focus, so that if I'm using the WASD to control, either the letters end up in the entry field or the field starts increasing, EVEN IF the Vertical Motion was not enabled.  I found that if I had the MASTER SWITCH off, that wouldn't happen, and that by doing that and turning the master switch on, I am getting better results.

Link to comment
Share on other sites

Yeah, there are separate settings for that, whether the vertical motion is enabled or not has no effect. For better or worse.

3 minutes ago, linuxgurugamer said:

EVEN IF the Vertical Motion was not enabled

Cruise flight gui:

"Advanced options" description:

hotkey altitude sens - tweak to manage altitude setpoint change speed.

hotkey vertspeed sens - tweak to manage vertical speed setpoint change speed.

 

Frankly, I usually just disable them, numeric input seems overall better.

Link to comment
Share on other sites

I tried using Fly-By-Wire with a single engine prop craft. The torque of the engine seems to be amplified by the autopilot and the craft rolls with maximum roll rate until I disable the autopilot.

Is there a way to fix this?

Edited by mor128
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...