Stormworks: Build and Rescue

Stormworks: Build and Rescue

评价数不足
Number Averager and Gauge Damper
   
奖励
收藏
已收藏
取消收藏
Vehicles: Mechanical
标签: v0.10.24
文件大小
发表于
更新日期
20.921 KB
2019 年 6 月 18 日 上午 10:24
2020 年 6 月 18 日 下午 10:11
3 项改动说明 ( 查看 )

订阅以下载
Number Averager and Gauge Damper

描述
Now updated to use LUA

Damps out jittery dial readings and averages out fuel tank slosh so you can can get accurate readings even in heavy seas. Ideal for range and fuel consumption calculations where a stable and accurate fuel reading is essential.

Simply place the block, connect a number input, number output, and select the time you want to average over with the property slider.

1 second will often be enough to damp out a jittery, unreadable dial. 60 seconds is enough to compensate for the fuel tank slosh as your boat rolls in the waves.

(Technical)

This controller outputs the running mean average of the input over a given number of seconds.
It uses a lua table to do this, and records every single value over that time frame, so there is no sampling error.
It follows the game's convention of one second being equal to 60 logic ticks. Depending on how your game is running, this may or may not correspond to realtime seconds.
If you replace the property slider with any other number source, it will still work, however very large numbers could eventually slow the game down.

2 条留言
NosamCrunch 2021 年 10 月 31 日 上午 9:19 
I tested it, sadly it does not. It just changes the interval that the surfaces shake at.
NosamCrunch 2021 年 10 月 31 日 上午 8:47 
would this work for preventing a gyro from shaking the control surfaces?