Jump to content

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


Crzyrndm

Recommended Posts

Crzyrndm, great mod. As I installed FAR, I find myself unable to fly without your great autopilot.

 

Just a quick question, if I may. I'm now designing SSTO spaceplanes, and it appears that Pilot's Assistant has some trouble at keeping correct attitude at very high altitudes (50-70km). I'm not sure, but I think it doesn't use reaction wheels at all, just control surfaces. Correct me if I'm wrong.

With that in mind, how do I set up Pilot's Assistant so that I can make a 40° AOA reentry? I can't find any "AOA hold" button, and as I said, at high altitudes, autopilot struggles to keep correct orientation.

Link to comment
Share on other sites

It uses all available control authority (control surfaces, vectoring, reaction wheels). The problem at high altitude it that control surfaces are normally so ineffective that aircraft lose a lot of control and Pilot Assistant isn't able to compensate even with Dynamic Deflection.

As for a 40 degree AoA, the pitch hold is the only directly available control.

Link to comment
Share on other sites

Oh I use pitch hold a lot on reentry, works fine usually.

But man....I couldn't find the VS control I was hoping for. I found the control variables and all, but it's not that. What I meant was to be able to set a target altitude AND target VS at the same time. Know what I mean?

Ah and after updating, the window now saves it's position and the plugin has no problem passing through the 0/360 hdg zone. Nice job!

Link to comment
Share on other sites

43 minutes ago, Crzyrndm said:

It uses all available control authority (control surfaces, vectoring, reaction wheels). The problem at high altitude it that control surfaces are normally so ineffective that aircraft lose a lot of control and Pilot Assistant isn't able to compensate even with Dynamic Deflection.

As for a 40 degree AoA, the pitch hold is the only directly available control.

I see... But why does it lose control even in vacuum? For example, preparing for reentry, I point my craft manually in desired attitude, stop all rotation with stock SAS (works fine), then input the exact numbers into Pilot Assistant, and engage it. And then it starts wobbling my plane around, moving further and further away from desired attitude with each oscillation.

What am I doing wrong?

 

16 minutes ago, Vegetal said:

Oh I use pitch hold a lot on reentry, works fine usually.

But man....I couldn't find the VS control I was hoping for. I found the control variables and all, but it's not that. What I meant was to be able to set a target altitude AND target VS at the same time. Know what I mean?

Ah and after updating, the window now saves it's position and the plugin has no problem passing through the 0/360 hdg zone. Nice job!

 

At what altitude do you engage it? What settings do you use? Because I can't even make Pilot Assistant work in vacuum (preparing for reentry).

Link to comment
Share on other sites

1 hour ago, Vegetal said:

What I meant was to be able to set a target altitude AND target VS at the same time. Know what I mean?

The vertical speed to use for moving to an altitude target is the output limit on the altitude control. If that's not what you're looking for, I'm not sure what you need. Yes, the interface for managing this isn't anything to write home about, but it is there.

Spoiler

QL0Ig3p.jpg

 

1 hour ago, aluc24 said:

I see... But why does it lose control even in vacuum

Because any tuning of the control system assumes a certain level of excess torque for the rotational inertia of that craft. When that ratio is significantly different from what it was tuned for, the control system isn't able to function properly. When in atmosphere, most planes have a very high torque to inertia ratio compared to when they are sitting in space. This allows them to be quite aggressive in their manoeuvring. In space, that aggressiveness leads to an overshoot that is often unstable (growing magnitude)

Basically, things behave differently in different conditions. Dynamic Deflection can only help when there is something for the control surfaces to push on (This is one of the disadvantages of making DD an independent module)

Edited by Crzyrndm
Link to comment
Share on other sites

7 hours ago, Crzyrndm said:

Because any tuning of the control system assumes a certain level of excess torque for the rotational inertia of that craft. When that ratio is significantly different from what it was tuned for, the control system isn't able to function properly. When in atmosphere, most planes have a very high torque to inertia ratio compared to when they are sitting in space. This allows them to be quite aggressive in their manoeuvring. In space, that aggressiveness leads to an overshoot that is often unstable (growing magnitude)

Basically, things behave differently in different conditions. Dynamic Deflection can only help when there is something for the control surfaces to push on (This is one of the disadvantages of making DD an independent module)

 

I see. Thank you for explaining it. But then, how do I set up Pilot's Assistant so that it would hold correct attitude when still in vacuum and in upper atmosphere when re-entering?

Link to comment
Share on other sites

This is probably something I need to attack from my side for a proper resolution, but for now I would suggest creating a preset with a significantly increased Kd parameter on the pitch controller that you can switch to for re-entry procedures

Link to comment
Share on other sites

13 hours ago, Crzyrndm said:

This is probably something I need to attack from my side for a proper resolution, but for now I would suggest creating a preset with a significantly increased Kd parameter on the pitch controller that you can switch to for re-entry procedures

Actually, it holds pitch correct. It's the yaw that causes problems. I've tried increasing yaw Kd to 1.0, but it still cannot hold the attitude, it starts oscillating on yaw axis. What Kd value would you suggest?

And... Sorry for bugging you with this :) but hopefully it will help improving your great mod.

Link to comment
Share on other sites

Performance of pilot assistant and even stock SAS strongly depends on your craft design. I usually design my crafts in a way that SAS behave more less friendly with oscillation. On some craft though, craft behave better with SAS turned off and using only trim controls to adjust proper pitching. That was needed only on some speeds/altitudes, not trough whole flight.

Since more/less each plane have it own "good" settings for pilot assistant, maybe it will be good idea to store pilot assistant limit values in craft file instead of using global values for pilot assistant for all crafts ?
Even better, it would be good if other mods, like KOS for example, can read/set pilot assistant values as needed per craft. Maybe actually it already can read/set pilot assistant configs, haven't checked for while.

Link to comment
Share on other sites

  • 3 weeks later...

v1.12.4
* Fix direct throttle being affected by speed unit transforms
* Scaled keyboard inputs for speed to retain consistency across units (eg. Z increases speed target by 100 of current unit)
* RPM API extensions and fixes

Just some minor updates while I have an hour or two to spare

Edited by Crzyrndm
Link to comment
Share on other sites

6 hours ago, Crzyrndm said:

v1.12.4
* Fix direct throttle being affected by speed unit transforms
* Scaled keyboard inputs for speed to retain consistency across units (eg. Z increases speed target by 100 of current unit)
* RPM API extensions and fixes

Just some minor updates while I have an hour or two to spare

I have finally entered the ranks of thankful users of your mod. Really love the fine tune-ability of everything. This is actually more stable for a couple of my, more unstable planes than Mechjeb. I do have one request though (I know you just released this update and it works great btw) I wanted to know if you would have any interest in adding toolbar support to pilot assistant in the future?

Link to comment
Share on other sites

There is support for blizzy's toolbar, it's a .cfg only switch though from memory. GameData / PilotAssistant / PluginData / PilotAssistant / Settings.cfg => Change "UseStockToolbar" to "False"

Edited by Crzyrndm
Link to comment
Share on other sites

8 hours ago, Crzyrndm said:

There is support for blizzy's toolbar, it's a .cfg only switch though from memory. GameData / PilotAssistant / PluginData / PilotAssistant / Settings.cfg => Change "UseStockToolbar" to "False"

Oh, I'm sorry. There's another mod that works that way as well. I should have checked first. Well thanks for the update. Really see this helping out with future videos.

Link to comment
Share on other sites

Pilot Assistant Development
Currently making some plans for development leading into 1.1, if you have any issues or suggestions now is the time to throw them out.

My plans so far:

  • SSAS and the stock SAS tuner are being split off into separate mods living in my Plugin Workshop thread (it bugs me to no end that I have three totally different things in this one mod). Will still share data and systems where appropriate so there's no unnecessary extra overhead for having multiple installed.
  • UI is not going to receive major attention until post KSP 1.1 (post 1.1 UI activity depends on how much work the shift requires in general and what, if any, additional script support for the new UI system is present)
  • Current tuning automatically saved to each individual vessel, regardless of preset status
  • Speaking of presets, I really think that system needs improving, but I'm not quite sure how. Maybe add support for blending multiple together based on alt/Q/mach, although I have no idea what the GUI to edit that would look like.
  • ... (more time than plans at the moment :rolleyes:)
Edited by Crzyrndm
Link to comment
Share on other sites

Currently, I'm messing around with kOS and simple PID controller trough kOS script.
Most impact on SAS control, to wooble as little as possible have "P" - proportional gain to controls. How much of input gain you need vary a lot per craft design and further more it vary with speed and dynamic pressure. Altitude/ atmosphere pressure is less important.

So, instead to have maximum of 100% of proportional gain at begin of PID cycle, you might need only 70% for maximum. It is up to player to choose how much he need for each craft and situation, but he should choose a number less than 100%, but not too low, so PID controller still can overshoot desired pitching, but it will stabilize more quickly because initial amplitude of input will be much slower.

Simple table based on Q(dynamic pressure) and P(control input) - maximum for PID controller, instead of 1, you might also want to check mach number too.
 

Q Mach Max P info
0 0.3 0.70 lower max input on take off to prevent stall on low speeds
10kPa 0.9 1.0 when Q is 10 kPa or more and speed is lower than 1 mach, maximum input is allowed for better maneuverability
30kPa 1.0 0.60 on high dynamic pressure and speeds above 1 mach, only 60% of control input allowed to prevent ripping off wings and other craft parts due to high atmosphere forces

Limitation for SAS PID controller should not be limit for pilot input. Pilot should still have to be able to push controls up to 100% when needed.
For example, player make pitch changes with 100% control input and then pass controls to SAS to maintain pitching. Due to lowered initial input gain, craft will stabilize more quickly, assuming that maximum input for PID controller will be able to maintain desired pitching.

FAR pilot assistant aid with DHCPR turned on also limit pilot input, not only SAS input gain and that can be dangerous if craft start to dive, speeding up due to diving and you are unable to pitch up due to too high dynamic pressure, because DHCPR prevents it. Soon, such craft become fireball due to overheating.

Such table should not be too much load on CPU and it is feasible. SAS controller should go trough table and if craft Q and speed matches those in table, maximum P is used from table, if controller does not find matching Q and speed in table, it can use default P of 100%. So, players who don't want to create such table will still have functional but more woobling SAS.

Link to comment
Share on other sites

  • 2 weeks later...
On 4/1/2016 at 6:00 AM, Crzyrndm said:

Pilot Assistant Development
Currently making some plans for development leading into 1.1, if you have any issues or suggestions now is the time to throw them out.

My plans so far:

  • SSAS and the stock SAS tuner are being split off into separate mods living in my Plugin Workshop thread (it bugs me to no end that I have three totally different things in this one mod). Will still share data and systems where appropriate so there's no unnecessary extra overhead for having multiple installed.
  • UI is not going to receive major attention until post KSP 1.1 (post 1.1 UI activity depends on how much work the shift requires in general and what, if any, additional script support for the new UI system is present)
  • Current tuning automatically saved to each individual vessel, regardless of preset status
  • Speaking of presets, I really think that system needs improving, but I'm not quite sure how. Maybe add support for blending multiple together based on alt/Q/mach, although I have no idea what the GUI to edit that would look like.
  • ... (more time than plans at the moment :rolleyes:)

Your mod is great and works really well also with FAR. A little suggestion for me is a sort of auto-landing, or the ability to immediately turn off the autopilot on ground contact, cause often I try to land with this mod, not ever with great success. I can't know when the plane is almost to stall and I'm not able to recover in those situations. Other situation is when the plane reach safe the ground but still continue to maintain the air-attitude. If the ground is not completely flat this usually lead to tragedy :)

Link to comment
Share on other sites

  • 4 weeks later...

Hey, I may have found a bug with the mod. I have no idea how to replicate.

On some occasions I lost effectiveness on one control surface (not only it didn't respond, it also didn't seem to work as a fixed aero surface too). All the rest would work fine, the game would continue fine, but that control surface was lost.

I believe it has something to do with the mod because after this happened, I couldn't bring the mod interface back by clicking on the toolbar. The mod simply stopped working.

Now that I say that, I recall the 2 occasions it happened to me were on planes equipped with KAS winches. Could be a bad interaction....

Link to comment
Share on other sites

19 minutes ago, Vegetal said:

Pardon my computing ignorance, but where do I get the log? That one at the debug menu?

I will try to replicate later, if I get any success I'll post here.

If game have CTD you can find it in folder inside ..\KerbalSpaceProgram\ (or wherever you have installed KSP) in subfolder named like date and time of CTD.

In case that you have exit game without CTD, you can find "output_log.txt" in folder ..\KerbalSpaceProgram\KSP_Data\

 

Link to comment
Share on other sites

  • 4 weeks later...
On 4/01/2016 at 6:00 PM, Crzyrndm said:

Pilot Assistant Development
Currently making some plans for development leading into 1.1, if you have any issues or suggestions now is the time to throw them out.

My plans so far:

Some additional points (this list is as much for my memory as it is for you lot :P)

  • Reshuffle control hierarchy to include a combined rotation state (Quaternion) to help with recovery / near vertical stability. Prototype low level control model part of SSAS in v1.12.4
    • May be a good time to add some control system linkages (ie. can't maintain pitch, ease off on the bank angle)
  • Move presets out of sight of MM so as to not affect caching process

@kcs123
More in the realm of Dynamic Deflection (the modlet I wrote to handle Q variation for SAS / PA / manual flight), but are you saying that you want separate profiles for auto/manual control? Because that's totally doable (I'm assuming MJ's state is easy enough to query here)

@Nansuchao
If the opportunity arises when I get to the UI, I'll look into it (maybe something like an activation state toggle when landed state changes to be a bit more generic). There is the pause binding (default: Tab) which might be a better option. I normally just use VSpeed to manage the glide slope and let it drop into the runway at ~-0.5m/s or less

Automation level of PA was always intended to be more for taking the drudgery out of long flights and/or keyboard control issues. Involved tasks like landing (glide slope, flaring, landing, brakes) I prefer to leave in the hands of the player

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