Profile image

Flak AA Autoturret (broken)

65.6k 232287168147825  8 months ago
6,389 downloads



^click^ for target plane to test with

I woke up today and the new beta featured a new parameter: fuseInput. This immediately got me thinking, and I came up with this. While the new auto fuses can simply be timed to the linear distance, I decided on something more complicated as cannon projectiles are pulled down by gravity. As well as that, I also upgraded the old turret's simple funky trees with something much more... fun... to compensate for the force of gravity.

It works best at longer range and has a built in range of 20km. This can be put on planes if gyros are used instead of rotators.


Source Function


Function Explanation

Thanks to SnoWFlakE0S for linking the proper equations to do this:


Function Physics Explanation

(But no Funky Trees! So people who took Physics can understand easily!)
Thanks to SnoWFlakE0S for linking the following equation:

This allows the cannon to take account gravity to hit (X,Y). These being calculated on a plane based from the turret's heading using trig.
The heading is nearly the same as the old turret. Basically, the fun two-vector projectile motion but simplified and solved into 1 equation with the variables I need/have.

The fuse is different than a linear calculation, which would calculate the amount of time the shell would reach linearly (Distance/Speed). Since the projectile is a two-vector object, we find the horizontal vector and then divide by the total horizontal distance to attempt to explode near the target, unlike the normal linear method which would result in the shell exploding too early as the linear path would be shorter than the parabolic one.

To become cool and reason why it looks so intimidating, is we need to find the horizontal vector of the already gravity-corrected turret angle, (as opposed to the target’s component of horizontal displacement, which is from straight TargetElevation) meaning we plug the entire equation into the trig.


Want to know the license for these FUNKtions? look at a rotator lol

Spotlights

General Characteristics

  • Successors 8 airplane(s) +98 bonus
  • Created On Windows
  • Wingspan 8.2ft (2.5m)
  • Length 10.9ft (3.3m)
  • Height 12.4ft (3.8m)
  • Empty Weight 4,832lbs (2,191kg)
  • Loaded Weight 9,125lbs (4,139kg)

Performance

  • Wing Loading -439,839.3lbs/ft2 (-2,147,483.6kg/m2)
  • Wing Area 0.0ft2 (0.0m2)
  • Drag Points 5843

Parts

  • Number of Parts 67
  • Control Surfaces 0
  • Log in to leave a comment
  • Profile image

    And the code given by WNP78 worked better at shooting down planes.

    Pinned 8 months ago
  • Profile image

    I love this

    2 months ago
  • Profile image

    Ok it something to do with discord idk but its smthn
    CCC - cu clux clan..... jjust kidding its a specific group of people that collaborate on builds, idk how to join

    SPMC - simplpelanes master chat, only the best simpleplanes masters (it says it...) can join @CedC

    4 months ago
  • Profile image
    2,691 CedC

    what is CCC and SPMC?

    4 months ago
  • Profile image

    May i ask is it still working?

    5 months ago
  • Profile image
    6,452 Belloaka

    Nice, can't wait to download this.

    5 months ago
  • Profile image
    6,930 Star737

    Does the AI work with this turret?

    6 months ago
  • Profile image
    11.7k Hellosss38

    Ah ok
    @NumbersNumbersTheMan

    6 months ago
  • Profile image

    The elevation / azimuth is aight. But the fusing (that determines when the flak should explode, preferably next to the enemy) is unreliable and explodes too far or too short sometimes @Hellosss38

    6 months ago
  • Profile image
    11.7k Hellosss38

    Why is it broken

    +1 6 months ago
  • Profile image
    30.0k tsampoy

    Impressive!

    6 months ago
  • Profile image

    It's time for AUTOMATED BROADSIDES and epic anti air defense!!!!

    +1 6 months ago
  • Profile image
    660 SPak

    @AMEIBOXIA3 输了

    7 months ago
  • Profile image
    0 80TH

    @SPak 你没输入代码,它能运行?

    7 months ago
  • Profile image

    If you make it so it has no recoil then the fire rate goes up.

    7 months ago
  • Profile image
    32.7k SodiumIodide

    me too

    7 months ago
  • Profile image
    15 JOTAR0

    @Vladimir1944 i think i can help

    7 months ago
  • Profile image

    Sucks that Jundroo hasn't released 1.10 on Amazon yet...

    7 months ago
  • Profile image
    660 SPak

    It has no air-to-air capability

    +1 7 months ago
  • Profile image

    Need help for my attack helicopter project with an automated belly turret

    8 months ago
  • Profile image

    @NumbersNumbersTheMan The entire problem, I assume, is that the target is moving and the fuse is set to detonate at the point the plane was when the shells fired instead of where the plane is when the shell passes by the plane... Because even with the Snowflake code the shells still pass by the plane (even the slowest vanilla bushplane, that is) and harmlessly detonate 50 feet (if not 100 or more) behind it...

    8 months ago
  • Profile image

    @ThomasRoderick unfortunately, the function

    ((cos(TargetElevation) * TargetDistance)/(cos((atan(((pow(2000,2)) - (sqrt((pow(2000,4)) - (9.81 * ((9.81 * pow((cos(TargetElevation) * TargetDistance), 2)) + ((2 * ((sin(TargetElevation) * TargetDistance))) * pow(2000,2)))))))/(9.81 * (cos(TargetElevation) * TargetDistance))) + rate(TargetElevation) * (TargetDistance / 2000)) / 1) * 2000))
    

    has issues when setting horizontal component fuses. I will take a look some day, but I am busy. A guaranteed fuse that will be a little short and more inaccurate as targets get farther is a linear fuse, targetDistance / 2000

    8 months ago
  • Profile image

    There's one slight problem: the shells detonated nowhere near the enemy plane, so unless we can get a direct hit it's not really working... Is it due to lag?

    8 months ago
  • Profile image
    5,458 Tookan

    @NumbersNumbersTheMan I'm in 1.10.103 too so probably the second case as WarshipDude said

    8 months ago
  • Profile image

    @NumbersNumbersTheMan i do use 1.10.103, mybe its the second case

    8 months ago
  • Log in to see more comments