Space Engineers

Space Engineers

Auto Piston Docking Alignment
Showing 1-8 of 8 entries
Update: Oct 7, 2020 @ 9:05pm

Fixed exception thrown in program ctor() object reference not set to instance of object in EchoToLCD.

Sorry about that, guys.

Update: Oct 6, 2020 @ 10:47pm

Update: Oct 3, 2020 @ 1:33am

Just removed the output every 100 lines, so it never get's too long.

Update: Oct 3, 2020 @ 1:14am

Updated it to not move the pistons at all if it can calculate that it will not be able to reach it to the intended target location.

Thanks @Nemora for the suggestion!

Update: Oct 3, 2020 @ 12:44am

Stow away feature now works!
Check the configuration variables at the top of the script to disable it. (it is enabled by default)

Depending on how your pistons are set up, you may want to have the pistons fully retract or fully extend in order to stow the connector away.

Be careful not to smash your rover with the new stow away feature!

Also, now the connector will automatically lock when it gets to the rover!
If this new feature is not desired, I might make a configuration for that.

Update: Sep 13, 2020 @ 11:06pm

Version 3.0

No more naming every piston and connector!

Only the connector on the rover needs a tag in the name to identify which connector to use on the rover. [APD]

Many docking bays on the base can all be used and are all managed by the same programmable block.

Update: Sep 13, 2020 @ 5:56pm

Version 2.0

moved config variables to top, esablished [APD] tag

// Auto Piston Docking [APD]
// configuration variables
string _broadCastTag = "Docking request channel 4A1E [APD]";
// starts spinning after receiving a docking request
// spins red if the connectors are not algined straight
// spins yellow if the connector are aligned straight
string _lightName = "Rotating Light [APD]"; // optional name of a spinning light
string _connectorName = "Connector [APD]";
string _lcdName = "LCD Panel [APD]";
string _verticalPistonName = "Piston vertical [APD]";
string _lateralPistonName = "Piston lateral [APD]";
string _depthPistonName = "Piston depth [APD]";

Update: Sep 12, 2020 @ 2:38am

Initial upload.
Works everytime, but code needs clean up.
Same program runs on both rover and base.

Bind Programmable block run to rover hot bar and execute to start sequence.

It looks for a Connector named (both for Rover and for Base): Connector [ConnectorAlpha]
It looks for 3 pistons named:
Piston [vertical]
Piston [lateral]
Piston [depth]


Optionally it looks for rotating light named: Alginment Light Alpha [Docking]
which will start spinning red if the connectors are rotated correctly
and spin yellow if the connectors are already in line

It will look for an LCD panel named: LCD Panel [MessagerLCD]
to print output about what is going on

TODO
Need to add resetting to default pos after undock.

Need to add undock command.