Space Engineers

Space Engineers

Not enough ratings
O.I.S. Orbital Flight Computer
By Elfi Wolfe
O.I.S. Orbital Flight Computer.
This is the guide on how to set up, install and operate orbital flight computer.
   
Award
Favorite
Favorited
Unfavorite
Basic

This is a guide (in progress) on how to use the orbital flight computer
The video above is a Witchcraft Drive Core lifting itself using a orbital flight computer.
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1139180306

Core is a engine and engine room with push button controls.

Script at
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1126327781

Another Guide
Set Up
Added arguements into custom data of the programing block. One argument per line
Load script from workshop into block, compile and save.

Program will load arguments from custom data, then from storage and start running based on those arguments.

To change operations, you can run argument on the PB, have a timer block call the PB with argument , or have a g-menu call the PB with argument

LCDName default is [ShipStatus]

Example Customdata of the PB:
info
orbitalStatusLCDName [OrbitalStatus]
LCD
Default tag
[ShipStatus]

Old System: (still works)
To add a LCD or TextPanel just add the [tag] to the name of the LCD or TextPanel.

New system:
In CustomData of the LCD, TextPanel, CockPits.
use one of the following 2 ways

;[tag] 0
---

or

---
//[tag] 0

Where the number is the Text surface to use.
tag is the phase set. default is ShipStatus
Blocks with one text surface use 0
Where ask multi text surfaces start with the first item in list at 0
Arguments

Ship Modes: (this sets the orbital mode)
orbitaloff
turns off the orbital mode. Program still runs but does nothing. Autolevel will still work.
info
turns off the orbital mode. Displays current lift, thrust, and how far down in a gravity well you can go. Autolevel will still work.
gravity
turns on the gravity mode. Program will move to desired gravity.
altitude
turns on the sea level altitude mode. Program will move to desired altitude.
hover
turns on the hover above terrain, or objects if there is a camera on underside.

Dampener Mode: (this set the dampener mode)
shipoff
turns off dampener mode.
dampener
turns on dampener mode.
shipdirection
turns on dampener mode with speed based on ship direction.
velocitydirection
turns on dampener mode with speed based on velocity direction

Autolevel:
autolevelon
turns on autolevel
autolevel
toggle between on and off
autolevelgyro #
sets the number of gyro used by autolevel
rocketGyro bool
true sets rear of ship controller downward
false sets bottom of ship controller downward

LCD:
orbitalStatusLCDName name
sets the name used to find LCD
rebuildlcd
empties and rebuilds the LCD list.

gravDrive:
gravdriveon
program will try to use gravity generators in range of a artificial mass
gravdrive
Toggle between on and off

Special Settings:
vtolon
program will change from every 10 tics to every 1 tic. (not needed for most operations)
vtol
toggle between on and off (every 10 tics or every 1 tic)
loadbalanceron
program will try to balance load (used for thrusters on rotors mostly)
loadbalance
toggle between on and off
signallimit ###
sets the laod balance signal limit. Signal limit is to not balance thrust below that % (0 to 1, default 0.1)
slackvelocity ###
sets the limit of +- to velocity.. ie 40m/s +- 2m/s
apogee ###
sets the limit of orbital apogee .. ie 0.08g +- 0.02g (satellite will go from 0.06g to 0.1g)
apogeetime ###
sets the time to go from low apogee to high apogee
rocketGyro
Sets autolevel to back of ship controller toward gravity instead of default of bottom of ship controller toward gravity
heighoffset
To adjust program height from bottom. Changes as needed for landings. Default 100m
EmergencyThrusterName name
if below GravityEmergency, turn on these thrusters
GravityEmergency ###
sets the gravity if at this or below, turn on emergency thrusters (ie. GravityEmergency 0.3 so gravity = 0.3 or higher gravity)

Orbital Mode:
velocitylimit ###
sets the velocity limit
targetaltitude ###
targethover ###
targetgravity ###
sets the desired setting. (targetaltitude 100 means sets altitude to 100m)
changealtitude ###
changehover ###
changegravity ###
changes the desired setting (changealtitude +10 means add 10m to altitude setting)

Dampener mode:
Note: in gravity well only forward/right work. up is set to zero. In deep space all 3 axis work)
targetright ###
targetup ###
targetforward ###
sets the desired speed in that direction. or oposite if negative. targetforward -10 is backwards 10m/s
changeright ###
changeup ###
changeforward ###
changes the desired speed in that direction.
VTOL



Script can be use with VTOL by using the argument loadbalanceron. The arguement vtol was already used to change between 10 tic and 1 tic run times.

This is still experimental, but working

This is a much more complex version.
FailSafe Script

FailSafe
Idea is if something happens to orbital computer then you want to Fail to a Safe position.
This is a seperate script than Orbital Flight Computer.

Example:
Station in orbit and something happens to break the Orbital Flight Computer. FailSafe watches (trys to run every 100 tics) the orbital computer and if it cannot run the computer then FailSafe triggers.
Turns on normal dampener, turns off all gyro overrides turns off all thruster overrides, turns on all thrusters and turns on a blinking red light. Then the station does not tip over and fall out of orbit.

FailSafe does what it loaded from CustomData (or from arguments sent to it)

Argument:
reset
reset failsafe
thrusteroverride
turns off all thruster overrides
thrusteron
turns on all thrusters
gyrooverride
turns off all gyro overrides
dampener
turns on Space Engineer dampener
lighton
turns on the lights that have name set
gravDriveoverride
turns off all gravity generator overrides (not get gravDrive)
timerstart
starts timer that have name set
pbname name
watchs PB with name in name of PB
lightname
used with lighton ie turn on blinking red light to tell user failsafe triggered
timername
used with timerstart to start that timer. timer can do other actions failsafe does not do.

Script at
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1267014939
Examples
Orbital Recon Bird
Programing Block: Custom Data
gravity
targetgravity 0.22
orbitalStatusLCDName [ShipStatus]
autolevelon
dampener
velocitylimit 10
apogee 0.00

This turns on gravity mode (goes up and down based on local natural gravity)
Sets target to be 0.22g
Write data to any lcd with [ShipStatus] in the lcd name or lcd custom data
Sets autolevel to be on.
Sets ship mode to dampener. In gravity mode that tries to reduce the moving forward and horizontal in orbital to 0 m/s.
velocitylimit 10 is the vertical speed limit the satellite tries to follow.
apogee 0.00 means the +- in orbital is zero. circular orbit.
34 Comments
Elfi Wolfe  [author] 12 Jan, 2023 @ 7:57am 
ItsPrimBridge 12 Jan, 2023 @ 4:18am 
Can you please make a video explaining how to set this script up? I have a basic satelite with solar power, an antenna, remote control and gyroscope and no matter how much I read the guide it doesn't want to work
Elfi Wolfe  [author] 11 Sep, 2022 @ 10:09am 
That is a good idea.
I can use my little cargo hopper.

Give me a few days.
RynardFurHUN 11 Sep, 2022 @ 7:03am 
One question.

Why do not you make a tutorial video to set up this script? As I tried to use your argument the ship I use do not doing anything. Only one I can see on the programin block is:

-- O.I.S Orbital Flight computer --
OrbitalMode: Off

I see you made some video how your ships react if you push a button on your toolbar, but WHY don't you show to us how can we set up our ship, and maybe how we need to change altitude, velocity speed, ect...
Elfi Wolfe  [author] 30 Apr, 2021 @ 1:28pm 
It should just do forward thrust if that is all it has.

um.
To start system
altitude or hover
targetaltitude or targethover
or you can do currentaltitude or currenthover
you can also change on the fly changealtitude .. but you are not using that part.

To get thrust forward
shipdirection
then targetforward 90 (for 90m/s)
or changefoward +10 (for +10m/s)

Then it should only do forward (in horizontal plane from gravity vector ) thrust.
Bitznice 30 Apr, 2021 @ 1:23pm 
is there a way to get the script to just do forward thrust cause i got it working for a plane but i cant for the life of me remember how i did it to do the same to my current plane
Elfi Wolfe  [author] 30 Apr, 2021 @ 1:12pm 
Sorry I am working. and the script was never designed to work with wings or other mods that give lift.
Bitznice 30 Apr, 2021 @ 11:14am 
im currently hosting a water world server with me messing about with your script if you would like to hop on and show me how you would set it up
Bitznice 30 Apr, 2021 @ 11:13am 
it seems to have stopped working altogether now with what you told me to do that or im just not understanding what your telling me to do on the hot bar
Elfi Wolfe  [author] 30 Apr, 2021 @ 7:57am 
Here is a cargo transport I use for long distance air travel. It has settings to control flight computer.
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2462741185