Space Engineers

Space Engineers

97 人が評価
Landing Gear Balancer
   
アワード
お気に入り
お気に入り
お気に入りから削除
タグ: other_script
ファイルサイズ
投稿日
更新日
389.624 KB
2024年12月21日 7時51分
1月3日 11時19分
2 項目の変更履歴 ( 表示 )

サブスクライブしてダウンロード
Landing Gear Balancer

解説
Adjustable landing gear pistons to compensate for uneven terrain and land with your ship horizontal.

Version 1.0 - 2024-12-21 - First public release
Version 1.1 - 2025-01-03 - Added a timer before turning off, for commands "retract" and "extend"

Designed for use with:
- Up to 8 landing gear kits (1 kit = piston+landingpad+camera)

Functions
- use one downward-facing camera on each landing kit to measure distance from ground
- adjust the lenght of all landing gear pistons to compensate
- provide warning if the terrain is too uneven
- in long legs mode, all pistons are extended by default, and they retract if needed due to uneven terrain
- in short legs mode, all pistons are retracted by default, and they extend if needed due to uneven terrain
- the script activates autolock on each leg, and turns itself off when one has locked

Installation
- Set up to 8 landing kits, with a magnetic plate on a piston, and a downward facing camera
as close as possible (but with a direct, unobstructed view of the ground)
- Create groups for each landing kit, named LGB_kit1, LGB_kit2 etc. with the 3 items in each. The name of the items themselves is irrelevant.
- (optional) Install an LCD screen with the proper name (see below) to see what the script does
- install the script in a programmable block
- recompile the script if needed to let it autoconfigure itself

Usage
- When close the the ground, activate the script in long legs or short legs mode
- Keep the ship horizontal yourself, or use another script (ex: Flight Assist) to do it
- The script start to check the ground below an altitude of 100m (configurable)
- If the ground is too uneven, thescript does it best and the LCD turns red.

Command line arguments
- off: turns the script off (ex : when already landed, etc.) without moving the pistons
- on: activate the leg balancer, preferring long legs
- on_longlegs: activate the leg balancer, preferring long legs
- on_shortlegs: activate the leg balancer, short long legs
- retract: retract all legs, and turn the script off
- extend: extend all legs, and turn the script off

More info
On Github : https://github.com/silverbluemx/SE_LandingGearBalancer
15 件のコメント
silverbluemx  [作成者] 2月21日 23時23分 
@GoldMiner177.
Probably yes although leveling would be more approximate (cameras may end up further away from the landing gear/magplate). There's also more variety in the hinges arrangements. Do you have a specific setup in mind ?
GoldMiner177 2月16日 10時29分 
@silverbluemx
have a question, could this be updated for hinges too? if you're up to the challenge that is
TheKeixs 1月17日 20時03分 
el diavlo que genialida
Invention64 1月7日 6時15分 
@silverbluemx technically you could use a PID to achieve this, as it doesn't need to know which direction a control will move it, just that there is controls and a measurable goal.

But like you said definitely overcomplicated for a script like this.
silverbluemx  [作成者] 1月5日 6時30分 
@Sarianos : What you suggest would probably be more complex than what I've done.
At this point this script relies on the pilot or another script (such as Flight Assist for example) to level the ship (*). Then each landing leg (or "kit") individually adjusts its own length based on:
- the distance to the ground that it locally measures
- the minimum and maximum distance of all other legs.
The legs (or "kits") don't know if they're at the front of the ship, the left, etc. so they don't know how they should extend/retract to *make* the ship level.

(*) This piece of info wasn't in the description before, I've added it.
[RTB] Sarianos 1月4日 21時30分 
@silverbluemx
In theory could this be used with wheels on pistons instead of mag-pads to create a self levelling rover?
lnadon005 1月4日 12時27分 
Thank you, the fix works perfectly, Great Work
lnadon005 1月4日 5時47分 
Thank you for your quick response, will test and report back
silverbluemx  [作成者] 1月3日 11時34分 
@Inadon005 : Well... looking at the code, I don't understand how it might have worked during my tests. Maybe I overlooked something.
Anyway, I've uploaded a fix. Now when using the "retract" and "extend" commands, the script waits roughly 5sec before turning everything off.
Let me know if you have any issue remaining after that.
lnadon005 1月2日 13時47分 
Nice been looking for something like this, only one problem, when retracting the script turns off before the movement starts, have to select each kit and manually turn them on to retract. any advice?