Space Engineers

Space Engineers

Not enough ratings
Autopilot (Deprecated)
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
4.636 KB
9 Jan, 2015 @ 1:06am
1 Change Note ( view )

Subscribe to download
Autopilot (Deprecated)

Description
DEPRECATED by in-game Remote Control block. Believe it or not, there was a time before that block could do autopilot.

/**
* Autopilot
* Author: Extramrdo
* Contributor: Wheatley
*
* Setup:
* 1 Gyroscope facing forward, named "GYROInit", with all overrides set to 0. Override on or off, don't matter.
* the GPS setup:
* 1 block named "GPS Center"
* 1 block named "GPS Top" atop center
* 1 block named "GPS Left" directly to left of Center
* These directions are all according to intended dir of travel.
* 1 block named "GPSNav:", anywhere. Needs not be beacon, but you may wanna see that in realtime *shrug*
* 1 block named "CRD (123,123,123)". Replace the 123 with whatever XYZ coordinate you want.
* The parentheses are not optional, the space is.
* 1 or more thrusters, facing the rear of the vehicle, named "FWDGO".
*
* OPTIONAL:
* if you've got a soundblock you want to play, name it "OnArrive"
* 1 block named "Out"; a condensed version of the stats will be printed to it.
* 1 block named "T-"; an estimated time of arrival based on approximate max speed will be printed to it.
* TODO: actually calculate current speed, base it on that.
* TODO when not so sleepy and not 4AM: Uncomment the relevant line or something. Like, it's a IMyTerminalBlock timeblock = BlockNamed("T-");if(timeblock!=null) timeblock.SetCustomName("T-"+timestr);
*
*
* Operation:
*
* Get a timer to play this script like, every second. The faster the better.
* Set GYRO to Override On, and the Autopilot'll take care of steering and flying.
* Set CRD's coordinates to wherever you'd like to go; if you change them midflight, it will still work.
* If you're about to hit an asteroid, or you just wanna steer a bit, turn the GYRO to Override Off, and the autopilot will let off the gas AND give you back control. When you're done avoiding that asteroid, just GYRO to Override On again and the autopilot will pick up where you left off.
*
*
*/
55 Comments
Rusted Droid 11 May, 2021 @ 7:58pm 
@extramrdo Vanilla Remote is very cheap for not overrun CPU. Really bad idea if you have device that is forced to go on line/track.
Remote control block try to spin train when in precision mode. Without that mode it will skip waypoint like 5m away so forget about U turn tracks it will skip and rotate train and explodes.

So yeah, it is good for spaceships but not for cart on magnetic rail from Maglev Rail mod.
Extramrdo  [author] 11 May, 2021 @ 5:58pm 
And this works better? I'm surprised and a little saddened.
Rusted Droid 11 May, 2021 @ 10:16am 
Remote control block is not good for rail based devices. have big problems if you use Maglev rails mod and try to automate it like metro.
Extramrdo  [author] 6 Feb, 2016 @ 8:47pm 
To be honest, you're better off using the remote control block.
Mitch-Mash 6 Feb, 2016 @ 1:09pm 
could u use it on planets
Dr. Cockter 23 Mar, 2015 @ 9:38pm 
how in bloody hell do you calculate pitch/yaw/roll? I cant seem to do that D':
☠†Shade†☠ 4 Mar, 2015 @ 11:23am 
well i have tried your script again, as it was the best one I have found, but it still is not working, I used to use it all the time, now when I turn it on, my timer block starts, and the shipp just laughs at me, is it the update that breoke it?
Extramrdo  [author] 5 Feb, 2015 @ 10:48pm 
It's a good question and a good problem, and I'm sorry this isn't your solution.
Draven_Stone 5 Feb, 2015 @ 7:09pm 
k, just thought i ask
Extramrdo  [author] 5 Feb, 2015 @ 2:03pm 
You cannot, not as it is now. If you put the connector on the "front" of the ship (as far as this script cares, at least) and tell it to fly to a coordinate like, 1km away from the connector out in a straight line, then fly to the connector, you can get it to be probably facing the two connectors together. You'd need to fiddle around with the coordinates you set, and so on, but that's the only solution I can think of without a major overhaul.