Stormworks: Build and Rescue

Stormworks: Build and Rescue

75 ratings
Advanced Ballistic Calculator
   
Award
Favorite
Favorited
Unfavorite
Vehicles: Air, Sea, Land, Mechanical
Tags: v1.4.16
File Size
Posted
Updated
213.343 KB
Nov 23, 2021 @ 4:48pm
Apr 17, 2022 @ 11:38pm
6 Change Notes ( view )

Subscribe to download
Advanced Ballistic Calculator

Description
Does not account for drag or turret rotation
About the Calculator
This Ballistic Calculator uses a static radar to find the launch angle needed for a projectile to meet its target. It accurately accounts for both horizontal and vertical displacement components and output to a robotic pivot value. It works for all weapons in the DLC.

Setup
Select the weapon type from the property dropdown box, then connect a Static radar to the composite input, this is used to produce two outputs that are the robotic pivot angle of the gun, and an on/off output that displays if a target is been tracked.

This only outputs the elevation angle it does not output an azimuth for the turret. So if you want this to be functional you need to take internal logic from this MC and use it in your own turret controls.

The Mathematics
If you're interested in how this function was derived one of the SUVAT equations was used { y = uy*t + 0.5*a*t^2 }, where y is the vertical displacement in metres, uy is the vertical launch speed in m/s, a is the acceleration due to gravity in m/s/s, and t is the time in seconds. This was developed to consider launch angle by substituting { uy = u*sinʘ } for uy, and { t = x/(u*cosʘ) } for t. This substitution produced the function { y = x*Tanʘ - 4.9*(x/(u*cosʘ)^2 }, using trigonometric identities {1/cos^2ʘ = (1+Tan^2ʘ)} the equation can be solved using the quadratic formula, in which,
{ Θ =aTan((-x +/- sqrt(y^2 - 4*(-4.9x^2 / u2) * (-y - (4.9x^2 / u^2))) / (2*(-4.9x^2 / u^2))) }.

Note: the acceleration due to gravity for bullets in stormworks is 30m/s/s so substitute 15 for 4.9 in the equation { y = x*Tanʘ - 4.9*(x/(u*cosʘ)^2 }, and solve.

https://steamcommunity.com/sharedfiles/filedetails/?id=2664530218&searchtext=ballistics+calculator+testbed
30 Comments
SMITHY  [author] Apr 20 @ 6:31pm 
I would not use this at all tbh. There’s better ballistic calculators out there
elrychmenard Apr 20 @ 1:48pm 
Will this help me hit stuff with my gustav gun? it cant turn without a turn in the track so ive been trying to find something that will help calculate where the bertha shells will land because otherwise i cant hit shit, its only elevation and no yaw control, and if not anyone know of a controller that will help?
Novum33 Oct 9, 2022 @ 5:07pm 
possible to make an mc that just makes a tank's cannon elevate to compensate for range of target (for a tank with laser rangefinder) no radars or anything
JOHN Oct 1, 2022 @ 9:27pm 
would you be able to add the rocket pod to the micro controller?
HardlyLivin Jun 20, 2022 @ 3:22pm 
I was afraid of that. I'm hoping we see some changes to the default accuracy though soon. I'm tired of the zip code size spread.
SMITHY  [author] Jun 20, 2022 @ 2:50am 
@Hardylivin I know what you’re talking about, but it’s just too complicated. I think the spread changes with the location you spawn at.
HardlyLivin Jun 19, 2022 @ 1:19pm 
Are you familiar with a micro controller that maps out each guns projectile spread and adjusts the turret to allow pin point hits? I was told someone made something like that? Being able to mount that inline with a calculator like this would be deadly.
mikeyurenia Apr 18, 2022 @ 2:40pm 
thank you, this is very useful for me
V1 Apr 17, 2022 @ 12:09pm 
@smithy Thx bro
SMITHY  [author] Apr 17, 2022 @ 5:48am 
@V1 Instead of uploading another creation, I just updated an older SPAA of mine with a lead calculator I've been working on. It'll be somewhere in the biggest micro-controller underneath the turret, keep in mind this MC has also got some other stuff in it like missile guidance and an autoloader.

https://steamcommunity.com/sharedfiles/filedetails/?id=2698871139&searchtext=