Profile image

Autoleading AA Turret

62.0k 232287168147825  6 months ago
23,447 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 10 airplane(s) +56 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
  • 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 5 months 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 5 months 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 6 months ago
  • Profile image

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

    5 days ago
  • Profile image
    17.9k SyntheticL

    @232287168147825 May I use this turret on my ships?

    5 days ago
  • Profile image

    I like it. ill test all autoturrents

    7 days ago
  • Profile image

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

    10 days ago
  • Profile image
    297 Mon0009

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

    10 days ago
  • Profile image

    @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

    12 days ago
  • Profile image
    0 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

    27 days ago
  • Profile image

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

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

    one month ago
  • Profile image

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

    one month ago
  • Profile image

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

    2 months ago
  • Profile image

    Were u ever gonna add parallax turret
    Also do u want link to my plane-enabled autoturret
    It is stabilized to always work at any angle (keeps turret level)

    +2 2 months ago
  • Profile image
    7,396 Ibee

    Hey!@NumbersNumbersTheMan, can i use this CIWS on my Ship?

    2 months ago
  • Profile image

    What should I do if it won't rotate to a target

    2 months ago
  • Profile image
    2,954 Mikey101234

    How do I make the gun be able to be able to depress

    2 months ago
  • Profile image
    1,757 Embo

    @FurDynamicsweaponsandfirecontrol and it counts as "critacly damaged" so you cant target it

    3 months ago
  • Profile image
    1,757 Embo

    @FurDynamicsweaponsandfirecontrol because it actomaticly destroys itself while spawning, its neccisary for it to work

    3 months ago
  • Profile image

    @NumbersNumbersTheMan why can I not lockon to the AI version?

    3 months ago
  • Profile image
    254 Grey1

    @NumbersNumbersTheMan is there a way to do this but with turrets from a plane? And can they be configured to target ground AI like the ships or is it just aerial AI only?

    3 months ago
  • Profile image

    Hi, why isn't it pointing down and how can I fix it?

    4 months ago
  • Profile image

    @NumbersNumbersTheMan How exactly do you use gyros with the turrets? I tried putting the turret codes directly into the gyros but it made the turrets spin around uncontrollably instead

    4 months ago
  • Profile image

    Make it where I can fire itself

    4 months ago
  • Log in to see more comments