Stormworks: Build and Rescue

Stormworks: Build and Rescue

评价数不足
Radar Microcontroller by Carbono
   
奖励
收藏
已收藏
取消收藏
Vehicles: Sea, Land
标签: v1.10.3
文件大小
发表于
更新日期
196.574 KB
2023 年 10 月 23 日 下午 3:03
2024 年 2 月 24 日 下午 5:15
6 项改动说明 ( 查看 )

订阅以下载
Radar Microcontroller by Carbono

描述
Fast info
Compatible with the new radar system!
• For any screen size;
• For any radar mode;
• size: 4x2 (inputs/outputs description below);
• Script made possible with Lua programming language.

Description
This radar microcontroller can detect multiple targets at once and project their relative positions on the screen. They disappear in a fade-out with a timer set by the user.

The radar microcontroller displays ticks on the screen to provide players with a sense of angle and distance. To give you a sense of the scanning area, the radar microcontroller shows the horizontal FOV (Field of View) of your radar on the screen with two green lines. These lines will rotate as the radar rotates, indicating the actual position of the radar sweep.

This radar microcontroller will adapt to any screen size, and you can also link the microcontroller with a buzzer to produce a beep sound when a target is found.

Huge update: now the microcontroller merges targets by their world position. This approach with a compass sensor allowed me to develop an instant adjustment on target position due to the vessel rotation. In this update, North is always indicated on your screen.

It’s important to adjust the settings for your radar. Please check the descriptions below for more information.

Settings
Radar range (meters): same number as your radar shows (usually). This will fit all possible target positions exactly on the radar display. You can set it higher or lower, but lower can have targets out of the radar display.
Circular tick (meters): it represents ticks on your radar screen. The default value is 1000 m, so it will show a darker green circle for each 1000 m.
Radar FOV X: same number as set on your radar
Disappearing time (s): this radar will delete targets with timing. This field gives the discard timing for targets in seconds. Targets will fade out and disappear until this time is reached.

Inputs
Radar rotation: current radar rotation from forward in turns. This must be given by the Radar output;
Radar data: input data from the radar output;
X coordinate: current X position on the world map. This must be given by a GPS Sensor;
Y coordinate: current Y position on the world map. This must be given by a GPS Sensor;
Compass reading: Angle in turns that the boat is rotated from north. This must be given by a Compass Sensor.

Outputs
Video: Radar display video;
Target found: returns if an object has been detected. This is useful for beeps on your radar system.

Author note
If you edit this microcontroller and upload it, please provide credits!
Please, rate it!

Update note
I fixed the radar problem with multiple bugged targets. Thanks for the feedback. I debugged my code and found the error easily. Now the radar works perfectly. Enjoy!
3 条留言
ÆSY 2024 年 3 月 28 日 上午 10:44 
Tested it for a bit and the target error did not appear, good job!
Awesome that you took your time to fix it, I will make good use of it in my creations now, many thanks! :D
Carbono  [作者] 2024 年 2 月 24 日 下午 5:19 
Thank you for the feedback. I read your report this week and immediately debugged my code to find the error. I found it easily and fixed the radar problem with multiple bugged targets. :)
ÆSY 2024 年 2 月 5 日 上午 11:08 
I really love this radar mc, it has all the ideal functions!
It does however sometime light up with a dozen targets randomly on the screen that are not there sometimes, I dont know the exact cause of it and other radar mcs that I put next are not affected by this issue. It might have something to do with when the radar returns the "HQ Truck" as a target found but I am not sure. It deserves the highest rating if that bug is fixed :D