Jump to content

[1.8.0-1.12.5] AtmosphereAutopilot 1.6.1


Boris-Barboris

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.
  • AoA-Hold. Maintain desired pitch AoA.

Videos:

Quick overview by KerbalItalia dude (in Italian of course, but that doesn't really matter): https://youtu.be/k3rLK4uuJg8
F-35 post-stall piloting with FAR (no commentary): https://www.youtube.com/watch?v=Gi-zXRDfyAs

Download links:

SpaceDock or Github

As usual, put .zip contents in gamedata.

License: GNU GPL v3.

The KSPUpgradeScriptFix.dll and its source can be found on this post (link for convenience) (alternative: https://github.com/net-lisias-ksph/KSPUpgradeScriptFix).

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.

KOS integration:

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

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

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

Link to comment
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
Link to comment
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?

Link to comment
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
Link to comment
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 ;)

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

Link to comment
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 :/

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

Link to comment
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!

Link to comment
Share on other sites

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