Jump to content

[1.8.0-1.12.5] AtmosphereAutopilot 1.6.1


Boris-Barboris

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 3 weeks later...
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.

Link to comment
Share on other sites

  • 2 weeks later...
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...

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 months later...
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?

Link to comment
Share on other sites

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 by delta wee
Link to comment
Share on other sites

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 by Flibble
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 by Boris-Barboris
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

screenshot-2020-08-17-20-51-51.jpg

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.

Link to comment
Share on other sites

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 by Boris-Barboris
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by Boris-Barboris
Link to comment
Share on other sites

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.

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