Jump to content

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


Crzyrndm

Recommended Posts

Wow! This mod is amazing! I've been waiting for something like this for a very long time. Here are some suggestions to make it even better.

In a real autopilot, the pilot controls both altitude and rate of climb simultaneously, which your mod does too. However, the setting for max climb/decent rate is in the PID tab, which is less convenient. Can you move this out to the main tab and just have a single value to enter which governs both climb and decent?

Also, many of the lower PID limits are difficult to type in with my keyboard because they require a negative value and for some reason I can't just highlight the existing text and start typing over it if the first character I type is the minus sign. It doesn't recognize the minus unless a number is already there and I type the minus in front of the number. Maybe you could have the user enter only positive numbers and have your code multiply the value by -1 when it reads the text box. You could put the minus sign into the GUI in front of the text box for clarity.

Also, there are a number of settings where it doesn't make sense to enter high and low values separately, like max roll angle. I don't need a plane to turn to the right at 45 degrees and to the left at 30 degrees. You could simplify the interface by having a single value where it doesn't make sense to have two.

Link to comment
Share on other sites

The right-click crash seems to be gone. Muchas gracias!

Thats good to hear since I have no idea what caused it :confused:

In a real autopilot, the pilot controls both altitude and rate of climb simultaneously, which your mod does too. However, the setting for max climb/decent rate is in the PID tab, which is less convenient. Can you move this out to the main tab and just have a single value to enter which governs both climb and decent?

I don't think I'll be moving it out to the standard PID display. Everything in the primary display area is things that need to be tweaked in real-time. 99% of the time, limits can just be setup and then left alone for long periods which is why they can be minimised away. A single value on the other hand sounds very sensible.

Also, many of the lower PID limits are difficult to type in with my keyboard because they require a negative value and for some reason I can't just highlight the existing text and start typing over it if the first character I type is the minus sign. It doesn't recognize the minus unless a number is already there and I type the minus in front of the number.

The difficulties entering text are because all the tuning is applied in real-time as you enter it, which I find to be really nice for tuning, but it does have it's annoying moments. I'll see what I can do about negative inputs.

Edited by Crzyrndm
Link to comment
Share on other sites

Updated to version 0.9.1

  • GUI overhaul phase 2 - Colours, onscreen messages, more layout changes
  • GUI now stays open between reverts, changing scenes and the like
  • Added single sided output limits (one value for both +ve and -ve limits) for Pilot Assistant, most controllers now use them
  • Fixed the heading/yaw interaction for co-ordinated turns. Yaw now chains off the main heading/bank controller to enforce a single solution for zero heading error (previously it could end up banked one way and yawing the other :huh:)

Edited by Crzyrndm
Link to comment
Share on other sites

Couple of notes from a couple of hours of flight:

* Either I need a panic give me control button or the toggles to turn each hold need to be bigger - when the AoA controller isn't doing it's job suddenly is not a time to find tiny buttons ( and I kept clicking the big "hide the details" button instead )

* cornering needs a little work still, it'll take the plane to bank limits & ignore that it's dropping it's nose ( well I presume it's trying to correct in every other way than less bank! ).

* I'm still managing to lose lines of the gui after opening/closing sections, usually the bottom line.

I actually used asymmetric limits the other day but now I can't remember why ( it's possible something had fallen off the plane! ) - perhaps being able to toggle those on would keep everyone happy.

It's maturing well, this.

Edited by Van Disaster
Link to comment
Share on other sites

* Either I need a panic give me control button or the toggles to turn each hold need to be bigger - when the AoA controller isn't doing it's job suddenly is not a time to find tiny buttons ( and I kept clicking the big "hide the details" button instead )

Tab (pause all control) and Alt+X (aim for level flight: wings level, vert speed == 0) are there for a reason. Activating SAS will also give you some control. I may shift to a slightly larger button though, mostly because I need the functionality :D

* cornering needs a little work still, it'll take the plane to bank limits & ignore that it's dropping it's nose ( well I presume it's trying to correct in every other way than less bank! ).

The major issue here is that I have Bank/Yaw and Pitch mostly seperated so it doesn't even know the other control is having issues. WIll have a look at a work around.

* I'm still managing to lose lines of the gui after opening/closing sections, usually the bottom line.

Repro steps please. It's hard to find the problem unless I know how it happened :P

I actually used asymmetric limits the other day but now I can't remember why ( it's possible something had fallen off the plane! ) - perhaps being able to toggle those on would keep everyone happy.

Already intended to be in a future version. I was thinking maybe having both always visible, but the lower limit changes to match the upper when the upper is edited.

PS

I'm almost surprised you didn't make a note of the new messaging system having a little fit :rolleyes: (I forgot to remove messages when PA isn't active)

Link to comment
Share on other sites

Tab (pause all control) and Alt+X (aim for level flight: wings level, vert speed == 0) are there for a reason. Activating SAS will also give you some control. I may shift to a slightly larger button though, mostly because I need the functionality :D

Alt-X wouldn't help ( or the SAS presuming it's set up the same ) as in this case it's the PID controller not controlling the aircraft that's the problem. Tab... I keep forgetting - might be an idea not to trap WASD with control paused?

I actually usually keep SmartASS updated as a "pid going nuts" emergency hold button at the moment, often at gross speed or alt changes one of the pids will start an undamped & usually growing oscillation - or I'm trying to tune it & getting it wrong.

Repro steps please. It's hard to find the problem unless I know how it happened :P

Yep will do, just mentioned in case it was a "d'oh I knew what I forgot" moment.

PS

I'm almost surprised you didn't make a note of the new messaging system having a little fit :rolleyes: (I forgot to remove messages when PA isn't active)

Hehe, well message spam doesn't bother me that much.

Link to comment
Share on other sites

Nice job, this mod I've been waiting for so long. THX!

After testing a few versions I've installed the latest release and I've noticed ArgumentOutOfRangeException in my log while searching for issues with another mod. It occurs everytime when switching to a vessel regardless if it's landed or in orbit.

ArgumentOutOfRangeException: Argument is out of range.

Parameter name: index
at System.Collections.Generic.List`1[PilotAssistant.PID.PID_Controller].get_Item (Int32 index) [0x00000] in <filename unknown>:0

at PilotAssistant.UI.SASMainWindow.Draw () [0x00000] in <filename unknown>:0

at PilotAssistant.SurfSAS.OnGUI () [0x00000] in <filename unknown>:0

I think it' related to ksp toolbar, don't know if it's important just FYI... Log and other related stuff: https://www.dropbox.com/sh/byeh9pg50gfnsf1/AABfuVWRdhsE9zJ7AC4VtZ9sa?dl=0

Link to comment
Share on other sites

Version 0.9.1.1 has just one change, a fix for a divide by zero that would kill the current flight

I also replicated the "this mod just nose dived me into the sea" bug, seems to be an issue with taking control from SAS.

Edited by Crzyrndm
Link to comment
Share on other sites

I may have forgotten to recompile it :sealed:

0.9.1.2 has the actual fix in it

EDIT

I'm going to be taking some time to actually get to play KSP over the next few days (first time in weeks...) so in the meantime this post is going to be my memory of all the bugs/improvements/features that I come up with for when I get back into this.

Bugs:

  • Pilot Assistant engaged but no control activity (typically followed by frantic keyboard mashing :sealed: and a dive into the sea). Repro: With no control systems active, activate SAS, later activate a pilot assistant module using the toggle. SAS will disable and control inputs will be captured, but control systems will fail to function.
  • Capturing keyboard input or outputting messages when no relevant modules are enabled (should make a proper messaging system...)
  • Hide/unhide UI based on stock KSP UI visibility so seeing the debug window isn't mutually exclusive to seeing Pilot Assistant's GUI

Improvements:

  • Overhaul attitude logic using 3D vectors inplace of euler angles. This will resolve the problems associated with reference axes (craft vertical, planet poles) and allow pitch and yaw to be decoupled in the SAS module. Pre-requisite for development of a terrain follower.
  • Heading control should scale with the cosine (or similar) of pitch angle
  • Heading control should be based off prograde heading, not craft heading. This will resolve craft direction of travel not quite reaching the desired heading and some instabilities.
  • Roll angle hold logic revised for SAS. Pitching up currently leads to craft spiralling due to non-linearities and trying to flip 180 if passing through vertical.
  • Individual activation/deactivation of SAS axes (ie. having roll or yaw SAS, free control on deactivated axes)

Features

  • Low altitude predictive terrain following module (ie. 3-5km alt maximum, using data from infront of the vessel)
  • Another look at the input moderation module (see this for an idea)
  • Non-linear background control authority scaling to make settings stable over a wider range of flight conditions
  • Expanded preset manager

Edited by Crzyrndm
Link to comment
Share on other sites

you'll get PA induced porpoising instead - not too hard to tune though.

To expand on this a little: If you experience wobble, open the relevant axis control (for pitch/altitude hold it is thel vertical speed tab) and increase the value labelled "Scalar" until the oscillation stops. You may have to do this several times as Dynamic Pressure increases (with FAR, the transsonic region (Mach 0.75-1.25) causes temporary oscillations so if your oscillations occur around 330m/s, you can actually bring the scalar down a little after passing into the supersonic region).

You can tune everything a whole lot better using the PID gains, but then you really need to understand what's happening and it takes a bit of time.

Edited by Crzyrndm
Link to comment
Share on other sites

Open Pilot Assistant and open the vertical control tab (if it isn't already open). By default, vertical control maintains a set vertical speed/climb rate, click the little toggle to change it to altitude control.

With SAS off (There's a small bug with the SAS interaction that makes things a bit *interesting* if you dont turn it off first), toggle on the vertical control using the toggle or by entering the desired altitude and clicking the button that says "Target Altitude". The Vertical control toggle will turn Orange when the system is active IIRC.

If your craft oscillates, open the tab labelled as "Vertical Speed" (under "Altitude") and use the +/- buttons to increase/decrease the scalar term you find there. Increase it to remove rapid oscillations (caused by high dynamic pressure / transonic effects), decrease it as you slow down again (otherwise it can't react fast enough and you get some really slow oscillations that can lead to a stall pretty quick)

If you still have problems I can make a video or some pictures tonight :wink:

Link to comment
Share on other sites

I learn from today's dev notes that SAS has been (finally!) modularized. When 0.90 rolls out, would you be interested in making the functions of this mod parts of the new SAS system? (SAS logic would be bound to the Kerbal "flying" or to a probe core, as I understand it)

Link to comment
Share on other sites

Version 0.9.2.0

  • Craft attitude logic rewrite, shifting to a vector based system
  • Hide UI is synched with KSP
  • Messaging system fixes
  • WASD keybinds do not function while Pilot Assistant is paused
  • Heading target updates to current heading when switching from wing leveller to heading lock

Link to comment
Share on other sites

I just rediscovered the "no I didn't really reload the preset after that revert, I just pretended & said so" bug in 9.1.2 - I can't get to github to get the latest release at the moment.

Might be worth providing hooks for audio in case someone feels like adding bitchin' betty, with the terrain following/flight envelope stuff on the way.

Link to comment
Share on other sites

I just rediscovered the "no I didn't really reload the preset after that revert, I just pretended & said so" bug in 9.1.2 - I can't get to github to get the latest release at the moment.

Might be worth providing hooks for audio in case someone feels like adding bitchin' betty, with the terrain following/flight envelope stuff on the way.

Fixed and on github, to be included in next release (grab the .dll if feeling impatient). The last loaded preset should now persist across all scene changes (so you can revert, go into the editor, fly a rocket, or anything else. The same preset will be ready and waiting). Note that this applies to stock SAS as well so you may need to revert that to defaults if you're going elsewhere.

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