Space Engineers

Space Engineers

636 ratings
Orbital Autopilot and Map
3
3
   
Award
Favorite
Favorited
Unfavorite
Tags: autopilot
File Size
Posted
Updated
407.058 KB
2 Jun, 2018 @ 3:41pm
23 Sep, 2021 @ 2:40pm
7 Change Notes ( view )

Subscribe to download
Orbital Autopilot and Map

Description
This script allows you to keep a ship in orbit around a planet and render an orbital map.

Instructions:

You ship will need a few components for this script to do its job.
The most important is a ship controller. This can be either a remote control or a cockpit. It must be named "OrbitController" for the script to find it. This block will define the orientation of the ship when orbiting a planet with the autopilot. The Up side of this block will point away from the planet, and the Front side will point forward.

The autopilot can be activated with the argument "toggleAutopilot". When activated it will attempt to allign the ship with the target orbit and then accelerate to the required orbital velocity. In order for the autopilot to work your ship will need a gyroscope and 1 thruster in each direction.

To select an orbit you can run the script with the arguments "forward", to generate an orbit based on your current direction, or "input", to generate an orbit based on the input variables. There are a lot of things you can change in the input section of the script, so I suggest you take a look at that.

The orbital map can be rendered by adding an lcd panel named "OrbitDisplay". This will display the planet (grey), the ship (green), the target orbit (light blue) and the current trajectory (magenta). If you add waypoints to the ship controller (if it is a remote control), these will be also be displayed (blue).

Extra stats and error messages can be displayed on an lcd panel by naming it "OrbitStats".


A Speed mod is highly recommended for autopilot functionality.
I suggest one of these:
https://sp.zhabite.com/sharedfiles/filedetails/?id=380168871
or this one:
https://sp.zhabite.com/sharedfiles/filedetails/?id=599536562
392 Comments
ELLIOTTCABLE on Discord 15 Jan @ 9:43am 
Could you make a repo for this on GitHub? I'd love to contribute back, and opening up the source makes that nice and easy. 🥰
ELLIOTTCABLE on Discord 14 Jan @ 2:16pm 
Check out this person's scripting-function (no mod); it provides a more reliable, drop-in way to find the planet that functions regardless of changed gravity-falloff or other mods:

https://sp.zhabite.com/sharedfiles/filedetails/?id=3292258808
AvopeasHUN 4 Jan @ 12:49pm 
Can i somehow set the periasis and apoasis? Thrusters contiunously fireing to hold altitude on an eccentric orbit what isnt good.
Demon117 29 Dec, 2024 @ 6:06am 
Does this work with stations?
Liutos 11 Nov, 2024 @ 10:52am 
How do we add this to a LCD inside a cockpit ?
Darian Stephens 17 Oct, 2024 @ 7:11pm 
Does this support LCDs built in blocks, like the ones in a cockpit?
SeasonedTrash 9 Oct, 2024 @ 9:45am 
@thecodeking91 You're probably not in a planets actual gravity field (where your alt. is displayed and you can't jump), I think Real Orbits changes the gravity falloff, as in how far you are actually affected by nat. gravity, but not the size of the gravity field itself (if that makes sense). I think that's why the dev made the Real Orbits ready solar system(s).
thecodeking91 7 Oct, 2024 @ 6:18pm 
I am trying to use this script with the Real Orbits mod. It is telling me to enter a planet's sphere of influence, although the game's HUD shows that I am being affected by 0.34 Gs of natural gravity. Is there any way to fix this?
Renener  [author] 26 Aug, 2024 @ 12:23pm 
Cool, glad it's still useful after all this time :)
Kirito 20 Aug, 2024 @ 6:26am 
Thank you for the wonderful script Renener. This makes playing with Real Orbits so easier as I no longer needing to remote control my rockets to a stable orbit for building a comm sat network (^_^)b