Space Engineers

Space Engineers

75 ratings
SAS
   
Award
Favorite
Favorited
Unfavorite
Tags: autopilot
File Size
Posted
Updated
72.512 KB
Nov 16, 2022 @ 11:38pm
Nov 21, 2023 @ 8:01am
2 Change Notes ( view )

Subscribe to download
SAS

Description
==== SAS ====
Stability Assist System
orbital tools

Author: DFPercush
Source code: github.com/DFPercush/SE-SAS
Feed the programmer: ko-fi.com/DFPercush

Setup:
If you want to use a cockpit besides the main one as the reference,
set 'DefaultControlBlock' below. Or use the 'control' command to set.
Make sure your craft has some gyros, power, and enable forward/back
thrusters for station keeping. That's about it.

Update: While locked to any direction, you can still give roll commands
by using Q and E from the active cockpit or control block. This may
only work from that one cockpit.

Commands:

off / stop: Halt program and turn off gyro overrides.

pro / prograde: The direction your ship is moving. Forward.

retro / retrograde: Facing backwards along your direction of movement.

norm / normal: Perpendicular to the plane of your orbit.
If you are moving east, normal would be north.

anti / antinormal: Opposite normal. If moving east, antinormal is south.

out: Radial out. Facing perpendicular to your orbit but
in the same plane. Basically, away from the planet.

in: Radial in. Towards the ground.

disp: Display debugging information.

keep: Maintains a certain min and max altitude.
(no args) Toggle on/off. Maintain the current orbit.
[number] Maintain a circular orbit of [number] height,
in meters, from the center of the planet.
[max] [min] Maintain an orbit of apogee [max] and perigee [min].
on|off|toggle Enable or disable this mode.

control [block] Sets the active cockpit, remote control, or ship controller.
Popular Discussions View All (1)
0
Nov 23, 2023 @ 6:59pm
question on propustion settings
dragontuar
43 Comments
REALRACE Jul 18 @ 10:10pm 
with GravityFalloff "2', i find planets using https://steamcommunity.com/sharedfiles/filedetails/?id=3292258808 ... this would be "pp" in this script, iirc
RepziAnon Feb 27 @ 9:24pm 
When setting up the control block properly, I have no issue with prograde or retrograde. I think it's no fault of the script and the way the script calculates how to hold in, out, normal and antinormal is due to the fault in space engineers planet info that real orbits adjusted, due to the decreased gravity drop off. With other mods I am using like HUD Compass the cut off to which the script recognizes the planet is the same as the compass in that mod, similar to the altitude meter on the HUD. Still not too sure what the fix is, as everything I'm saying is just from experience and I have no experience coding or creating scripts. But, I imagine it as something to do with changing the data of planets themselves, maybe something Real Orbits could fix.
Caffeinix Jan 21 @ 3:59pm 
Update: if I comment out the call to cockpit.TryGetPlanetPosition and just execute the "if (planetPresent)" block unconditionally, it works (at least for holding prograde), although the displayed orbital elements are quite wrong. I did use the control argument to point the script at the main cockpit, which is a large grid control seat.
Caffeinix Jan 21 @ 3:52pm 
I'm also trying to use this with Real Orbits, but it says "No planet." despite there very much definitely being a planet. Hoping there might be something I can do to fix that!
RepziAnon Jan 9 @ 6:48pm 
I'm using this with Real Orbits and it is working well, except for the fact that when I get too far from the planet, not enough to leave the gravity, I loose the ability to use radials, normal and antinormal because it says I am not within gravity. I think the gravity is tied to the cutoff for the HUD altitude display and this is kept vanilla, where as the gravity well now extends far beyond that because of the decreased fall off using Real Orbits. Any Suggestions?
DFPercush  [author] Nov 21, 2023 @ 8:11am 
@BingBong sorry for the late reply, but the commands go in the "argument" box when you select the programmable block from the K menu. It's right next to the "Run" button. Or, if you bind the program's "Run" to the G menu, you can type arguments there as well.
BingBong Jul 28, 2023 @ 1:07am 
How do use these commands? just type /retro in the chat?

im not even getting the "No ship control block found error lol
manji51 May 3, 2023 @ 8:21am 
It worked... I'm not sure if I overlooked it or somethin' but still thanks friend!
DFPercush  [author] May 3, 2023 @ 7:19am 
At the top of the script, where it says
// ==== CONFIG ====
// This is probably the only thing you'll need to change
const string ControlBlock = "Fighter Cockpit";
... change "Fighter Cockpit" to "ControlBlock", or "Control Seat" or whatever the block is named.
manji51 Apr 30, 2023 @ 3:30pm 
Error: No ship control block found.
>glances at control seat named "ControlBlock"
I feel like somethings amiss with this script, I'm not sure how to fix this
I would LOVE to have a button I can press to flip me around to retrograde while in combat if this can get fixed/someone can provide a fix