Profile image

Autoleading AA Turret

71.6k 232287168147825  1.3 years ago
39,920 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 24 airplane(s) +182 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 -439,839.3lbs/ft2 (-2,147,483.6kg/m2)
  • 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 1.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 1.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 1.3 years ago
  • Profile image

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

    9 days ago
  • Profile image

    do more of these

    one month 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 months ago
  • Profile image

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

    +2 4 months ago
  • Profile image

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

    4 months 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

    5 months ago
  • Profile image

    Thank you very much for this

    5 months ago
  • Profile image

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

    5 months ago
  • Profile image
    5,750 Mynameis190

    @232287168147825 Can this ciws shoot a missile

    +1 5 months ago
  • Profile image
    207 WWIIgeek

    How do you adjust the turret for different muzzle velocities?

    +1 7 months ago
  • Profile image

    When I tried using the rotators to have a smaller version of an auto aiming turret it never shoots at the target it always shoots above it or nowhere near it...did I do something wrong or what?

    8 months ago
  • Profile image

    I know how to make this as capable 1 spawn them anywhere Whit the aggressive mode

    9 months ago
  • Profile image
    25.5k SyntheticL

    @232287168147825 May I use this turret on my ships?

    +4 9 months ago
  • Profile image

    I like it. ill test all autoturrents

    9 months ago
  • Profile image

    @232287168147825 When I tested this it didn't rotate, only the vertical rotation worked.

    +5 9 months ago
  • Profile image
    492 Mon0009

    @232287168147825 what would I need to change to use this code upside down

    9 months ago
  • Profile image
    135 surajsahu

    @232287168147825
    can you help me in this i cant use this in high speeds my killer turrent

    https://www.simpleplanes.com/a/0mbbw4/Killer-turrent

    9 months ago
  • Profile image
    495 R3N13L

    There is a little problem to this creation, when I put it in a vehicle the turret itself got messed up and keeps missing the target. Idk what was the thing that messes the turret up but still one of the best creations

    10 months ago
  • Profile image

    I added the Phalanx CIWS in the USS Beast and USS Tiny to the anti air and anti missile defense

    10 months ago
  • Profile image
    1,103 artsjohn

    You need the overload mod to make it go in a 360 circle but if you have overload on mobile downloaded you should be able to select it and in rotator you should find rotation and make that 360 and it should turn 360 degrees @T57HEAVY

    10 months ago
  • Profile image

    Very excellent. Does your unlisted version work on a plane¿

    10 months ago
  • Profile image
    150 T57HEAVY

    @NumbersNumbersTheMan how did u make it do a full 360 turn

    11 months ago
  • Log in to see more comments