Boris-Barboris

[1.2.2-1.7.0] AtmosphereAutopilot 1.5.12

Recommended Posts

bZ57AbC.png


AtmosphereAutopilot plugin

 

I'm a flight man. After getting bored from mundane KSP launch routine I found myself enjoying my old hobby - atmospheric flight. And then the struggle was born - lack of control. SSTO's were annoying, keeping them on ascent was hard. Flying anything but overdamped dart was exhausting even with joystick. I felt like i'm in 1940-s, and it was not the feeling i wanted to get from a game I love so much. One year ago, in November of 2014, I started working on this plugin to solve those problems for me. I needed three things in my life: generic fly-by-wire, cruise control and automatic lander. It makes me sad, but after one year, I only managed to implement the first autopilot (cruise control is also implemented). Considering my free time shortage as a student, I decided to still release this mod here, for one may find it's functionality useful for him, or for another to see the potential in this mod and help it with his advice or coding\engineering skills.

Autopilots list:

  • Standard Fly-By-Wire. Control signal abstraction autopilot, SAS replacement. Here is a short flight footage of statically unstable plane I took: VIDEO. You can see roll-yaw induced isolation, AoA and G moderation, as well as general behaviour of the autopilot.
  • Mouse Director. Plane tries to fly towards camera direction. Use middle mouse button hold + mouse turn to look above the craft and have a convenient camera angle. Precise control (CAPS LOCK) prevents from roll-over while accelerating down, as well as restrains acceleration in general. VIDEO.
  • Cruise Flight. Maintain course, altitude, speed, fly towards a waypoint, picked on Kerbin in map view by click. More details in documentation.

Videos:

Quick overview by KerbalItalia dude (in Italian of course, but that doesn't really matter): https://youtu.be/k3rLK4uuJg8

Download links:

SpaceDock or Github

As usual, put .zip contents in gamedata.

License: GNU GPL v3.

Dependencies and compatibility:

You'll need ModuleManager.
FAR
is supported. No wind mods are supported, as well as any mods, wich are changing control surface, rcs and engine gimbaling behaviour. I recommend using Kerbal Joint Reinforcement by ferram4. If you're using "Stock Bug Fix Modules",
turn off ModuleControlSurfacePlus and ModuleGimbalPlus modules in it's manager.

FAQ:

>FAR?
- yes
>My control surface settings are not respected
- Make sure you reconfigure your crafts (set pitch, roll, yaw again) after mod installation, if you're using stock aero. You will not have to do that again, unless you delete the mod.
>Wobbling on my plane.
- yes. In 99% of cases I'll know what's the problem, it's just that to fix it would be impossible under my time budget. Warm it up by pitching\rolling, tweak some stuff, it may help. Ask me, if desperate.
>How to make the plane follows surface-level pitch, instead of orbital, while using fly-by-wire?
-Put navball in surface mode.
>AFBW mod is not cooperating with the standard fly-by-wire.
-Activate "AA compatibility" in AFBW's GUI.

Documentation:

I tried my best at providing documentation of the code itself and writing a readme you can find in the archive, or in Git repo - https://github.com/Boris-Barboris/AtmosphereAutopilot/blob/master/README.md. Please, make sure you've examined it before asking any questions. I'm not very good at support, but i will try.

FPS impact:

Computational complexity of plugin (when active) - O(n), where n - number of parts. You will feel it on 100+ part crafts, and you will feel a heavy GUI, wich is full of numbers (Unity is slow with rendering strings, or maybe I'm just a bad coder), needed for debugging. Fortunately, most of the time, you don't need any GUI at all.

Hotkeys:

Default ones:

"P" - "Master switch" you can use to toggle AA.
"Shift"+"P" - toggle Autopilot Module manager GUI.
"O" - default hotkey for moderation switch, when Fly-By-Wire is active. Can be changed in Global_settings.cfg in Fly-By-Wire section.

Acknowledgments:

Sarbian - for support of ModuleManager and consultation on numerical precision issues, and other cheesy KSP stuff.
Kobymaru - he kindly helped with initial criticizm and debugging of plugin in August-September.
Ferram4 - for providing a license application example to copy from, I'm new to this stuff.
Morse - neo-GUI design and implementation.
Hotel26 - multiple UI-related additions.
 

Edited by Boris-Barboris
update version

Share this post


Link to post
Share on other sites

This is very interesting, the video show no wooble at all!

EDIT: I saw the whole video, amazing...simply amazing :)

Edited by brusura

Share this post


Link to post
Share on other sites

Hey man, great to see you back!

In the mean time, I have been building bigger planes and realized that I really, really need your plugin, so I was hoping that you'd finish it up :)

I will use it in my career save over the next few days and I'll have more feedback then.

Share this post


Link to post
Share on other sites

I have so far tried this with a few aircraft with FAR... and damn, even under keyboard controls without precise controls enabled, they just fly buttery smooth. This is an AMAZING mod, congratulations. It is definitely going to be one of my standard mods from now on.

Share this post


Link to post
Share on other sites

Hi, I did some testing and I gotta say:

this mod is still amazing :) never had a flight this easy.

I just stumbled upon a little issue:

For some strange reason, the AA-Button is not present, if the RCSBuildAid plugin is installed.

Removing RCSBuildAid makes the AA-Button appear again.

I could produce this in a clean install, so interaction with a 3rd mod can be excluded.

This is GitHub Issue #1

Edit: So apparently, it's enough to delete the file: RCSBuildAid/Plugins/RCSBuildAidToolbar.dll to work around the issue. And RCSBuildAid even still works after that. Weird things going on.

Edited by Kobymaru

Share this post


Link to post
Share on other sites

Latest master branch build in dropbox link, changes:

  • Improved sideslip controller relaxation behaviour, high frequency control noise is reduced.
  • Added "Moderation" button to FBW window, so you can toggle all AoA and G moderation in one click. Useful for VTOLs, moderation is counter-intuitive on low speeds, or when model errors lock your control too tight and you need to warm it up quickly.
  • Fixed some yaw model bugs (related to thrust vector, I noticed it on VTOL's).
  • Roll max_v_construction is now defaulted to 3.0, as was intended before release (I messed with configs and broke it).

I will soon disappear again, so, please, report issues\tips\ask your questions.

Share this post


Link to post
Share on other sites

I have digged a bit in the cfg files , is there an option to have moderation always off?

Share this post


Link to post
Share on other sites

No, sorry, it always turns on by default, just use "Moderation" (from last build) button for now, one click and it's all off. Beware of low quality of control on large AoA regimes.

Share this post


Link to post
Share on other sites

Edit: this is not an AtmosphereAutopilot issue. Please excuse the inconvenience.

Hi! Since the Update to 1.0.5, there is a compatibility issue between USI-LS[https://github.com/BobPalmer/USI-LS/releases] and AtmosphereAutopilot. There is a logspam of:

MissingMethodException: Method not found: 'ResourceConverter.ProcessRecipe'.

If either USI-LS is or AtmosphereAutopilot is removed, the logspam goes away.

http://forum.kerbalspaceprogram.com/threads/116790-1-0-USI-Life-Support-0-1-0-2015-04-27

https://github.com/BobPalmer/USI-LS/releases

This is GitHub Issue #2.

Edited by Kobymaru

Share this post


Link to post
Share on other sites

Saw your comment on issue tracker: I agree, AA has no relation to resource system. It's probably other mod. I'll rebuild it under 1.0.5 in next couple of days, but apart from rcs code, it should work fine in new version.

Share this post


Link to post
Share on other sites

Just wanted to say thank you for this mod. There're a few mods out there that pass the jaw-drop test, but this is certainly one of them. Thank you again!

Share this post


Link to post
Share on other sites

How well does it work with statically unstable aircraft?

Share this post


Link to post
Share on other sites
How well does it work with statically unstable aircraft?

If the craft is controllable, it doesn't really matter. Video near the end of main post is demonstrating just the case.

Share this post


Link to post
Share on other sites

great autopilot mod indeed. Make fighters with super maneuverability very easy to handle at regular flight conditions. Great Work! Would you consider a hotkey for moderation ,and allowing it to be defined a cfg?

Share this post


Link to post
Share on other sites

Relinked for 1.0.5 (was not really needed), added moderation hotkey (default is "O"), fixed a couple of bugs. Main post updated.

I must say, in 1.0.5 all those high-gimbaling engines don't look very aesthetic, because of my little cheat of disabling gimbaling speed to decrease state space dimension count and save me from another week of coding. Still, I won't be fixing that in near future, sorry. When AA is inactive, gimbaling speed is returned to vessel engines.

Edited by Boris-Barboris

Share this post


Link to post
Share on other sites

Your control law is so good that I don't need the engines gimballing anyhow! I don't think it can be understated how well this system works compared to others! I've never had this level of control in KSP! Top work....

Share this post


Link to post
Share on other sites

... well now, this is impressive. Kudos, man, you've done an incredible job!

While I know you've written off (for the meantime) more advanced controls, I must wonder: how hard would it be to put in an altitude control to maintain a steady height? You've already got steady flight, after all, and this would let my support craft fly without automatically crashing all the time ;)

Share this post


Link to post
Share on other sites

Roadmap is: prograde thrust controller -> srfVelocityVector controller -> Cruise control (height, speed and direction) and Autolander (land to runway). The hardest part is already done, but I still need a couple of free weeks to tryhard through new controllers. And yes, it's easy to make it work, but hard to make it work right and without forcing user to play "PID tuning simulator 2015". Maybe, in January.

Share this post


Link to post
Share on other sites
because of my little cheat of disabling gimbaling speed

Oh, THAT's the magic of your mod :D I was wondering how you could control my craft so much better than me manually or PilotAssistant...

Roadmap is: prograde thrust controller -> srfVelocityVector controller -> Cruise control (height, speed and direction) and Autolander (land to runway).

Great plan! Really looking forward to cruise control, so I can actually lean back and chill when your mod flies my craft.

And yes, it's easy to make it work, but hard to make it work right and without forcing user to play "PID tuning simulator 2015"

That's actually a very commendable goal. Autopilots should be easy, and as you say, other mods DO require too much PID fixing :/

Share this post


Link to post
Share on other sites
Oh, THAT's the magic of your mod :D I was wondering how you could control my craft so much better than me manually or PilotAssistant...

Nah, control surfaces still have turning speed, so I kinda half cheated. In old KSP versions engines had like 2-3 degrees of gimbal range, so it was actually not worth keeping their speed. Not to mention, such simplifications save both my time and cpu time.

Share this post


Link to post
Share on other sites

@Boris-Barboris, This is a brilliant idea for a mod. I played around with it earlier and I'm amazed at how much you managed to simulate. On the downside, I found it a bit cumbersome modify the default values. Are there a few values in particular that you recommend modifying if I want to make the controls more responsive? The defaults are excellent for a spaceplane, but severely limiting for an acrobatic or fighter jet style plane.

Overall this is an amazing mod! I sent some rep your way. I hope that you continue to develop it!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now