Jump to content

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


Crzyrndm

Recommended Posts

Version 1.1.1Key bindings (If you have a bettter suggestion for the Asst toggles, I'm all ears...)

...

numpad 9 toggle Pilot Assistant Heading Controls

numpad 6 Toggles Vertical controls

numpad 3 Toggles Throttle controls

The numberpad is pretty important for, ya know, entering numbers... I for one would prefer it alone. Keybinds are configurable, right?

Link to comment
Share on other sites

The numberpad is pretty important for, ya know, entering numbers... I for one would prefer it alone. Keybinds are configurable, right?

Those ones aren't currently. There isn't a stock keybind I can over-ride for that and I have no rebinding functions of my own setup.

Seems I need to find some better bindings

Link to comment
Share on other sites

...The shorthand of it is actually rather simple (using the stock SAS tuner).

  • Open the axis which is giving you issues
  • If the issue is rapid oscillations/vibrations, increase the value marked as Scalar (just slowly tick it up with the increment buttons, sometimes it doesn't take much for it to dissapear)
  • If the issue is a large slow wobble (Imagine the stereotypical cartoon drunk sway) decrease the value marked as Scalar

...

That's exactly what I needed, thank you! Indeed I think I was getting mired in trying to pay attention to too many factors where just one was 'good enough' :)

Totally understand about a tool for personal use - as a software dev, I've done exactly the same for other things (an HTML to BBCode converter, and a WoW DKP tracker and bid-optimiser :P) and while they were useful tools, I don't think anyone I ever shared them with actually used them because they were built for me, rather than ease of use :)

Link to comment
Share on other sites

Those ones aren't currently. There isn't a stock keybind I can over-ride for that and I have no rebinding functions of my own setup.

Seems I need to find some better bindings

Personally I don't think those toggles actually need keybinds... I've hacked 'dem out for my own use since I use numpad extensively & accidentally toggling the autopilot functions at the wrong moment is potentially catastrophic... I'd rather just click the button TBH.

Edited by steve_v
Link to comment
Share on other sites

Personally I don't think those toggles actually need keybinds... I've actually hacked 'dem out for my own use since I use numpad extensively & accidentally toggling the autopilot functions at the wrong moment is potentially catastrophic... I'd rather just click the button TBH.

I may put a toggle in the options to allow/disallow use of the activation keys and/or change them to be bound as "Alt + ...". In hindsight I agree that the numpad is a terrible location, but I do prefer having the keyboard shortcuts available. Basically, I'll think of something :D

Link to comment
Share on other sites

actually, sorry Crzyrndm, I think I still don't get how any of this works :blush: Here's a little drone that I put together to try to learn:

pilot-assistant-bafflement.jpg

In the first instance, it putters along with level wings, but I have to keep pulling the nose up to where I want it to be. Noticing that the Pitch button is clickable, I figured it was a case of tap in the number I want and turn it on... only, as per inset, what actually happens when I do that is that Pilot Assistant pauses, the drone loses roll and yaw stability and the nose immediately starts to drop.

I suspect my expectations of what the controls do is probably not what they actually do :blush:

If my goal is to point the plane in a direction (say 0 degrees north, 15 degree pitch, level wings) and have SSAS automatically hold that line until cancelled, I'm not sure...

- whether the stock SAS light should be on or off

- whether the mod's SSAS light should be blue or red

- whether the Pitch, Roll, Yaw buttons in the SAS Module panel should be green or white

- how to make the plane respond to changes in the Pitch/Heading/Roll numbers

...I appreciate that Pilot Assistant is there to handle ascent guidance, but all my spaceplanes were built for manual piloting and they were all designed to ascend at a specific angle to make my life easy - which doesn't necessarily correspond with a vertical speed ^^; And the SAS Module window must be there for a reason so it behoves me to learn how to use it properly :)

Link to comment
Share on other sites

Pilot Assistant cannot be used with SAS/SSAS (*right now* I may have finally found a fix for that) as it's output gets overridden (which causes all sorts of wierd "fun"). That's why it pauses when you activate anything in the SAS module.

Using the other SAS window (click "Mode: SSAS" => Changes to "Mode: Stock") and SAS as normal will likely be easier for you. You might have to retrim a bit, but functionally there's less to worry about.

RE:

I suspect my expectations of what the controls do is probably not what they actually do k_embarrassed.gif

You do have it mostly right (other than the conflicting activities). The reason the nose drooped when you activated pitch controls is that:

A) the scale on the outputs was too low (Scalar probably too high). Tick that down a bit and it should drift much less

B) default settings have no integral term. If you open the pitch tuning controls (under the targets), you'll see the value labelled as Ki is currently zero. Press the increment button just once and while the nose will initially droop, it should come back up to the specified target.

EDIT

Ofcourse, it's always possible I broke something :sealed:. Pitch control can't activate on it's own at the moment for some reason, so you can ignore what I just said RE: the scalar being too low. If you use "T" or the button by the navball to activate it everything will work much more as expected. Meanwhile, I'll go fix that...

Also, activate before entering targets. To make activation as smooth as possible, it updates to the current heading/pitch/roll on activation. You can then use the increment buttons to shift that to your desired target (so if it says 7.41, tick it up till it shows 15.41, then backspace the fractional part to get just 15.00 degrees. Changing it iarge amounts in one go (eg. 7 => 17) isn't good for stability because it'll try make that movement at full power

EDIT2

And just for completeness

4oxb0UD.png
Edited by Crzyrndm
Link to comment
Share on other sites

Ok, v1.1.2

  • Fixed SSAS axis activation issues where both pitch and heading had to be active.
  • Pilot Assistant moved to post-Autopilot update event. Pilot assistant functions now override SAS or SSAS if they are active (so you can use the wing leveller and (S)SAS to hold pitch if you want). No more pause desynchs ever!!!
  • Fixed Pilot Assistant targets being updated instantly when being typed in instead of requiring the update button to be clicked
  • Fixed SAS presets being loaded from file in the incorrect order
  • Removed all references to velocity from Pilot Assistant Throttle control (replaced with speed). Just a minor terminology issue.
  • Fixed SSAS pitch being randomly clamped to +/- 80 degrees instead of +/- 90 degrees

EDIT

Forgot one

  • Added Modifier (windows: LAlt) requirement to the Asst function toggles (eg. LAlt + numpad9 toggles heading control)

Edited by Crzyrndm
Link to comment
Share on other sites

It's currently eating the presets file every time I load the game, which is beyond awkward. Did you change the format at some point?

:mad::mad::mad::mad::mad::mad:

Not this again...

I did switch around some loading logic for SAS presets so they got sent to the right controller in the latest version, but that shouldn't have broken the save/load routine at all.

  • Can you check the presets.cfg file and make sure it's actually being created? (it should be refreshed when you make create one, update one, remove one, or leave the flight scene)
  • Is it all presets or just one type?
  • Any errors in the log?

I can't test or fix this until much later tonight :sealed:

Link to comment
Share on other sites

* Clean presets file is being generated

* not relevant, see above

* Nothing in the log I can see anywhere.

As to when, I will investigate a bit when I can, but I seem to think it's happening the first time I enter the flight scene.

I cannot replicate presets dissapearing (I did however find that SAS presets aren't being associated with a craft properly, so I'll fix that...)

With the presets.cfg open in N++ or similar text editor that notifies you when the file changes (or you can just reopen it every time...).

Create a new preset => alt+tab and check the preset shows in the file => Close KSP => reopen KSP and load a game => check file on entering space center and flight scenes => ...

Basically, until I know when or what causes the presets to get wiped, I can't do much :(

EDIT

You may want to try with the latest build on github. I fixed a few minor issues with presets in it, may have caught yours by accident (can always hope...)

Edited by Crzyrndm
Link to comment
Share on other sites

Well without using the github version ( which I didn't catch the message about until I was going to post here ):

* Flight scene load - the file is fine at this point however none of the presets are actually loaded, so...

* Exit flight scene - the file gets overwritten with a blank one, completely unsurprisingly.

After a second test, another completely unsurprising result:

* Adding a new preset blows the old preset file away.

This is why I asked if you changed anything in the format of the preset file recently - I keep a backup always just in case of things like this which is obviously ( quietly ) failing a parse check somewhere. Will test current next.

Edit: current didn't hang around until I did something with presets, it just blew the preset file away at scene load instead. http://pastebin.com/4CZJKE4U presets cfg - this has grown since the first version of PA I started using, so might be a bit odd.

Edited by Van Disaster
Link to comment
Share on other sites

Would it be possible to change the UI to not immediately execute a new input in one of the fields? Right now changing the heading to lets say 300 makes the craft turn towards 3, then 30 and finally 300 degrees as you type. Keeping the old value active until hitting an execute button or something would make life so much easier in some circumstances.

Link to comment
Share on other sites

I probably do need to change SSAS inputs to work like that. The reason I've never bothered is that changing the heading target any large amount will just cause it to jam the rudder full on (which planes don't particularly like...). Pilot Assistant heading control on the other hand is designed to turn through large angles properly and *should* be using the confirm button style input.

EDIT

To clarify, the intention of the inputs in the SSAS panel is for fine tuning (eg. making it hit exactly zero degrees of bank) because it is only designed to hold an attitude, not turn to one. The increment buttons give you +/- 1 degree (reasonable for about 10-15 degrees) and sub 1 degree input doesn't result in noticeable instability.

For alterations of 15-20+ degrees, my recommendation is to turn it manually first such that SSAS is only doing it's job as an attitude hold mechanism.

Edited by Crzyrndm
Link to comment
Share on other sites

VanDisaster, it was the new throttle control module (which I totally forgot about...)

Fixed version

For anyone else wanting to import pre-1.1 Pilot Assistant presets you need to add the following in each PIDPreset in Presets.cfg


ThrottleController
{
PGain = 0.2
IGain = 0.08
DGain = 0.1
MinOut = -1
MaxOut = 0
ClampLower = -1
ClampUpper = 0.4
Scalar = 1
}

Link to comment
Share on other sites

Yep, thought it would be along those lines. Can't make it fill in missing cfg sections with defaults rather than rejecting the entire file?

It really should, but I didn't think about it at the time (obviously). I will do something about it so it doesn't happen again...

Link to comment
Share on other sites

Should my target altitude be resetting to the current altitude when I enable vertical control? I set it to 19.5k on the runway, clicked the "Target Altitude" button and got the target updated message, but when I ticked vertical control on around 17k my target reset.

Link to comment
Share on other sites

Er, kind of.

It's a bug that it didn't activate when you clicked "Target Altitude", but using the toggles should always set the target to the current applicable value (makes switching from manual control a whole lot smoother).

EDIT

Quick glance through the relevant code says it should be working properly (I'll be a few hours before I can actually test things myself). In the meantime can I ask you to do two things:

1) Use the Update Target buttons on all three Pilot Assistant controls. Shouldn't matter what values (just quickly on the runway is fine). Do any of them activate?

2) Upload the output.log after running the above test if any of the three fail to activate again

Edited by Crzyrndm
Link to comment
Share on other sites

Er, kind of.

It's a bug that it didn't activate when you clicked "Target Altitude", but using the toggles should always set the target to the current applicable value (makes switching from manual control a whole lot smoother).

It probably did activate when I set the target and I sort of unconsiously deactivated it before takeoff. I noticed in-flight it does after I had posted that. Basically user error, I was trying to pre-set the target before takeoff to avoid fiddling with Unity's lack of UI focus and my backspace being bound to "Abort".

My question was more about the target value changing just by activating the assist, but I think now I'm just trying to use it wrong.

Link to comment
Share on other sites

Not wrong, just not knowing everything there is to know :P (and there not being any thorough documentation of what there is to know...)

To summarise: There are two ways of activating a control system

1) The toggle switches / key bindings. These reset the target to the current appropriate value to help keep engagement smooth and avoid the need to type anything in before activation. Best used when you are already close to your target, don't have a specific target in mind, or just prefer the ease of WASD target adjustment.

2) The Update Target buttons. These activate controls with the target set to whatever is currently in the target text box. Best used for activating when you have a specific target in mind and are a fair way away from it.

Link to comment
Share on other sites

I've definitely got it working now. I've got an hour long flight cruising at 19k in the background and I don't even need to babysit it, it works great. It holds about 50m lower than the target though, but that's probably because I have no idea how PID controllers work or how to tune them.

Link to comment
Share on other sites

It's probably run into one of the integral output clamps if it can't quite make it, and I'd bet on it being the VSpeed controller.

To fix it:

1) Under the options heading, toggle on show limits

2) Under the vertical speed heading, open the VSpeed controller and increase the "I Clamp Lower/Upper" from +/-5 to match the output limit

Your cruising AoA is apparently slightly higher than 5 degrees :sticktongue: (If you're flying stock, that's to be expected. If not, blame my habit of designing ultra-low AoA craft)

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