Stormworks: Build and Rescue

Stormworks: Build and Rescue

219 ratings
Ballistic Calculator Sample
6
2
2
3
4
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
344.369 KB
15 Oct, 2021 @ 6:36am
29 Oct, 2021 @ 9:29pm
7 Change Notes ( view )
You need DLC to use this item.

Subscribe to download
Ballistic Calculator Sample

Description
MrJersey made an introductory movie for this item! Thank you!
It includes a brief implementation guide. Check it!
https://www.youtube.com/watch?v=GZGzDMaccpY

---

Ballistic Calculator Sample

This is a sample vehicle of microcontroller that calculates the elevation angle of a gun added by Weapon DLC.
Enter the Tilt and Distance in the target direction to output the required elevation addition amount.

In many vehicles, the camera will only be independent of the gun at elevation.
In this case, correction is required if the vehicle is rolling.

The "Advanced" sample shows an implementation of it pattern.


You are free to use/reverse engineer and publish derivative works!
(Needless to say, Don't repost this sample vehicle As Is.)


This vehicle requires Infinite Ammo and Infinity Electric.


FAQ
Q. The elevation angle of the gun is very low.
Note that the microcontroller outputs the difference from the input elevation angle.

It unit is "Stormworks Angle" (one lap as one).
When inputting to RoboticPivot, you need to multiply the output by 4 and add.
(Check the Basic sample)

Q. Why does the microcontroller output the "difference" value?
Calculating with Lua node has a high latency. It takes at least 4 ticks.
When you integrate it with a low latency vertical stabilizer, you want a diff value.

Q. Output becomes zero when aiming at a long distance
The sample is intended for use with the Laser Distance Sensor, so if the Distance input is 4km or more, the calculation will be cut out.
Open Lua and delete the if statement.

Q. Is it possible to calculate a high trajectory? (as Howitzer/Mortar)
This microcontroller does not support it.
I want to make it, but it's difficult with the current method...
There are no plans near.

Q. Rockets ballistic support?
The trajectory of a rocket is much more complex than a shell.
I have no plans to deal with it as it is difficult to calculate it with my math skills.

Q. Where is the projectile data source?
I investigated it myself.
Later I known about the information published by Dev, which is almost accurate.
https://discord.com/channels/357480372084408322/578586360336875520/898602852790992916



Updates
- 2021/10/30 v1.2.1
Simplified Advanced sample
(There is no change in the calculator)
Reduce gun amount

- 2021/10/18 v1.2
Reduce calculation cost
More accuracy
Code saving

- 2021/10/16 v1.1.1
Fix parameters for v1.3.6

- 2021/10/15 v1.0
first release
69 Comments
elrychmenard 20 Apr @ 1:50pm 
any way to adapt this to my Gustav gun? it only elevates since you have to turn the whole vehicle to turn
Drip Inspector 18 Sep, 2023 @ 3:38am 
How would you go about calculating the angles for a mortar/howitzer style cannon?
Might use these calculations for an engineering project I'm doing for school
RealCagus 17 Sep, 2023 @ 2:58am 
@Nikitos you need to move the math block there too, because wihout it the system seems not to work for some reason
yahgamer 22 Aug, 2023 @ 4:49am 
can you update this to the newer version
Nikitos 13 Jul, 2023 @ 9:44am 
I moved this microcontroller to my tank, connected everything. For some reason it doesn't work. HELP, THE AUTHOR!
Wize 15 Jun, 2023 @ 9:33am 
rockets arent too accurate but otherwise its great. the cannons are almost always right on target
aeroNes 23 May, 2023 @ 3:06am 
is there a way to make the laser only be toggled for a sec instead of it being toggled all the time
Dec 8 Feb, 2023 @ 8:41am 
Can you make a version accounting for speed as well?