kcs123 Posted May 5, 2020 Share Posted May 5, 2020 6 hours ago, Flibble said: To pick up on this old post, I have made a mod that extends kOS to allow it to control AA from script. Currently supported are: toggling mode (fbw, director, cruise), setting director vector, setting some cruise params. Note that the director is not mouse director, I've added a new kOS director to avoid the mouse interfering. Download (and code) here: https://github.com/RCrockford/kOS-AtmosphereAutopilot/releases Usage: You can access it with ADDONS:AA it has the following boolean suffixes: FBW, DIRECTOR, CRUISE, SPEEDCONTROL, PSEUDOFLC, scalar: SPEED, HEADING, ALTITUDE, VERTSPEED, and vector: DIRECTION e.g. set addons:aa:altitude to reqAltitude. set addons:aa:heading to reqHeading. set addons:aa:cruise to true. or set addons:aa:direction to heading(reqHeading, reqPitch):Vector. set addons:aa:director to true. Interesting addition for both mods, kOS and AA. May I suggest to open dedicated forum thread for this if you didn't already ? Also, it might be a good idea to have full install path in release archive, like "\GameData\kOSAtmosphereAutopilot". Only MM dll should be in root of Gamedata folder. Any other mod should be inside some subfolder within Gamedata folder. While it does not matter much when comes to plugin DLLs to work properly, with amount of available mods for KSP things can become messy quickly. Also, at some point of develepment you might deceide that you want/need additional config files and so on. Keeping everything in dedicated subfolder will make everything better organised on the long run. Despite having a little more things to do in the begining that does not seems to be necessary at first. Quote Link to comment Share on other sites More sharing options...
Flibble Posted May 5, 2020 Share Posted May 5, 2020 It's supposed to be in a separate folder, though I'm not discounting that I messed up the zip. Quote Link to comment Share on other sites More sharing options...
Flibble Posted May 5, 2020 Share Posted May 5, 2020 And having double checked I can see that it does have a folder structure in it, so I'm not sure what the issue is. Quote Link to comment Share on other sites More sharing options...
kcs123 Posted May 5, 2020 Share Posted May 5, 2020 2 hours ago, Flibble said: And having double checked I can see that it does have a folder structure in it, so I'm not sure what the issue is. Sorry, my bad, archive does contain " kOSAtmosphereAutopilot" folder in it (I missed it, my eyes are not so good imediately after work). However, comon practice is to have full path in archive "\GameData\kOSAtmosphereAutopilot". You are missing bolded part. No issue for me, but there is a lot of less skilled people, especialy new KSP player who often mess up manual installs. I don't know why I thought that kOSAtmosphereAutopilot folder is missing too. Sorry about that. Quote Link to comment Share on other sites More sharing options...
Flibble Posted May 6, 2020 Share Posted May 6, 2020 Anyone "less skilled" I would expect to wait for a CKAN release. Quote Link to comment Share on other sites More sharing options...
Galland1998 Posted May 6, 2020 Share Posted May 6, 2020 Does anyone else have an issue with Atmosphere Autopilot "pulling" the aircraft to the right during initial take off and landing? When I leave AA engaged from takeoff all the way to landing I always seem to get this. It becomes very noticeable during the final breaking after rollout. However, when I was testing this issue I found that the "pulling" goes away when I turn off AA and go back the stock controls/SAS. Is that normal or does anyone know how to tweak AA to stop doing that to my aircraft? For landing and takeoffs the AA is set to the the Flyby Wire mode. All the setting are pretty much stock with the exception of the setting for coordinated turn is turned on and I have some of the stock G-Limits and AOA lowered. Quote Link to comment Share on other sites More sharing options...
Lisias Posted May 23, 2020 Share Posted May 23, 2020 On 5/6/2020 at 2:24 PM, Galland1998 said: Does anyone else have an issue with Atmosphere Autopilot "pulling" the aircraft to the right during initial take off and landing? When I leave AA engaged from takeoff all the way to landing I always seem to get this. It becomes very noticeable during the final breaking after rollout. However, when I was testing this issue I found that the "pulling" goes away when I turn off AA and go back the stock controls/SAS. Is that normal or does anyone know how to tweak AA to stop doing that to my aircraft? Check of the SAS was engaged when you turned on AA. I solved some weird behaviours this way. Perhaps it would work to you. Quote Link to comment Share on other sites More sharing options...
ItsJustLuci Posted June 1, 2020 Share Posted June 1, 2020 Atmospheric Autopilot is making my aircraft nose down in 1.9, but this same version worked in 1.8 just fine. Is there a fix? Quote Link to comment Share on other sites More sharing options...
Boris-Barboris Posted June 1, 2020 Author Share Posted June 1, 2020 6 hours ago, lk00david said: Atmospheric Autopilot is making my aircraft nose down in 1.9, but this same version worked in 1.8 just fine. Is there a fix? No, it should work just fine. You'll have to diagnose your particular installation: logs, screenshots... Quote Link to comment Share on other sites More sharing options...
Slysix Posted June 6, 2020 Share Posted June 6, 2020 Don't know if anyone has ran into this. But every time I engage autopilot (any mode) the thrust limiter on my Raipers go to zero. I've tested on different engine craft and only the Rapiers seem to zero the thrust limiter. If I change pitch, the thrust limit seem to go up momentarily but as soon as I reach steady fight where my pitch is no longer changing the limit goes back to zero. Quote Link to comment Share on other sites More sharing options...
delta wee Posted August 11, 2020 Share Posted August 11, 2020 On 5/5/2020 at 3:38 AM, Flibble said: To pick up on this old post, I have made a mod that extends kOS to allow it to control AA from script. Currently supported are: toggling mode (fbw, director, cruise), setting director vector, setting some cruise params. Note that the director is not mouse director, I've added a new kOS director to avoid the mouse interfering. Download (and code) here: https://github.com/RCrockford/kOS-AtmosphereAutopilot/releases Usage: You can access it with ADDONS:AA it has the following boolean suffixes: FBW, DIRECTOR, CRUISE, SPEEDCONTROL, PSEUDOFLC, scalar: SPEED, HEADING, ALTITUDE, VERTSPEED, and vector: DIRECTION e.g. set addons:aa:altitude to reqAltitude. set addons:aa:heading to reqHeading. set addons:aa:cruise to true. or set addons:aa:direction to heading(reqHeading, reqPitch):Vector. set addons:aa:director to true. Can you provide a sample script that cruises the plane to a specific altitude? I tried adding this to my script: set addons:aa:altitude to startingAltitude. set addons:aa:cruise to true. but it doesn't work for me. What am I missing? Quote Link to comment Share on other sites More sharing options...
Flibble Posted August 11, 2020 Share Posted August 11, 2020 That should be enough, what happens when you run the script? Also what does AA show when you open the control panel for cruise flight? Quote Link to comment Share on other sites More sharing options...
delta wee Posted August 11, 2020 Share Posted August 11, 2020 (edited) 9 hours ago, Flibble said: That should be enough, what happens when you run the script? Also what does AA show when you open the control panel for cruise flight? When I use the AA code in my script the flight controls don't move. Are we supposed to open the AA control panel in order for the scripted AA to work? edit: I figured out the problem, Atmosphere Autopilot does not engage when the plane is on the ground, so I had to just give it a slight increase in pitch for 2 seconds to get it in the air, then the AA took over and went to the altitude I wanted. Edited August 12, 2020 by delta wee Quote Link to comment Share on other sites More sharing options...
Flibble Posted August 12, 2020 Share Posted August 12, 2020 (edited) 11 hours ago, delta wee said: When I use the AA code in my script the flight controls don't move. Are we supposed to open the AA control panel in order for the scripted AA to work? edit: I figured out the problem, Atmosphere Autopilot does not engage when the plane is on the ground, so I had to just give it a slight increase in pitch for 2 seconds to get it in the air, then the AA took over and went to the altitude I wanted. Opening the panel is just for checking settings are working - it should work fine without. And yes, nothing happens on the ground, I have been caught by that - I use the kOS steering manager to get my plane off the ground then switch to AA once airborne. That is AA behaviour, not something specific to the kOS interface. Edited August 12, 2020 by Flibble Quote Link to comment Share on other sites More sharing options...
bebou Posted August 16, 2020 Share Posted August 16, 2020 Hello, Thank you for this amazing mod ! Working on 1.10.1 installed via CKAN Is there any way to automatically pause the game when "Waypoint is reached" is achieved ? Thank you, Quote Link to comment Share on other sites More sharing options...
Boris-Barboris Posted August 16, 2020 Author Share Posted August 16, 2020 1 hour ago, bebou said: Is there any way to automatically pause the game when "Waypoint is reached" is achieved ? no Quote Link to comment Share on other sites More sharing options...
bebou Posted August 16, 2020 Share Posted August 16, 2020 Thanks for your quick support Also is there a way to add another "master_switch_key" ? I would like to have "P" but also a button on my Joystick. Quote Autopilot_module_manager { master_switch_key = P window_x = 1 window_y = 40 } Regards Quote Link to comment Share on other sites More sharing options...
Boris-Barboris Posted August 16, 2020 Author Share Posted August 16, 2020 (edited) 43 minutes ago, bebou said: Thanks for your quick support Also is there a way to add another "master_switch_key" ? I would like to have "P" but also a button on my Joystick. Regards Unfortunately not simultaneously, but you probably can bind it to joystick. https://docs.unity3d.com/ScriptReference/KeyCode.html Try JoystickButtonX family of keys. You'll have to determine the button number in KSP's settings by assigning the desired button to some action, it should print the number there. Edited August 16, 2020 by Boris-Barboris Quote Link to comment Share on other sites More sharing options...
danielboro Posted August 17, 2020 Share Posted August 17, 2020 23 hours ago, bebou said: Hello, Thank you for this amazing mod ! Working on 1.10.1 installed via CKAN Is there any way to automatically pause the game when "Waypoint is reached" is achieved ? Thank you, If you have KAC you can set it to pause in X time and set it to ETA(-somting) to waypoint. Unless I het a mountain or something it usually works Quote Link to comment Share on other sites More sharing options...
Dman1791 Posted August 18, 2020 Share Posted August 18, 2020 Hey, love the mod! Just having a bit of an issue. I'm using both AA and AFBW on 1.9.1, but I can't seem to get my joystick to work with the fly-by-wire controller. Everything works as expected until I turn on SAS. Whether the AFBW AA compatibility option is on does not seem to make a difference. Any ideas on what the issue could be? Quote Link to comment Share on other sites More sharing options...
Gfurst Posted August 18, 2020 Share Posted August 18, 2020 Hello there, so I happen to use this mod quit a lot, but one thing I don't get is why these lateral drafts happen from time to time. Is this what coordinated turn is? Cause from what I learned a coordinated turn is just lightly pressing the yaw while pulling on the elevator so you don't drop altitude while turning. But eitherway, I do understand if this is part of that behavior, the weird part is that some times it will keep with a strong yaw even after leveling up or some plain strange situations. Quote Link to comment Share on other sites More sharing options...
Boris-Barboris Posted August 18, 2020 Author Share Posted August 18, 2020 (edited) 6 hours ago, Dman1791 said: Hey, love the mod! Just having a bit of an issue. I'm using both AA and AFBW on 1.9.1, but I can't seem to get my joystick to work with the fly-by-wire controller. Everything works as expected until I turn on SAS. Whether the AFBW AA compatibility option is on does not seem to make a difference. Any ideas on what the issue could be? If by SAS you mean stock SAS it's not supposed to work. Other than that I'm afraid i don't know. 6 hours ago, Gfurst said: Hello there, so I happen to use this mod quit a lot, but one thing I don't get is why these lateral drafts happen from time to time. Is this what coordinated turn is? Cause from what I learned a coordinated turn is just lightly pressing the yaw while pulling on the elevator so you don't drop altitude while turning. But eitherway, I do understand if this is part of that behavior, the weird part is that some times it will keep with a strong yaw even after leveling up or some plain strange situations. 1). Make sure you're not in a rocket mode (FBW's GUI). Make sure at least sideslip moderation is enabled (max sideslip, the controller needs it). 2). If using FAR, make sure flight assists are disabled. 3). Check control surface settings: tailfin should not be assigned to roll. 4). Check whether it's some kind of a parasitic input from one of your physical input devices. Tap yaw keys on keyboard to make sure they're not stuck pressed, disconnect everything that looks like a joystick. No, it's not supposed to work like that, coordinated turn only affects pitch. Edited August 18, 2020 by Boris-Barboris Quote Link to comment Share on other sites More sharing options...
Gfurst Posted August 18, 2020 Share Posted August 18, 2020 So no, 3) I'll have to double check, but I usually only assign the proper command surfaces, 4) I have external input for sure, 2) no far either, 1) will be an issue only if there is residual effect from me having clicked rocket mode accidentaly I'll try to get that weird behavior again and record it. As a side question, but is there any difference activating SAS while FBW is enabled? I'm sure is not the aim of the mod, but I found using FBW for vessels while outside the atmosphere, to be much smoother than stock SAS. Quote Link to comment Share on other sites More sharing options...
Boris-Barboris Posted August 18, 2020 Author Share Posted August 18, 2020 (edited) 28 minutes ago, Gfurst said: As a side question, but is there any difference activating SAS while FBW is enabled? I'm sure is not the aim of the mod, but I found using FBW for vessels while outside the atmosphere, to be much smoother than stock SAS. They don't play well with each other. Pick one. Yes, AA is much more rigid for manual attitude control, it accounts for RCS and gimbal precisely in space. It's problem is that it's not adaptive - towing/pushing and other multi-vessel shenanigans needs a stock SAS's PID. Edited August 18, 2020 by Boris-Barboris Quote Link to comment Share on other sites More sharing options...
Gfurst Posted August 19, 2020 Share Posted August 19, 2020 Ok, I took the craft to a sanbox save to test it out, gave it a spin and couldn't find the issue again, maybe it clicked then, does the mod save anything to the craft itself? Still I recorded it if you to waste some time watching a incredibly laggy footage https://a.uguu.se/rueokh.webm I'll keep an eye on it and try not to mess things up. On another question as the one above, if I cannot use SAS, is there a way to keep a steady orientation relative to a vessel direction, such as for example 10° pitch from prograde or retrograde, like something that would be useful for launch or controlled descent. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.