Profile image

Autoleading AA Turret

77.0k 232287168147825  4.3 years ago
55,874 downloads

click top gif for a VERY useful target plane by blue0bull (trust me the AI likes this plane)


Yet another beta tech demo. This time, it is a static AA turret (but can be mounted on a moving land vehicle provided the ground is flat or sea vehicle) that calculates the lead of the enemy aircraft; thus, the automatic aiming will not miss and there is no need for manual adjustment like the old turret. Spawn in, spawn your enemies, and the turret will do the work.

Limitations

This suffers from "triangle error", where the turret's gunnery is slightly offset from the information provided from the cockpit's location. I have thought of and drafted a function to solve this based on Law of Sines and Law of Cosines but I have not implemented it yet. Also, it only works on flat ground. Moving land vehicles are ok though. The AI can control it but it won't fire the guns (unless you damage the AI so it keeps firing the guns). This is only designed to work with the gravityless projectiles of guns.

I think it will work on ships as long as your ships do not list.

The function (click to access):


The function is fully free (it isn't that good though).

How auto-lead works

We take the rate of change of heading and assume the craft will keep that same rate of change constant. Then we calculate how long the bullet will take to get to the target's distance. Finally, we multiply the rate by the time to get the amount of correction for a successful intercept (assuming the enemy keeps its same rates). This means if your enemy is not constantly changing its course (including just going in a circle), you will have big chances to kill it with this device.

PS: It shoots down a lot of different types of planes, not just slow props. Try it out!


Addendum: AI Control

It works now, exactly like the original.

link to the AI - capable turret

Thanks to MysteryTimeTraveler and Darjeelings183 for coming up with this solution.


Coming Soon: PARALLAX

Now turrets don't have to be right above the cockpit... you can have more than one now

 (((TargetHeading - ((sign(Heading)<0)?(360+Heading):Heading)) + (rate(TargetHeading) * (TargetDistance / 2000))) < -90 | (((TargetHeading - ((sign(Heading)<0)?(360+Heading):Heading)) + (rate(TargetHeading) * (TargetDistance / 2000))) > 90)?((asin((sin((180 +  ((TargetHeading - ((sign(Heading)<0)?(360+Heading):Heading)) + (rate(TargetHeading) * (TargetDistance / 2000))))) * TargetDistance) / sqrt((TargetDistance * TargetDistance) + (16.25 * 16.25) - (2 * TargetDistance * 16.25 * cos((180 +  ((TargetHeading - ((sign(Heading)<0)?(360+Heading):Heading)) + (rate(TargetHeading) * (TargetDistance / 2000)))))))) + 180) / 180):((asin((sin((180 +  ((TargetHeading - ((sign(Heading)<0)?(360+Heading):Heading)) + (rate(TargetHeading) * (TargetDistance / 2000))))) * TargetDistance) / sqrt((TargetDistance * TargetDistance) + (16.25 * 16.25) - (2 * TargetDistance * 16.25 * cos((180 +  ((TargetHeading - ((sign(Heading)<0)?(360+Heading):Heading)) + (rate(TargetHeading) * (TargetDistance / 2000))))))))) / -180)

(ignore this for now, it is coming soon)

Spotlights

General Characteristics

  • Successors 30 airplane(s) +247 bonus
  • Created On Windows
  • Wingspan 8.2ft (2.5m)
  • Length 10.6ft (3.2m)
  • Height 13.6ft (4.1m)
  • Empty Weight 2,424lbs (1,099kg)
  • Loaded Weight 6,717lbs (3,046kg)

Performance

  • Wing Loading N/A
  • Wing Area 0.0ft2 (0.0m2)
  • Drag Points 5600

Parts

  • Number of Parts 59
  • Control Surfaces 0
  • Performance Cost 155
  • Log in to leave a comment
  • Profile image

    @Brendorkus 20 dollars basic plan, 50 dollars premium, 100 dollars gold tier
    anyways, people have asked, credit is not needed and you could claim it as your own if you like. still flaws to be fixed and worked out.

    Pinned 4.3 years ago
  • Profile image

    Hello - I’ve set a range of 5km so your target should be closer than that. If you open the turret up you can change this by changing the 5000 in overload of the heading rotator. @Loldydu374

    Pinned 4.3 years ago
  • Profile image

    Addendum: AI Control

    It works now, exactly like the original.

    link to the AI - capable turret
    Thanks to MysteryTimeTraveler and Darjeelings183 for coming up with this solution.

    Pinned 4.3 years ago
  • Profile image

    It's been years the dual c-ram is still not released;-;

    10 months ago
  • Profile image
    30 Jcbbl10

    Hey look a civilian airliner

    +2 1.4 years ago
  • Profile image
    3,066 Zue5s

    @232287168147825 So currently the turret has 0 degrees depression, how do i make it able to aim downwards? (It currently cannot)

    1.7 years ago
  • Profile image
    406 gigachad

    Based....

    1.8 years ago
  • Profile image

    how can i edit it so it works with guns with velocities of 50000? im making a compact laser aa for my future project

    1.9 years ago
  • Profile image
    120 BrickxD

    Hola, podrias hacer un pequeño barco con esta misma construcción o un avion con una torreta como esta?

    2.2 years ago
  • Profile image
    390 MyPPF

    @Charris969 That's Very Good!

    2.4 years ago
  • Profile image
    862 Mach99999

    Can I use this in a build?

    2.5 years ago
  • Profile image

    @232287168147825 when Ice Base screwed up…

    +3 2.7 years ago
  • Profile image

    im gonna use the rotators for my next build ok?

    2.8 years ago
  • Profile image
    1,355 Kestrel990

    That is because it is rigged to only work a a ground turret but with few changes to the equation it can be fixed, note that only the pitch rotating one suffers from this problem so you should be able to fix it by comparing them to each other@Zakhaev245

    3.0 years ago
  • Profile image
    1,355 Kestrel990

    Dose this thing still work if it is moving quite fast

    3.0 years ago
  • Profile image

    @232287168147825 I think the updat did something to the AI turrets aim, you wanna do anything abt that?

    3.1 years ago
  • Profile image
    897 Xi

    do more of these

    3.2 years ago
  • Profile image

    I would like to know how you managed to make the tower give a 360°, because even with the Mods I can't, it always stops at 180°. Note: I'm using your idea to make a World War II AA.

    3.3 years ago
  • Profile image

    老铁,你的密集阵被B站上某个伞兵盗了!快上b站看一下吧,这是他的视频:BV13h41167LR

    +5 3.4 years ago
  • Profile image

    Bro,your work have been stolen from this video!!!Please watch this video on bilibili:BV13h41167LR

    +1 3.4 years ago
  • Profile image
    15 Drmiami

    tip:do not fire at the target over you at the time.----from a player who was destroyed like this for two times

    +1 3.5 years ago
  • Profile image

    Thank you very much for this

    3.5 years ago
  • Profile image

    @CrazyPenguin1306 Same bro, when i try to shoot a truck with it, it always shoot above it

    3.5 years ago
  • Profile image

    @232287168147825 Can this ciws shoot a missile

    +1 3.5 years ago
  • Profile image
    570 WWIIgeek

    How do you adjust the turret for different muzzle velocities?

    +1 3.7 years ago
  • Log in to see more comments