Crzyrndm

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

Recommended Posts

 

Download: Github

NOTE: Usage of Dynamic Deflection is highly recommended to maximise stability


Pilot Assistant

3 basic aids for use in atmospheric flight (that is, forwards, not upwards). Works with any atmospheric model so long as the craft has enough control authority to be controlled.

  • Heading Hold - craft will bank to a controlled angle and attempt to match heading with the target given
  • Altitude hold - craft will pitch to a controlled angle and climb/descend to the target altitude
  • Climb speed - craft will pitch to an angle that gives the desired ascent or descent rate in m/s
  • Yaw Control - Smooth co-ordinated turns and damping of yaw oscillations
  • Airspeed Control - Set an airspeed target and Pilot Assistant will manage the throttle to maintain that target
  • Keyboard adjustment of targets with bindings corresponding to standard vessel controls
  • Ingame binding list and rebinding tool

Each function is controlled by cascaded PID controllers with fully configurable gains and limits. These may need retuning to suit different craft depending on their aerodynamic stability.


Surface SAS and SAS Tuning

  • Surface SAS holds orientation relative to surface
  • Fully tweakable PID gains for stock SAS and Surface SAS
  • Pitch/Roll/Heading angles in Surface SAS can be set by hand
  • SSAS axis controls deactivate seperately under user input, so there is no listing to one side when you are just pitching up/down.

PID Information

Spoiler

 


Pilot Assistant 101 - How to fight the wobble

There are two general causes for Pilot Assistant making your vehicle oscillate (wobble), over-reaction and under-reaction.

Over-reaction results in fast sharp oscillations, and typically happens when your craft has a lot of control authority (high speed, low altitude, lots of control surfaces). Under-reaction results in more of a slow "cartoon drunk" sway and occurs for all the opposite reasons.

The simple fix is to increase or decrease the amount of "reaction" Pilot Assistant has

  • First, identify the controller related to the axis that is misbehaving.
  • If you are having problems that look like over-reaction, increase the scalar term slowly (smaller craft may also want to decrease Kd)
  • If you are having problems that look like under-reaction, decrease the scalar term slowly (larger craft may also want to increase Kd)
  • Remember your control situation changes a lot as you fly. A typical SSTO will have you fighting over-compensation at low altitude and under-compensation at high altitudes
  • If problems persist, feel free to ask for advice

Keybindings

Since Pilot Assistant overrides many functions that would normally be dealt with through keyboard input, many applicable keys have been repurposed to make Pilot Assistant easier to use

Spoiler

Jd2UHHR.png


Spoiler

Version 1.12.2

* Fix for first launch contract never completing
* Fix for EVAing doing odd things to the controllable vessel list

Version 1.12.1
* Fix for nullrefs when uncontrollable vessels are created
* some changes to support RPM integration

Version 1.12.0
* Compatibility pass for KSP 1.0.5
* Fixed: Nullref spam after docking
* Fixed: Nullref spam if no controllable vessels are in physics range
* Fixed: Settings not always saving
* New Feature: speed control can now take direct control over the throttle allowing the % to be directly set and configurable modification rate using Alt/Fine Control

Version 1.11.8
* Fixed: plane dipping when using the set altitude button

Version 1.11.6 & Version 1.11.7
* Fixed: Loss of control under certain conditions when on EVA

Version 1.11.5
* Fixed: Uneditable heading target while control was not active
* Added: "Level" button to the bank control, sets target bank to zero
* Added: pitch mode to the vertical control
* Fixed: Heading value control now takes input again

Version 1.11.4.1
* Fixed inverted key controls for bank

Version 1.11.4
* Fixed: Assistant vertical control compensating in the wrong direction when setpoint was changed
* Fixed: NRE spam on docking
* Fixed: Non-functional windows with multiple loaded vessels
* Fixed: Several settings failing to load (NOTE: Your settings will be reset, I made some breaking changes at the same time)
* Fixed: Loading a scene with multiple vessels will leave the active vessel selected by default
* Improvement: Wing leveller upgraded to a bank angle control
* Improvement: Vessel forward axis determined dynamically to reduce impact of wobbly joints on control accuracy

Version 1.11.3
* minor fix to control input
* Throttle settings from speed control are permanent
* disabling vertical control with an atmosphere present causes a slow release of control input

Version 1.11.2
* SSAS surface heading target is back to being a direction lock
* direction lock for Pilot Assistant is now planet relative for improved accuracy

Version 1.11.1
* Fix for multi appearances in the stock toolbar
* Fix for null defaults

Version 1.11.0
* Multi vessel control

Version 1.10.1.1
* Fix for planes trying to fly upside down

Version 1.10.1
* SSAS roll control refined so it doesn't perform unnecessary spins
* All SSAS control calculations shifted to double format for increased precision (previously the resolution was limited to ~0.02 degrees)
* Integration of stock SAS modes into SSAS function (eg. prograde, normal, target, etc.)

Version 1.10.0
* Complete SSAS control rewrite. Significantly improved behaviour
* Tweaks to the drag resizing of the Pilot Assistant window
* Added heading # lock to Pilot Assistant modes

Version 1.9.3
* Fixed missing nullcheck

Version 1.9.2
* Toolbar mod support
* Improvements to Radar Altitude control mode
* Fixed size of drag sections not being saved correctly

Version 1.9.1
* Fixed initialisation issue
* Fixed flickering preset window

Version 1.9.0
* Configurable key bindings for pause, hdg/vert/throttle toggle actions

Version 1.8.1
* Fixed Pitch and Yaw flight controls remaining locked out under some circumstances
* Fixed unpausing activating all control systems
* Pilot Assistant scroll areas are now resizeable

Version 1.8.0
* Added Radar altitude mode to vertical control
* Fixed craft trim being affected while Pilot Assistant systems engaged
* Some UI changes

Version 1.7.1
* Fixed Mode switching causing control to activate

Version 1.7.0
* Cascaded speed controller into an acceleration controller
* Added acceleration control mode
* Changed mode handling to improve expandability
* Disabled pause keybinding (tab) in map view due to conflict with a KSP binding

Version 1.6.0
* Added tuning for the vector tracking SAS modes

Version 1.5.6
* Recompile that will hopefully prevent KSP CTD'ing for no apparent reason
* Fix for ghost ships...

Version 1.5.5
* Recompiled for KSP v1.0
* Quick hack to get around applauncher bug

Version 1.5.4
* SSAS pitch and yaw unlock is only synchronised if the bank angle is greater than 5 degrees. Single axis inputs below that threshold only unlock the axis the input is directed at

Version 1.5.3
* SSAS heading control locks to a direction (the same system as Assistant Heading control)
* Pilot Assistant Now lets raw heading and roll inputs through while landed with no alterations. Massive improvement in handling of takeoff/landing procedures
* Pilot Assistant dual heading displays now show the current target heading and the heading difference to make it easier to turn through a certain angle in polar regions
* Update buttons for SSAS now activate the associated axis
* Yaw input delay now defaults to zero. Can be changed in the options if needed.
* Input regions for Pilot Assistant no longer retain focus after commiting changes

Version 1.5.2
* Added configurable delay to heading alterations made via. Yaw Left/Right controls.
* Pilot Assistant transition logic improved. Engaging controls and toggling modes is significantly smoother
* Vertical speed measurement improved (again) as detailed here
* Split heading target input/readout into two fields. The left field displays the current setpoint, while the right field is for displaying the final target (NOTE: There is a slight error here. I meant to make the right hand field the target entry field as well).
* Direction lock now engages instantly for all methods of target entry. Entering manually previously did not lock for a noteable period of time.

Version 1.5.1
* Fixed bad calculation of vertical speed for Pilot Assistant if SSAS is armed

Version 1.5.0
* Heading control locks to a direction. NOTE: Target heading will change over time, particularly in polar regions
* Smoothed engagement of heading control based on current angle of bank
* Fixed vertical speed not being measured as zero at a constant altitude
* Fixed heading control to use prograde heading instead of craft heading in order to manage sideslip

Version 1.4.2
* Better integration of non-keyboard input sources (github user bssthu). NOTE: I can't test these changes as I have no analog input source
* Smoothed transfer between SSAS pitch control and Pilot Assistant Vertical Control

Version 1.4.1
* Fix for my (GUI) stupidity
* Fix bank controller calculating twice per physics frame (in real terms, Ki has been halved on the primary heading control)
* Fix for window default positions being stacked up in the top left corner.
* Fix for the scroll area's in the Asst window not resizing quite right. Forcibly removed the horizontal scrollbar.
* General optimising

Version 1.4.0
* Roll inputs have some impact while Pilot Assistant heading control is active * Tooltips added to all parameter inputs (mouse over the labels to see them)
* Fixed the flickering Assistant window that happened whenever you clicked it
* Added option to use seperate min and max limits in the Assistant for all controllers
* Added option to hide the tooltips in the Assistant options (works for SAS tooltips too)
* All Assistant options are now persistent (scenes, saves, KSP restarts. The selected options won't change)

Version 1.3.1
* Fix for control system freezes resulting from a misplaced clamp
* Minor GUI cleanup

Version 1.3
* SSAS pitch/roll/heading inputs now have update buttons, changes won't be made until commited
* All setpoint changes through commit buttons now use a gradual transfer scheme. This is tweakable on Pilot Assistant using the "Easing" parameter. Higher is more abrupt. Only applies to the controller recieving the commit (even though it's visible on all controllers)
* Window position is now persistent
* Integral limits are now single input for both upper and lower
* Fixed GUI leakage for the toolbar window
* Removed slide parameter from SSAS
* Added Delay parameter to SSAS. This is the time in 1/100ths of a second between you releasing the key and SSAS locking to the current attitude

Version 1.2.1
* Resolved AGX incompatibility
* Removed some log spam that found its way into 1.2

Version 1.2
* Added default update button
* Fixed default preset creation error with SSAS that was causing NAN control outputs

Version 1.1.3
* Fixed incomplete presets causing errors
* Updated AoA default over-ride to NEAR and added integral clamps
* Reduced Throttle sensitivity by 75%
* Hard clamped outputs returned to KSP as appropriate

Version 1.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!!!
* 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
* Added Modifier (LAlt) requirement to Asst function toggles

Version 1.1.1
* Fixed GUI style leakage
* Added Throttle controller to presets
* Added SAS mode to craft presets
* Added AoA default override patch for non-FAR users
* Added new keybindings for toggling Pilot Assistant functions

Version 1.1
* Added Controller support for SSAS and Pilot Assistant (Heading & VSpeed Only)
* Added Throttle/Velocity control to Pilot Assistant (no preset support yet)
* Added SSAS "Slide" to SSAS Presets

Version 1.0.4
* Fixed typo that was preventing the roll axis of SSAS relocking
* Added the "slide" modifier to the SSAS GUI

Versiont 1.0.3
* Squashed another​ nullref that was causing initialisation issues

Version 1.0.2
* Squashed another nullref that was preventing the stock SAS tuner initialising properly
* Removed a bunch of logging and other stuff that wasn't meant to make it public
* Fixed preset loader not triggering on inflight vessel switching
* Fixed SSAS not supporting inflight vessel switching

Version 1.0.1
* Fix for flight scene reloading causing all functionality to stop

Version 1.0
* Large scale code overhaul
* SSAS now uses a sliding engagement
* Presets are now associated with a specific craft name
* A "defaults.cfg" will be created on entering the flight scene for the first time. Change the tuning values here to alter your default settings
* Fix for integral windup issues when craft is uncontrollable
* Fix for incorrect SAS preset assignment

Version 0.9.6.2
* Fix for erroneous heading behaviour around planetary poles

Version 0.9.6.1
* Fix for Pilot assistant not correctly updating on unpausing
* WASD inputs are now locked out of Pilot Assistant while paused

Version 0.9.6.0
* SSAS activity for pitch/heading/roll can be activated and deactivated seperately
* No more being able to edit SSAS roll targets when it would cause issues
* Pilot Assitant moved to new Autopilot event

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 comlpiant

Version 0.9.4.0
* 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


Version 0.9.3.0
* Currently activated presets persist when scene switching
* GUI should no longer be affected by other mod GUI's or certain section of the stock GUI
* SAS gain labels correctly take only a single line, resolving a window sizing issue

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

Version 0.9.1.2 (0.9.1.1 wasn't recompiled)
* Remove divide by zero error that would result in blackscreen

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

Version 0.9.0
* GUI overhaul phase 1 - Layout responsiveness increased

Version 0.8.3
* Corrected behavious of Surface SAS around 0/360 degrees heading and 180/-180 degrees of bank (it doesn't take the long way around any more...)
* Surface SAS engagement smoothing
* Surface SAS defaults are less forceful to help with smoother engagement
* Surface SAS activity indicator is now a button (with pretty colours no less )
* Surface SAS attitude +/- buttons behave better around the 0/360 and 180/-180 crossings
* Surface SAS attitude inputs are now clamped within sane ranges

Version 0.8.2
* SAS Presets work
* Default tuning updated

Version 0.8.1
* Improved Pilot Assistant/SAS interaction
* Fix for ground activation of modules with an active integral term causing unwanted jerks on takeoff
* Retrofitting the scalar tuning value seen in the SAS module to the PA tuning GUI
* Smoothing of the derivative term (now a rolling average with a factor of 0.5. ie: change = change / 2 + new_change / 2)

Version 0.8
* Added SAS module that holds a surface relative heading
* Added SAS tuning for both stock and the new SAS module
* Added Left alt hotkey to WASD control as a speed modifier. Holding alt down will change the target 10x faster than normal, or 10x slower if fine control is active
* Pilot Assistant presets are saved more often to

Version 0.7
* Added wing leveller mode
* Fine control now works on stock fine control mode (caps lock toggle, indicated by blue coloured pips in the bottom left)
* Tab pauses all control systems and returns full control to user
* (Modifier)-X activates wing leveller and sets target vertical speed to zero (level everything off) (Modifier is LAlt by default on windows)
* Fix for control systems not deactivating between flights
* All PID constants now always show atleast 1dp and up to 3sf (ie. 3 is displayed as 3.0, 3.333 would display as 3.33)
* Window now resizes more dynamically to fit available content

Version 0.6
* Added WASD controls for heading and vertical set points. Hold KSP Modifier key (LAlt on windows) to engage fine control
* Fixed rudder to follow heading setpoint correctly
* Fix for preset states not persisting correctly (delete will work now...)
* Complete code rebuild to increase modularity and allow for further expansion with less headaches

Version 0.5.0.1
* Fix for blank presets.cfg being created and breaking KSP loading
* Possible folder rename after local inconsistency was discovered that may have been causing all sorts of wierdness

Version 0.5
* Presets - Create, update, and delete (kind of. The delete function only works if you quit KSP without loading into flight again >.<. Easier just to remove from the presets.cfg atm)
* Added increment buttons to the PID tuning parameters. Increments are +10% and -9.1...% (x*1.1 and x/1.1 respectively. This means it comes back to the same value after incrementing and decrementing)
* Reset to default button in the preset's menu (defaults are not currently configurable, unsure if I want there to not be a backup so it's hardcoded)

Version 0.4
* Integrated yaw damper into the heading control system. Can now be used to add rudder input with some retuning. Default is still only yaw damping.
- For active rudder control: make Ki slightly > 0 and tweak the max yaw values to suit. Pure yaw damper is Kp/Ki/Kd all == 0
* More GUI cleanup and polishing
* Fixed to handle switching craft in flight appropriately
* Attempting to give non-numeric input to the PID parameters no longer generates a log error

Version 0.3
* Massive GUI cleanup
* Vertical control now defaults to vertical speed when activated and updates to the current vertical speed (no more jump on activation)
* Numerous little bug fixes

Version 0.2
*Pitch controller replaced by AoA (Angle of Attack) controller. The only difference you will see is that you can now limit target AoA's
*Yaw Damper added. Will be active while either heading or vertical velocity are in use.
*Fixed the altitude and AoA output limiters to display intuitive values (ie. max +ve climb rate uses a +ve value)

 

Distributed under CC BY-NC-SA 4.0 license

Edited by Crzyrndm

Share this post


Link to post
Share on other sites

This is fantastic! I just gave it a whirl with one of my go to space planes and worked a treat. It seemed to work pretty well right out of the box with FAR. Admittedly, it took a few attempts to figure out what all the valued were doing, but once I sorted that, I was able to set a course and let it ride.

Thanks for making this one. It will make flying around Kerbin so much more enjoyable.

A few thoughts that I had while testing it out:

  • It would be nice to have the option of using blizzy's toolbar vs. the stock launcher, but that's minor.
  • The assistant didn't quite seem to know how to handle flaps with FAR. That said, I'm not sure how much of an issue is because by the time you want flaps, you should probably be taking the stick yourself.
  • Screen space being at a premium, it would be nice to have resizable window for the display. This being an initial release, however, my guess is that you've thought of that. Regarding the on screen display, I'd love to see something similar to Kerbal Engineer's ver. 1 displays? This is a mod that I imagine keeping the window open for long periods of time when flying to spots on Kerbin, and Engineer's displays look nice and don't take up lots of space.
  • Might I suggest making a quick readme, or in game help menu, that makes it more clear as to what the PID tuning values do. Trial and error is always fun, but in some cases the values seemed minimally effective. Other times small changes made a big impact. That said, it worked reasonably well with the default values, so maybe a "reset to stock values" button would be helpful.

Hopefully, my comments are constructive, and not regarded as criticisms. This is an awesome feature for the community!

Cheers!

Edited by starkline

Share this post


Link to post
Share on other sites

  • It would be nice to have the option of using blizzy's toolbar vs. the stock launcher, but that's minor.
  • The assistant didn't quite seem to know how to handle flaps with FAR. That said, I'm not sure how much of an issue is because by the time you want flaps, you should probably be taking the stick yourself.

Hopefully, my comments are constructive, and not regarded as criticisms.

I prefer the stock applauncher because there is no requirements for anything else. Being able to switch to blizzy's would be a long way down any feature list I was to draw up (another mod or two to get to feature complete first...).

It won't handle flaps directly (and is not intended to), but it should be able to compensate for their use if you do activate them.

and yes, that's perfect feedback :)

  • Might I suggest making a quick readme, or in game help menu, that makes it more clear as to what the PID tuning values do. Trial and error is always fun, but in some cases the values seemed minimally effective. Other times small changes made a big impact. That said, it worked reasonably well with the default values, so maybe a "reset to stock values" button would be helpful.

Erp, just to clear that up (I know they aren't particularly well named...)

I would ignore the values marked as Roll and Elevator. The important blocks are the Hdg (Heading) and Pitch controllers.

Hdg: Input - heading, Output - roll angle

Roll: Input - roll angle, Output - surface deflection

Altitude: Input - altitude, Output - vertical speed (it's a fudge so I can use the same control for vertical speed and altitude)

Pitch: Input - Vertical speed, Output - pitch angle (v0.2 Now outputs AoA )

Elevator: Input - pitch angle, Output - surface deflection

Kp/Ki/Kd - PID parameters for each controller

Out min/Max - Max output for each controller

Clamp Upper/Lower - Integral sum clamps

For example, the Altitude Out Max value is the maximum target climb rate that will be input to the Pitch block.

PID limits can be closed 99.99% of the time. These 4 values should be set and forget for the most part. I'll see if I can make the display without them a little more tall and narrow

tl;dr

Focus on the Hdg Kp/Ki/Kd for the heading controller, or the Pitch Kp/Ki/Kd for the vertical speed controller

I did say they weren't simple aids :P

Edited by Crzyrndm

Share this post


Link to post
Share on other sites

Yes, you did say that, and I think I have a better grasp of what's going on after looking over your code on github. After some more playing around with it, I've got to say it's working really well. For me, at least, an already well balanced and stable plane works exceptionally well with very little effort. I don't play using stock aero or NEAR, but FAR is working a treat.

As a final thought on the GUI, I think you nailed it on the head: taller and more narrow with respect to width is more advantageous. I'm sure it's a matter of taste, though.

Cheers

Share this post


Link to post
Share on other sites

This seems exactly like something I've been wanting and trying to push MechJeb into doing (with varying levels of success). Will be trying this out today :D

Share this post


Link to post
Share on other sites
I don't play using stock aero or NEAR, but FAR is working a treat.

It should be entirely irrelevant which aerodynamic model you play under because it works on raw flight parameters (if it's relatively aerodynamically stable, the default parameters should work reasonably well for any craft). The only difference is that the stability of craft change between stock and FAR/NEAR (I included the Aeris FAR retune as an example craft that anyone could use to try it out)

RE: GUI

It's current form is really just a "slightly" tidied up version of what I had open for development. Not really intended as a permanent feature, just something that works.

I'll have to have a careful think about how things are being laid out. Not all of the currently displayed data actually needs to be shown to an end user (particularly the control surfaces, which are essentially filling in the role of stock SAS).

Yaw damper (since this can't be used with SAS active...) and AoA limiter take priority on that though

Edited by Crzyrndm

Share this post


Link to post
Share on other sites

Updated to 0.2

  • Pitch controller replaced by AoA (Angle of Attack) controller. The only difference you will see is that you can now limit target AoA's directly instead of pitch (very useful in FAR/NEAR)
  • Yaw Damper added. Will be active while either heading or vertical velocity are in use. Zero out tuning parameters (Kp/Ki/Kd) if you don't want it running
  • Fixed the altitude and AoA output limiters to display intuitive values (ie. max +ve climb rate uses a +ve value)

I think I'll go see about making a user guide that explains all the values a little better

EDIT: https://github.com/Crzyrndm/Pilot-Assistant/wiki

Atleast lists what each controller does and which values are commonly important. I'm finding it difficult to write anything pertaining to actual usage hints though.

Edited by Crzyrndm

Share this post


Link to post
Share on other sites

Updated to 0.3

  • Massive GUI cleanup. A lot less screen space occupied, more sense to labelled values (I hope)
  • PID values for control surfaces are hidden by default as they are minimally important to tuning
  • Vertical control now defaults to vertical speed. Climb rate will be locked in automaticaly when activated (gives a smoother activation)
  • .version file included for AVC users
  • Lots of little fixes

New GUI

Javascript is disabled. View full album
Edited by Crzyrndm

Share this post


Link to post
Share on other sites

Nifty; this is looking like it might be able to replace my current SAS/PID Tuner setup. Is it possible to set it to mimic a non-wobbly SAS (i.e. a one-button "hold the current roll/pitch/bearing until disturbed")?

Share this post


Link to post
Share on other sites

Bearing yes.

Pitch and roll currently not, or atleast not directly. Vertical speed can be controlled directly instead of pitch, roll it's only possible currently to hold the wings level (set heading Kp/Ki/Kd = 0) as a constant roll value (changes in set heading control roll angle, but thats probably not what you're looking for)

Share this post


Link to post
Share on other sites

Oh neat! Its a KSP analog of an autopilot system in real aircraft. I use to use this type of thing all the time in Microsoft Flight Simulator. Now if I could just find some other programs to do stuff similar to this for other types of craft such as rockets, I might actually be able to replace MechJeb entirely.

Share this post


Link to post
Share on other sites

Hah, yes this is most definitely based on the autopilot functions in a light aircraft

Now if I could just find some other programs to do stuff similar to this for other types of craft such as rockets, I might actually be able to replace MechJeb entirely.

These two mods might be what you're looking for

http://forum.kerbalspaceprogram.com/threads/50736-0-25-(Oct-12-14)-Automate-Vertical-Velocity-and-Altitude-Control

http://forum.kerbalspaceprogram.com/threads/85838-0-23-5-%28Jul13-14%29-RCS-Landing-Aid-Kill-your-horizontal-velocity-to-land

Share this post


Link to post
Share on other sites

First & foremost, this is awesome. Cascading PID controls make flying a whole lot more enjoyable :)

That said, recon you could put a lid on the log spam?

eg: "Yaw: 0.00176889268017035" ad infinitum...

Makes reading logfiles a tiny bit annoying.

Share this post


Link to post
Share on other sites
That said, recon you could put a lid on the log spam?

Oh, my bad. That was not meant to make it to release...

Share this post


Link to post
Share on other sites

Ok, the log spam should be gone (:sealed:) plus a few other little changes


Version 0.4
* Integrated yaw damper into the heading control system. Can now be used to add rudder input with some retuning. Default is still only yaw damping.
- For active rudder control: make Ki slightly > 0 and tweak the max yaw values to suit. Pure yaw damper is Kp/Ki/Kd all == 0
* More GUI cleanup and polishing
* Fixed to handle switching craft in flight appropriately
* Attempting to give non-numeric input to the PID parameters no longer generates a log error

As far as functionality goes, I'm not too sure there's a whole lot more to be added here.

Edited by Crzyrndm

Share this post


Link to post
Share on other sites
As far as functionality goes, I'm not too sure there's a whole lot more to be added here.

How about a way to save the PID constants? (ideally per-craft) Flying with FAR I need to nerf the AOA / V.speed controller response on every launch.

Edited by steve_v

Share this post


Link to post
Share on other sites

I knew it would be something simple like that. Per craft isn't likely unless I start adding modules, but maybe some configurable presets would do the trick.

Share this post


Link to post
Share on other sites

Man i'm still using the ver 0.3, today was the first day i tried it, despite you telling me before, 'cause i kind of abandoned ksp for some weeks, and it's working sooooo fineeeee... I just need FAR's AoA for level flight for my desired cruise settings, and then it goes, i didn't updated to 0.4 yet 'cause i started the mission with 0.3 and then realized 0.4 was released but as soon as i finish this mission i'll certainly update, i want to check the new GUI features, my mission timer is t+1.47.32 with no failures whatsoever, in fewer words: IT WORKS LIKE A CHARM...

Share this post


Link to post
Share on other sites
I knew it would be something simple like that. Per craft isn't likely unless I start adding modules, but maybe some configurable presets would do the trick.

Presets would suit me fine, even just making the gains persistent and/or putting them in a config file somewhere.

Share this post


Link to post
Share on other sites

Updating again :cool:


Version 0.5
* Presets - Create, update, and delete (kind of. The delete function only works if you quit KSP without loading into flight again >.<. Easier just to remove from the presets.cfg atm)
* Added increment buttons to the PID tuning parameters. Increments are +10% and -9.1...% (x*1.1 and x/1.1 respectively. This means it comes back to the same value after incrementing and decrementing)
* Reset to default button in the preset's menu (defaults are not currently configurable, unsure if I want there to not be a backup so it's hardcoded)

And as a demonstration of the levels of precision achieved by this mod, I was doing some low flying over the oceans yesterday and cleaned off all the aft port control surfaces on the Aeris-3A (totally by accident, was actually trying to improve the tuning...). It managed to finish the turn and return to the straight and level using only the remaining starboard surfaces and the port canard with an altitude clearance of <0.2m (Aeris-3A has a required altitude of just under 1m) much to my amazement I must add. I didn't think it would manage after the third one dissapeared.

Final note:

I have discovered a *slight* bug with the rudder control system when used in coordinated mode, that being it only works for turning in one direction for some reason. The default yaw damping is unaffected by this issue

I just need FAR's AoA for level flight for my desired cruise settings

I don't quite understand what you mean here. It shouldn't need anything from FAR to work.

Edited by Crzyrndm

Share this post


Link to post
Share on other sites

Hey there, just saw and tested this mod yesterday, pretty awesome. Been looking for something like this for ages.

Unfortunately I can't input the numbers directly without activating a bunch of action buttons. But its fine eitherway...

Anyway, I thought to suggest for you to move the button to blizzy's toolbar if that available. Just cus you know, it offers more flexibility.

Share this post


Link to post
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.