Jump to content

[1.3] Pilot Assistant: Atmospheric piloting aids - 1.13.2 (May 28)


Crzyrndm

Recommended Posts

Hi guys,

I installed PA today as a replacement to regex's PID Tune since this mod is more likely to be maintained into 0.90. I play with FAR installed and I'm getting very frustrated with its SAS issues lately.

I want to use Pilot Assistant's 'stock SAS' option because it allows me to make corrections with my 360 controller without toggling it off and on, and the SSAS just seems to restrictive to me. I've changed the PID values to those that I used with regex's tuner but the nose of my latest SSTO still drops at higher altitudes. The SAS refuses to use anything more than about 50% of the deflection available to it. What I've tried so far is to reduce Kp to about 12000, increase Ki to 0.3, increase Kd to 2500, and reduced the scalar to 300 (I'm assuming that the scalar is the same as the clamp).

These values more-or-less worked with regex's tuner. What am I doing wrong? My aircraft has adequately-sized control surfaces placed far enough from the CoM. The CoL is a little behind and above the CoM. It's stable in most regimes though it suffers from a bit of sideslip. I can manually hold the nose up at 25km and 1200m/s without much difficulty, so why is the SAS so utterly sh*te at it?!

Link to comment
Share on other sites

There should be absolutely no difference in performance between PID Tuner and the Stock SAS tuning included in Pilot Assistant (both are only adding a GUI that can tweak the gains of the stock controllers). If you remove Pilot Assistant and use PID tuner, or even just stock SAS on it's own you should experience the same phenomenon. What I believe you are encountering is the stock SAS function of allowing the target to "slip" if too much control is required. The solution is too add more control authority (more control surface area, control surfaces further from CoM).

I'll look into adding controller support for SSAS, hadn't even occured to me that would require different checks :sealed:

PS

That Ki value is doing nothing for you (before it will have time to make any impact, your horizontal velocity will have caused the craft to increase it's pitch relative to the surface and need correcting again). Keep gains within 1-2 orders of magnitude (maybe 3 if you've got a really oddball craft) of each other if you want them all to be noticably functional. At 5 orders of magnitude you may as well leave it at zero.

Link to comment
Share on other sites

What I believe you are encountering is the stock SAS function of allowing the target to "slip" if too much control is required. The solution is too add more control authority (more control surface area, control surfaces further from CoM).

This SAS slippage never occurred in 0.24.2 and with versions of FAR before 0.14.3. It seems that something changed when 0.25 was released and now FAR won't play nicely with the stock SAS. I've tried doing what you suggest by increasing the size of control surfaces and distance from the CoM. It definitely helps, but it doesn't completely nullify the problem. Do we know why the SAS now refuses to use 100% control deflection in a lot of cases?

That Ki value is doing nothing for you (before it will have time to make any impact, your horizontal velocity will have caused the craft to increase it's pitch relative to the surface and need correcting again). Keep gains within 1-2 orders of magnitude (maybe 3 if you've got a really oddball craft) of each other if you want them all to be noticably functional. At 5 orders of magnitude you may as well leave it at zero.

Ah, fair enough. For some reason I figured 0.1 was the equivalent of 100 in regex's tuner (I had it set to 200 previously). Anyway, I've discovered that CrossfeedEnabler bundled with B9 was messing up my fuel flow and actually causing the aft tank to drain first and shifting my CoM forward. Really wish they'd cut that mod out... Still doesn't completely explain why the SAS couldn't hold the nose up while I could, but it explains why it struggled more than previously.

I'll look into adding controller support for SSAS, hadn't even occured to me that would require different checks :sealed:

I've also noticed that in my current resolution (1600 by 900) the PID values get cut off at the bottom. I'm not sure if the window is incorrectly sized, or if it's not resizing as intended. Possibly something that needs tweaking for the next release. Anyway, thanks for your hard work. Without this mod KSP is almost unplayable with FAR installed, and reverting to stock isn't an option for me after two and a half years of playing :)

Edited by Narcosis
Link to comment
Share on other sites

I've also noticed that in my current resolution (1600 by 900) the PID values get cut off at the bottom. I'm not sure if the window is incorrectly sized, or if it's not resizing as intended. Possibly something that needs tweaking for the next release. Anyway, thanks for your hard work. Without this mod KSP is almost unplayable with FAR installed, and reverting to stock isn't an option for me after two and a half years of playing :)

I changed a lot of the formatting recently, and just forgot to update a few things to match. That particular error has already been corrected and will be working properly for the next release :)

Link to comment
Share on other sites

Version 0.9.3.0

  • Currently activated presets persist when scene switching
  • GUI style should no longer be affected by other mod GUI's or certain section of the stock GUI
  • SAS gain labels no longer overflow onto a second line, resolving a window sizing issue

Just an accumulation of the fixes that have been building up the last few days. I'm a little busy with work and the holiday season at the moment :)

PS

Github user mjn33 has submitted a pull request with a number of interesting and useful GUI tweaks. I won't be using it as is, but there are a number of changes within that I plan to make use of, so thank you very much for your help ;)

Link to comment
Share on other sites

Just FYI - there's not a 0.9.3 release available on GitHub yet! Though I assume downloading the master and taking the Pilot Assistant directory from that will work too, naturally.

Thnks for the heads up, release has been added. If you downloaded the master that would have been up to date ;)

Link to comment
Share on other sites

Do we only need the merge the GameData folders, or are the PilotAssistant folder, gitattributes, gitignore and Pilot Assistant.sln files seen here also required in the KSP_win directory? I only ask because I've been creating a new install of KSP today and decided to only merge the GameData folder you provided, but the icon appears blank when I load up craft. The button still works even though the image is missing.

EDIT: Ignore me, I figured it out for myself. Only the GameData folder is needed. Must have been something amiss with PA v0.9.2. Everything works now that I've updated to 0.9.3.

Edited by Narcosis
Link to comment
Share on other sites

Do we only need the merge the GameData folders, or are the PilotAssistant folder, gitattributes, gitignore and Pilot Assistant.sln files seen here also required in the KSP_win directory? I only ask because I've been creating a new install of KSP today and decided to only merge the GameData folder you provided, but the icon appears blank when I load up craft. The button still works even though the image is missing.

EDIT: Ignore me, I figured it out for myself. Only the GameData folder is needed. Must have been something amiss with PA v0.9.2. Everything works now that I've updated to 0.9.3.

Always just GameData. If the image was blank it's likely the folder was not correctly placed or a folder was renamed somewhere.

Version 0.9.4.0 release

  • Integration of several features from a pull request. Robust window resizing, toggle buttons, and several other tweaks that make the GUI work and look better
  • Interaction between Pilot Assistant, Surface SAS, and Stock SAS has been thoroughly overhauled. There should be no more issues with the modules becoming desynched and having multiple active at one time.
  • New keybind: Modifier + SAS Toggle. This keybind arms the SSAS and the next time the SAS toggle key is used, SSAS will be used instead of stock (and vice versa if disarming)
  • SSAS indicator button now shows without needing to have the GUI open. The only requirement is that the system is armed.
  • SAS systems will switch to match the current GUI display when toggled. If you have the stock SAS panel open, SSAS will remain armed but all SAS toggles will use the Stock system

EDIT

And some new video's to make everything match up a bit better

EDIT2

I have worked out a permanent solution for the SSAS deciding to go on a spin party when climbing vertically, only a little more work and that should be release worthy. Additionally, the same method may be useable for seperating the Pitch and Yaw locks so I'm feeling very pleased with myself right now :D

Edited by Crzyrndm
Link to comment
Share on other sites

Is it possible to save SAS PID tuning settings? I always cut my kp to 1/3 default and clamp to 1/2 default; it would be nice not to have to repeat that for each plane, or to just have a "Default Wanderfound" setting to load.

Set the PID to the settings you want => open presets => enter preset name => click the little plus button

On loading a new craft, open the preset window again and click on your selected preset. Just fyi, there is a bug in the current release which causes the yaw and roll settings to be swapped on save. If you find they are loading incorrectly, load it, click update preset, and then load it again. Next release will have them being saved correctly ;)

I plan on adding functionality to automatically load a preset based on the craft you are loading, but that doesn't exist yet and fixing SSAS and getting tuning working for the new SAS option is my current priority

Link to comment
Share on other sites

Version 0.9.5.0

  • SSAS roll control overhauled. Now fully functional for any heading (no more spinning when travelling vertically)
  • Stock SAS presets now saved correctly (previously roll and yaw were being switched on save)
  • SSAS shifted to use new Autopilot event for updates
  • All features verified to be 0.90 compliant

SSAS users on 0.9.4.1 (the initial 0.90 hotfix) may have noticed the change to the roll behaviour which is now complete with 0.9.5. This change allows SSAS to be used for any direction of travel where as before getting too close to vertical would result in wild spinning (It's still a little wierd if you manage to point exactly vertical, but not to the point of flipping the entire craft out of control).

It will also automagically invert when travelling through vertical.

PS

Do not manually set the roll in the SSAS window. Wierdness will happen

Edited by Crzyrndm
Link to comment
Share on other sites

Had a thought - not sure about FAR's API and what's accessible but it does have dynamic pressure, if PA is running with FAR then Q might be a useful metric for control sensitivity autoadjustment. I think you might have to check if you're supersonic or not as well, mind you. Possibly FAR's EAS would be a better idea given that is literally speed adjusted for atmosphere conditions...

Still on 0.25 for some time yet, any testing I do is currently void of use :P

Edited by Van Disaster
Link to comment
Share on other sites

Had a thought - not sure about FAR's API and what's accessible but it does have dynamic pressure, if PA is running with FAR then Q might be a useful metric for control sensitivity autoadjustment. I think you might have to check if you're supersonic or not as well, mind you. Possibly FAR's EAS would be a better idea given that is literally speed adjusted for atmosphere conditions...

Still on 0.25 for some time yet, any testing I do is currently void of use :P

When I get to resolving that particular annoyance, I'll probably get dynamic pressure and sub/trans/super-sonic regime through internal methods (that would be basically copies of FAR's methods ofcourse :P). I would need access to dynamic pressure whatever aero model you are using (this does depend on FAR's changes being accessible through KSP's API ofcourse), and calculating the current mach number isn't that difficult.

What I really need before I get to that is to sit down with a decent number of aircraft designs and work out how it scales with Q, how consistent that scaling is, etc. Once I get that, the rest is fairly trivial.

EDIT

0.9.6.0 Release

  • SSAS activity for pitch/heading/roll can be activated and deactivated seperately
  • No more being able to edit the SSAS roll target when it would cause problems
  • Pilot Assitant shifted to new Autopilot event

SSAS is now effectively feature complete. The ability to have it hold any of pitch/roll/heading seperately or together was one of my original aims for the module and I am rather pleased to have it finally working. This allows you to do things like have only the pitch hold active and then roll through turns without disturbing the current pitch which I have found to be very nice for flying planes.

Edited by Crzyrndm
Link to comment
Share on other sites

Load(Assembly): CIT/ActiveStruts/Pilot Assistant/PilotAssistant

You seem to have a random extra Pilot Assistant installation ;)

That is... unexpected! I should have checked for that, I am le dumb =( I just wonder how in the heck I even got that that deep into another directory....

Link to comment
Share on other sites

Hello,

I am loving this mod! But since I got the basics down now I need to tune it to my aircraft. This is the first time I am dealing with these "PID" controls.

I need to know how this PID system works and how it uses the values:

Kp

Ki

Kd

Scalar

I Clamp Lower

I Clamp Upper

Where can I read up on this? I would like to understand where the default values come from and how editing them changes the behaviour of the pilot assist systems.

Thanks a lot in advance guys, you're great!

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