Stormworks: Build and Rescue

Stormworks: Build and Rescue

评价数不足
Radar Lead Calculator
2
   
奖励
收藏
已收藏
取消收藏
Vehicles: Air, Sea, Creative, Land, Mechanical
标签: v1.7.6
文件大小
发表于
更新日期
38.086 KB
2023 年 5 月 19 日 下午 1:20
2023 年 5 月 21 日 上午 3:20
5 项改动说明 ( 查看 )

订阅以下载
Radar Lead Calculator

描述
This microcontroller is used for calculating lead on a moving target using a radar. It can calculate lead for the following cannons: Artillery cannon, Battle cannon, Bertha cannon, Rotary autocannon, Heavy autocannon.

You may need to change the amount of ticks, default is 60 ticks (1 seconds).
60 ticks = 1 second.

To use this microcontroller you need these components:
2 physics sensors
1 compass
1 radar
2 robotic pivots

Place the first physics sensor right behind your radar (which needs to be in static mode). Connect the composite output of this physics sensor to 'physics sensor 1'.

For the second physics sensor, place this right next to your cannon. Connect the composite output of this physics sensor to 'physics sensor 2'.

Place the compass with the arrow in the same direction as your cannon is facing.

For the robotic pivots, place one for the pivot (yaw) rotation, and one for the pitch rotation.


Here is an example on how to set this up



I've also used this kalman filter from the workshop to reduce the noise from the radar.

I know this isn't the greatest lead calculator, but I've tried to make it as accurate as possible.
Let me know if something doesn't work.
7 条留言
Gebakkenkip  [作者] 2024 年 11 月 9 日 上午 3:25 
Jittering is due to the radar noise, which i've tried to lower using a filter but it still jitters a lot, and vehicle speed is taken into account. I'll upload a better version which doesn't jitter eventually.
KettleShot 2024 年 11 月 8 日 下午 6:14 
is there a way to take into account vehicle speed and reduce the jittering?
Gebakkenkip  [作者] 2023 年 10 月 21 日 上午 6:55 
It has to do with the delay that the microcontroller introduces. I have made a new version, which does take this into account, but there are a few things that I still have to improve. It will eventually be on the workshop.
trucksarenoisy 2023 年 10 月 21 日 上午 4:22 
the gun is pointing nowhere near where it should what am i doing wrong
Gebakkenkip  [作者] 2023 年 5 月 29 日 上午 6:57 
If you want to use depricated radars with this microcontroller right now, do the following:
Place two depricated radars next to each other, one vertically and one horizontally.
Then connect the distance node to the first channel in a composite signal.
Then connect the elevation angle from the vertical radar to the second channel.
Connect the elevation angle from the horizontal radar to the third channel.

After you've done that connect the composite output to the composite input of the microntroller.
In the microcontroller remove all the lua scripts and connect the nodes back together where the lua scripts used to be, or remove all codes in the scripts and paste in

"function onTick()
output.setNumber(1, input.getNumber(1))
end"

(there are 4 Lua scripts total).

It should not shake anymore when you've done that. If it doesn't aim in the direction of your target, try inverting the elevation values.
Gebakkenkip  [作者] 2023 年 5 月 29 日 上午 6:57 
It's shaky because I'm using one of the new radars and haven't found a good way to reduce the noise created from them, which is why I'm using a filter. It reduces the noise a little but it's still kinda bad. I was testing this microcontroller using the depricated radar, which doesn't shake. I'll upload that version in a week or two when I've finished polishing it.
Novum33 2023 年 5 月 28 日 下午 3:08 
Why is it so extremely shakey, like it is jiggling so much it is insane