Space Engineers

Space Engineers

AutoPilotAerodynamic
55 Comments
Scopsins 1 Jun @ 3:06pm 
You're a legend man. I though this would never work again!
DFPercush  [author] 17 May @ 7:11pm 
Sorry for the delay everyone. I think I fixed the error that was causing it to not compile. I blame Keen for this one. Not trying to be hateful, just saying, StringBuilder is an intrinsic class of the .net runtime and yet somehow through various game updates it's broken. Anyway, it should be working like normal again.

@Teeege - Try setting the "ForceCockpit" variable in the config to your main control block, and check if you have any remote control blocks or other flight controllers facing the wrong way.

@Andywht - No, there's no way for the script to know the altitude of Water Mod's sea level, unfortunately. It's always going to be off. I'll consider putting a constant offset into the config.

@dga8705 - I think what Kana did was set the absolute limit on roll and pitch to 0 and left it to only control the yaw. Look for === AUTOPILOT LIMITS === . The reason it might be rolling is to correct any sideslip. If you're moving very slowly, any sideways motion will make it roll hard.
Our Bowl and Saviour. 13 May @ 5:22am 
tried in a fresh world, something is broken with the script
Our Bowl and Saviour. 13 May @ 5:05am 
i have the same issue as gachd
gachd 9 May @ 11:57am 
The script auto-detects your grid's setup, right (thrust, gyros, cockpit, etc)? I'm unable to get this to work on the Ares at War scenario. The run commands don't do anything, and eventually the programmable block starts displaying "Assembly not found. Please compile script"
Teeege 8 Nov, 2024 @ 10:30am 
Issue where i activate auto pilot with no arguement and my nose gets pointed BELOW the horizon line and thrusters do not maintain my speed, they dont even thrust forward (at 0m/s 100m/s and 250m/s) no matter what speed i try it at speed is not maintained altitude is not maintained..?
andywht 22 May, 2024 @ 10:52am 
Great Script! Question: when I change to sea altitude it shows the value of -7209 and watermod is showing altitude above water as 17m. Is there a way to set the script altitude to correspond with watermod altitude? Thank you!
White_Knight72 27 Mar, 2024 @ 9:46am 
I'm looking for a tutorial on How to successfully set this up so that a plane can use it. I've been playing around trying to get it to work right, but apparently I'm not smart enough to get it to control the plane correctly.
糖酱今天又在摆烂 26 May, 2023 @ 7:30pm 
I'm also getting the exact same TypeError message saying that some Property is not of Type Single
It is Roll when I use modded cockpit & gyro (Consty's pack), and Yaw when using vanilla blocks

running with no argument overrides the gyro without doing anything (much like cruise mode), and it throttles away without changing direction when try to land

It seems thruster override is okay but is unable to control gyro
ADeadMansSpaceSuit 22 May, 2023 @ 3:14pm 
any idea what this is latest update may of broke something


Property Pitch is not of type Single, correct type is Boolean at Sandbox.ModAPI.Interfaces.TerminalPropertyExtensions.Cast[TValue](ITerminalProperty property)
at Sandbox.ModAPI.Interfaces.TerminalPropertyExtensions.SetValue[T](IMyTerminalBlock block, String propertyId, T value)
at Program.æ(IMyGyro Q, Double Í)
at Program.nj()
at Program.Main(String ŋ, UpdateType Ŋ)
Property Pitch is not of type Single, correct type is Boolean at Sandbox.ModAPI.Interfaces.TerminalPropertyExtensions.Cast[TValue](ITerminalProperty property)
at Sandbox.ModAPI.Interfaces.TerminalPropertyExtensions.SetValue[T](IMyTerminalBlock block, String propertyId, T value)
at Program.æ(IMyGyro Q, Double Í)
at Program.nj()
at Program.Main(String ŋ, UpdateType Ŋ)
Captainatom931 4 Apr, 2023 @ 2:21pm 
For some reason my plane is landing backwards, despite everything facing the right direction and everything else working fine - any ideas as to why?
dga8705 19 Mar, 2023 @ 6:42am 
So, I know this is meant for planes, but based on watching Kanajashi's series it can be used on boats too, right? I got it working on one smaller ship, but when I try it on my current ship with water mod, it just wants to roll it to the side as soon as I just hit run with default argument. I got it to recognize the cockpit, which it was also having issues with. Any suggestions on what I the issue might be or what I need to adjust? I have plenty of gyros, and everything is in the same orientation. Otherwise I love the possibilities of this mod.
Kurblee 20 Feb, 2023 @ 10:57am 
an inclination of 0° means the orbiting body orbits the planet in its equatorial plane, in the same direction as the planet rotates;
an inclination greater than 0° and less than 90° is a prograde orbit.
an inclination greater than 90° and less than 180° is a retrograde orbit.
an inclination of exactly 90° is a polar orbit, in which the spacecraft passes over the north and south poles of the planet; and
an inclination of exactly 180° is a retrograde equatorial orbit."
Kurblee 20 Feb, 2023 @ 10:57am 
Super script, thank you. Also SAS Script. Must have for Real Orbit Worlds.
I would like to have a request for implementing Inclination handling.
"he inclination of orbits of natural or artificial satellites is measured relative to the equatorial plane of the body they orbit if they do so close enough. The equatorial plane is the plane perpendicular to the axis of rotation of the central body.


Inclination Hold. Holds current inclination.
Inclination xx turning to xx inclination. I kindly ask you to implement these functions if you have time and motivation, also, if not too big hussle.
DFPercush  [author] 17 Feb, 2023 @ 6:28am 
@Martin Try copying and pasting the code into a text editor, search and replace (whole word) "Update1" --> "Update10" and change the config setting "UpdatesPerSecond" to 6 instead of 60. Let me know how that works for you, and I might add a more convenient setting for slow mode or something. It's just hard to test whether it's going to work on every server. I didn't think the CPU usage was that bad, but I guess it can use a lot of bandwidth sending updates to all the gyros and stuff over the network. You can also try killing the display or reducing the amount of information shown, that has to spend some time doing string searches and substitutions which could possibly be triggering the garbage collector.
martin.andreev92 16 Feb, 2023 @ 7:59am 
Hi, really like the script, works super well on SP, but is there a way to slow it down, so it can be used in dedicated servers as well? As most servers have a limit for operations per ms, that a program can run, and this scrips is being disabled after a few seconds of use.
DFPercush  [author] 14 Jan, 2023 @ 9:42am 
@Blackie Thanks for reporting, should be fixed now.
Blackie 11 Jan, 2023 @ 11:52pm 
hello im not sure if this is a bug with game or the script but what it does is switching between auto and manual mod with use of any argument after either adding it onto new program block or even onto existing ones and rewriting changed settings back to default existing ones that i have in world do work fine but any new ones don't any idea what could be the issue? not using modded cockpit
DFPercush  [author] 7 Jan, 2023 @ 10:40pm 
Cruise control update - use argument "cruise" to control only speed.
Blackie 7 Jan, 2023 @ 6:42am 
no i dint use modded cockpit i think the problem with the landing and such was the plane being too heavy cuz i used heavy blocks changed it back to light and script does work fine landing does too
DFPercush  [author] 7 Jan, 2023 @ 4:10am 
@Blackie sometimes it can act weird if you don't give it enough distance on the approach. Try targeting a landing spot that's 1-2 km away in a flat area. If it's an ILS problem then that script should say "setup not complete" or something to that effect. Are you using a modded cockpit, by any chance?
NineSevenFive 1 Jan, 2023 @ 2:52pm 
@Blackie I might have a solution for that, I was having similar issues where the plane wouldn't level out during flight, if you have any pistons, hinges & rotors try turning the inertia tensors off for those blocks and then try running the scripts, as for the landing problem I'm not fully sure
Blackie 31 Dec, 2022 @ 2:36pm 
idk if im doing something wrong or the game is just being weird but i just cant get the auto lading to work what so ever ILS isnt working for me at all plane doesn't land target lading lading did work once out of 10+ attempts and before anyone asks if i did try to change setting yes i did it did not help sometimes even classic flying didn't work plane was turning from one side to other to 90 degrees sideways or doing 360 in the air
Rusted Droid 25 Dec, 2022 @ 6:11am 
What about V-tol aircraft?
a soggy croissant 16 Sep, 2022 @ 11:35pm 
Is there anyway to adjust the sea level on a planet? When I use the sea altitude mode the plane it thinks that sea level is some 2km above the surface
Freeze 30 Aug, 2022 @ 11:31pm 
how far off are you from releasing the automatic artillery script? I love seeing your work, in kanajashi's video series'
MadelynPlays 27 Jul, 2022 @ 9:51am 
Thank you so much! That's exactly what I needed to make it work. Again, amazing script and i'm absolutely loving the work you've put into this!
DFPercush  [author] 27 Jul, 2022 @ 6:49am 
@MadelynPlays If you run it without any arguments, it will set the values to what the craft is currently doing, so you can set heading that way, and then spd/alt. Just make sure your max elevator angle isn't going to strike the tail on the ground. Auto take off wasn't really a planned feature but I think you can work around it like that.

@Khazul and @PanzerScorpionT I'll put your suggestions on the list. Been away for a while but I'll see what I can do.
MadelynPlays 20 Jul, 2022 @ 2:33pm 
Firstly, I absolutely love this script. It's amazing work, really.

I do have a possibly dumb question about it however. After looking at the in-script documentation I can't find a way to engage the autopilot for the first time using whatever heading i'm currently facing. The result is that I either manually run a command using my exact heading (eg: 287,2000,60) or I wobble all over manually dialing in the heading, then the altitude and then the speed.

I'm looking for some way to basically use the [hdg] tag from the LCD's but in an argument passed to the programmable block. (eg: [hdg], 2000, 60) My goal is to make takeoff's a single press affair.

Any light you can shed for me would be most appreciated. Thank you, and again fantastic work!
DogwaterGaming69 19 Jul, 2022 @ 6:25pm 
MAN YOU ADDED THE WAYPOINT SYSTEM IN THE END!!!!! (your epic and based)
dahm this script be bussin'
Khazul 23 Jun, 2022 @ 7:32am 
Greta script :)

Could I suggest an alternative setup?

Tag two blocks on the center line with [Runway Start] and [Runway End]. For eg, I could tag a couple of runway light blocks and use the locations of those directly.
Capt. Sunrise 16 May, 2022 @ 5:35am 
Is there a way for the autopilot control only the speed, while you're able to maintain the pitch, rolle, heading, altitude etc. Basically an autothrottle?
DFPercush  [author] 13 Apr, 2022 @ 6:32pm 
@gachd The // at the beginning of the line means that's not part of the code. Just replace everything between { and } ... with the name of your display block in quotes.

If it's having trouble establishing a glide slope on the landing, you might want to increase the LandingFinalApproachDistance, to give it more time to settle. There is also a change note about the landing speed about 3 weeks ago.
gachd 29 Mar, 2022 @ 6:04pm 
Alright I'm a total idiot but I cannot for the life of me figure out what I have to name a display for it to show the data. Please help. Which part of the below allows me to a) assign a display to be read by the script or b) change the name that the script looks for? I'm not using a fighter cockpit, though I'm trying to display some data on a text panel or other LCD. I know it's written right here in front of me but I don't know what's code and what's characters to leave behind.

// List of blocks to use for display.
// Block's Custom Data controls what is shown. See below.
string[] Displays =
{
"Fighter Cockpit",
//"LCD Panel"
};
gachd 27 Mar, 2022 @ 9:39pm 
@Attahk, what did you do to your max final speed? up or down? I'm having a similar issue. My cargo plane comes in heavy, but very high, and then it dips down way too low and stalls, missing (or crashing) into or under the runway (my base is in the middle of the ocean)
Tanis 26 Mar, 2022 @ 6:33am 
Love the concept of this! Any chance to display the info in the programming block or cockpit screens instead of an LCD? Great job!!
Leo 23 Mar, 2022 @ 3:34am 
Really enjoying this script!
I agree that one should be able to start the script without having to control a cockpit or remote block on the same grid.
I already have single thrust, winged UAV's that can auto take off and do task's at the press of a button. Having them be able to manage their own landing task initiation would be pretty sweet for my automation chain.
Attahk 18 Mar, 2022 @ 12:05pm 
So it turns out that the speed settings were the issue, after adjusting the MaxFinalSpeed a bunch I've got it landing perfectly!
Attahk 18 Mar, 2022 @ 9:30am 
Also, I've changed the landing altitude setting from 5.0 to .5 with the same results
Attahk 18 Mar, 2022 @ 9:23am 
Phenomenal script! Except I can't seem to get it to land correctly. It always comes in way high, about 500m off surface, rather than low, for some reason. Continuing to test, I'll add that I do not have the camera panning mod and instead used two separate cameras aimed straight down. Everything else works perfectly!
gachd 16 Mar, 2022 @ 6:00pm 
Is there a guide for this by chance? I'm loving this but there's SO MUCH to it, I'm having trouble getting all the value
delsonbb 8 Mar, 2022 @ 4:59pm 
Nice
DFPercush  [author] 8 Mar, 2022 @ 12:19pm 
I use Plane Parts by Takeshi to test it, but as far as I know, it will work with anything that lets you build fixed wing aircraft.
Siv 7 Mar, 2022 @ 8:37pm 
I love it.
delsonbb 6 Mar, 2022 @ 11:04pm 
Can this work with Digi's Aerodynamic Wing blocks?
DraygoKorvan 10 Feb, 2022 @ 8:08pm 
Subscribed :)
Klime 10 Feb, 2022 @ 1:49pm 
This is awesome
DogwaterGaming69 30 Jan, 2022 @ 12:15am 
yeah found out about that little temporary workaround.. really awesome work man!!
DFPercush  [author] 29 Jan, 2022 @ 11:52pm 
Oh btw a hack you can do in the mean time is get in the cockpit, start the script, and then hop out. As long as it continues to run it should remember the cockpit.
DFPercush  [author] 29 Jan, 2022 @ 11:49pm 
Thanks for the praise! Glad people like it. I'm considering options to make it unmanned. There has to be either a cockpit or a remote control block, but right now it's checking whether one of them is under control by a player. I'll probably just check if they're all facing the same way in the next version.