Space Engineers

Space Engineers

120 ratings
Expanse Flight Controls
3
   
Award
Favorite
Favorited
Unfavorite
Tags: autopilot
File Size
Posted
Updated
355.707 KB
24 Nov, 2021 @ 4:17pm
25 Mar, 2022 @ 7:13pm
16 Change Notes ( view )

Subscribe to download
Expanse Flight Controls

Description
Now capable of working on all worlds/servers. Setting adjustable in the Custom Data settings.

Designed for use on the Sigma Draconis Expanse server.
https://space-engineers.com/server/124568/

Description:
This is a flight controls script designed for use on the Draconis Expanse server to carry out certain common maneuvers such as the Flip and Burn, as well as act as a basic autopilot. Ships will have the vast majority of their thrust facing forward with the epstein drives. This script is intended use this forward thrust effectively, and make piloting expanse style ships easier and fun.


Features:
  • Flip and Burn to stop ship. This uses the forward facing epstein drives to bring the ship to a stop.
  • Flip the ship around 180 degrees.
  • Take the ship out of a gravity well using minimum thrust, and stop just outside of gravity
  • Deorbit a ship allowing gravity to pull the ship down and then brining the ship to a stop a certain distance above the surface.
  • Direct input GPS, calculates the distance and a simple ETA. After using the engage command, the script will engage autopilot and fly to the GPS
  • Multi point trips allows the user to put multiple GPS into the PB custom data, and plot a course. The multiple points are not stops, they are a course to take to a destination. Then after using the engage command, the script will engage autopilot and fly to the GPS sequentially.
  • Boost support, prevents the ship from coasting during trips, enabling them to make use of the Relative Top Speed mod boost feature.
  • Max burn can be set, which will determine the max percent thrust the forward facing epstein drives will be engaged by the script.
  • The script can display on the main control block screen, the programmable block screen, and an LCD with the script tag. You can set these in the custom data settings.
  • The script will avoid using forward facing RCS thrusters and only use epstein drives for forward thrust in order to save fuel.

Basic Commands:
  • Off: Stop program, disable all overrides, reset dampners to initial state
  • Tune: Does a small rotation to tune ship rotation damping. Prevents overshooting when during rotations. [DO THIS FIRST]
  • Stop: Flip and burn to stop
  • Flip: Flip ship 180 degrees
  • GPS: Enter a full GPS and get distance, use "Engage" to proceed to GPS
  • Engage: Proceed to GPS, ship will first come to a stop, then fly to the GPS and stop
  • Cancel: Stop trip, does not remove destination


How to use this:
  1. Put the ScriptTag ("[EFC]" by default) in the name of the control block/cockpit and optionally in the name of an LCD.
  2. Add the script to the programmable block.
  3. Set the settings in custom data to your preferences. Make sure to run the script after to make sure it pulls the new settings.
  4. If not on the Sigma Draconis Expanse Server, go into custom data and set Sigma_Draconis_Expanse_Server to false.
  5. Use the Tune command to tune the rotation the script uses (also do this if the ship has large weight changes).
  6. Recompile the script if you change the control block, LCD, Gyros, or any of the forward thrust.

It is recommended to at least put the "off" command on the hot bar for easy access.


Custom Data Settings:
    In custom data you can adjust the settings of the script. Make sure to run the program once to pull the new settings in.
  • The Script_Tag is the text you need to add to the control block and optionally and LCD. You can change this to whatever you want.
  • Deorbit_Buffer is the distance above the ground you want the ship to be stopped at when using the Deorbit command. The script accounts for stopping distance.
  • GPS_Buffer is the distance from a destination GPS point a you want the ship to be stopped at when using the auto pilot. The script accounts for stopping distance.
  • Max_Burn is the max percentage of thrust the script is allowed to use for the forward facing Epstein drives.
  • Max_Speed is the maximum speed in m/s the script is allowed to use for autopilot. This will automatically update when changing between high and low speed zones
  • Use_Controller_Screen enables or disables the script displaying to the primary control screen of the control block (Cockpit)
  • Use_PB_Screen, enables or disables the script displaying to the screen on the programmable block
  • Use_Boost, For autopilot, when off the thrust is shut off and the ship is allowed to coast at top speed. When on, the ship will use constant thrust in order to take advantage of the Relative Top Speed mod boost feature
  • Display_Gas_Levels, enables or disables hydrogen and oxygen gas levels being displayed.
  • Trip GPS Points, Place a sequence of GPS points after this line, and use the plot command to set a course, then the engage command to start autopilot and follow that course.

Full Commands List:
  • Off: Stop program, disable all overrides, reset dampners to initial state
  • Tune: Does a small rotation to tune ship rotation damping. Prevents overshooting when during rotations. [DO THIS FIRST]
  • Dampreset: Resets rotation damping to 1
  • Stop: Flip and burn to stop
  • Flip: Flip ship 180 degrees
  • Flip2: Flip ship 180 degrees, disable forward RCS thrust, and enable main drives
  • Retrograde: Point the front of the ship in the opposite direction of current velocity (good for preparing to stop)
  • Prograde: Point the front of the ship in the direction of current velocity (good for preparing to increase speed without changing direction)
  • Orbit: When in planet gravity, this will fly to outside gravity then flip and burn to stop.
  • Deorbit: When flying down a gravity well, this will flip and burn stopping above the ground and hovering (WARNING: Deorbit maneuver uses FULL thrust despite max burn settings)
  • GPS: Enter a full GPS and get distance, use "Engage" to proceed to GPS
  • Add GPS: Use the keyword "Add" along with a GPS to add multiple GPS one at a time via the argument line (In Beta testing)
  • Plot: After putting your GPS markers into the custom data "Trip GPS Points" section, use the plot command to calculate distance and prepare the ship for the trip
  • Engage: Proceed to GPS, ship will first come to a stop, then fly to the GPS and stop
  • Cancel: Stop trip, does not remove destination
  • Boost: Toggle on/off using boost for entire trips to a specified GPS (Use thrust the entire trip to gain boost speed)
  • Boost On: Turn on using boost for entire trips to a specified GPS (Use thrust the entire trip to gain boost speed)
  • Boost Off: Turn off using boost for entire trips to a specified GPS (Coast once max cruise speed has been reached)
  • Set Damp #: Allows manual entry of the rotation damping (must be between 0 and 1)
  • Set Speed: Override your ships cruising speed. When your ship reaches this speed on a trip, it will begin coasting to the destination.
  • Set Burn: Max burn allowed, script will not burn higher than this percent
  • Set Thrust #: Thrust override for epstein drives. Make setting thrust override just a little easier.
  • Mass: Display the ships physical mass in the programmable block console (mass used by physics engine, includes cargo and cargo multiplier)
  • Setting Reset: Reset all settings in Custom Data to defaults (a recompile will not do this)
  • Gas: Toggle displaying gas levels to all displays

If you have comments or find any bugs, please let me know.
Popular Discussions View All (4)
1
12 Dec, 2023 @ 9:14am
Entering a full GPS?
ravennst
3
21 Dec, 2021 @ 12:27pm
Speed resetting in custom settings
Leia_furbix
1
22 Jan, 2022 @ 4:54pm
Standard or evasive maneuvers
Leia_furbix
111 Comments
Syntec 12 Jul @ 6:47pm 
I can't for the life of me get this to work well, its always slamming my ships into gps coordinates, deorbit just crashes into the surface :( everything seems to be just a bit off for me
Reign 27 May @ 2:05am 
Hi there, you did a great job. I'm looking to see if you could add a chat command function for inputting gps coordinates. Hunting down the programmable block every time to enter a waypoint is a bit tedious. I've tried to make it easy with a simple unique character in the terminal search, but it's just not so immersive. Resetting a button isn't so bad, but not the best. Let me know what you think - There should be a way with grid name - this would likely need to be a mod, instead of a script.
Assassino2933 6 Feb @ 1:56am 
Is there a version of this that doesn't require an epstien drive? So i can use it outside of the expanse server/mod. I love the vector indicators and also the flip and burn. Thanks!
ravennst 6 Nov, 2023 @ 6:03am 
Is there a way to exclude specific gyros being affected by the script? I have a gyro that uses an override for drilling and the script completely overwrites those settings.
Cobra Commander 14 Aug, 2023 @ 5:10pm 
Where do you put the commands you keep referring to ? How ? You don't explain any of this. Do you add the control block to the hotbar ? The Drive ? The Cockpit ? How do you actuate commands like Tune, etc ?
DracoNB 3 Aug, 2023 @ 8:57am 
With updates to the server and zones, the custom data is wrong in many places trying to do 2000 in 350 zones causing your drives to light you up like a christmas tree after zone transfers. Can we get an update for the zones?
⎝⧹Greedynuf⧸⎠ 25 Jul, 2023 @ 8:44pm 
this should work without the mod
z64555 2 Jul, 2023 @ 11:41pm 
Any chance that the PBScreenNumber and ControllScreenNumber settings can be changed with custom data? I think these two are important for users who don't want to (or can't) dig through the code to change them directly.

great script, btw.
EneCtin 1 Jun, 2023 @ 11:59pm 
Forgot... add a flip and burn to approach speed (something like 100m/s). Most of the times you want to shed excess speed but continue on that general vector for the approach.

Great script, by the way
EneCtin 1 Jun, 2023 @ 11:56pm 
Can you add a estimated travel distance until flip and burn to zero? And of just burn to zero ? It varies with mass of the ship, but I never know when to slow down at right the opportune moment
Add it to the info displayed, pls.

Also, maybe a warning: "Ship mass changed by more than 10% since last computation"