Profile image

AUTO-AIMED TURRET AK-2100

15.1k SenSkysh  4.3 years ago
46,609 downloads
Auto Credit Based on SenSkysh's ak-2100

A little about the formula

Horizontal rotator:

(TargetHeading - Heading + rate(TargetHeading)*(((1000 * sin(asin((TargetDistance * 9.81)/(pow(1000, 2)))/2))/9.81) * 2))/180
1000 here is the projectile speed of the cannon

Vertical rotator:

clamp((TargetElevation + rate(TargetElevation)*(((1000 * sin(asin((TargetDistance * 9.81)/(pow(1000, 2)))/2))/9.81) * 2)) + (asin(((TargetDistance + rate(TargetDistance)*(((1000 * sin(asin((TargetDistance * 9.81)/(pow(1000, 2)))/2))/9.81) * 2))* 9.81)/(pow(1000, 2)))/2),-10,45)/45
1000 here is the projectile speed of the cannon, -10,45 - limiting angles of guidance

Upd.

Time does not stand still and gradually I came to a more sophisticated formula. She is somewhat more accurate

Horizontal:

(TargetHeading - Heading + (rate(TargetHeading)) * (((v * sin(asin((TargetDistance * 9.81)/(pow(v, 2)))/2))/9.81) * 2)
)/angle

where
v - projectile speed
angle - rotator range of motion

Vertical:

clamp(TargetElevation + (rate(TargetElevation)) * (TargetDistance + rate(TargetDistance)*TargetDistance/v)/v + (asin((cos(TargetElevation + (rate(TargetElevation)) * (TargetDistance + rate(TargetDistance)*TargetDistance/v)/v) * (TargetDistance + rate(TargetDistance)*TargetDistance/v) * 9.81)/(pow(v, 2)))/2) -PitchAngle*cos(TargetHeading - Heading + (rate(TargetHeading)) * (TargetDistance + rate(TargetDistance)*TargetDistance/v)/v) - RollAngle*sin(TargetHeading - Heading + (rate(TargetHeading)) * (TargetDistance + rate(TargetDistance)*TargetDistance/v)/v),nA,pA)/angle
where
v - projectile speed
nA - negative vertical guidance
pA - positive vertical guidance
angle - rotator range of motion

Upd2

Just for accuracy

Upd3

Table

Spotlights

General Characteristics

  • Predecessor ak-2100
  • Successors 21 airplane(s) +189 bonus
  • Created On Android
  • Wingspan 16.4ft (5.0m)
  • Length 26.8ft (8.2m)
  • Height 16.1ft (4.9m)
  • Empty Weight 149,236lbs (67,692kg)
  • Loaded Weight 155,289lbs (70,438kg)

Performance

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

Parts

  • Number of Parts 88
  • Control Surfaces 0
  • Performance Cost 253
  • Log in to leave a comment
  • Profile image
    15.1k SenSkysh

    I already wrote that the free-use formula

    Pinned 3.8 years ago
  • Profile image

    @SenSkysh Please teach us step by step how to use Variable setters

    6 months ago
  • Profile image
    45 Code33

    I have look for auto aiming for a long time.
    Yesterday might i test for times and made it
    But today i found this auto aimed lol

    10 months ago
  • Profile image

    Thank you very much

    11 months ago
  • Profile image
    15.7k SiBangsatYa

    @SenSkysh yo I cant access table

    1.5 years ago
  • Profile image
    15 Roomba

    thanks for the code

    1.6 years ago
  • Profile image
    15.7k SiBangsatYa

    Does this is working also for gun?

    1.9 years ago
  • Profile image

    So I want to use just the code but I have no idea how any of it works. Can you reply with the value representing the projectile velocity and in brackets? I'm trying to make torpedo launchers.

    +1 2.5 years ago
  • Profile image
    15.1k SenSkysh

    @yisrael create it yourself, use this one, or see among my builds

    2.6 years ago
  • Profile image
    157 yisrael

    hey man can u build smthn like this , im making a flying warship so i need a super powerfull turret

    2.6 years ago
  • Profile image

    @SenSkysh ok thanks it works very well! Very useful for plane turrets

    2.6 years ago
  • Profile image
    15.1k SenSkysh

    @Neeguh any

    2.6 years ago
  • Profile image

    @SenSkysh so any rotator works?

    2.6 years ago
  • Profile image
    15.1k SenSkysh

    @Neeguh rotator that raises the cannon

    2.6 years ago
  • Profile image

    Oh and also, where do you input the vertical code? An upright hinge rotator or a sideways rotator?

    +1 2.6 years ago
  • Profile image
    15.1k SenSkysh

    @Neeguh invert

    2.6 years ago
  • Profile image

    My rotator rotates to the left, opposite to my target which is on the right. What do I do

    2.6 years ago
  • Profile image
    15.1k SenSkysh

    @SovietBias1 I once made a table and use case

    2.7 years ago
  • Profile image

    @SenSkysh, and how do i do that? ( sorry, I’m just trying to get myself started on some funky trees, not really sure what to do )

    2.7 years ago
  • Profile image
    15.1k SenSkysh

    @SovietBias1 set start heading to 180, this should help, hopefully

    2.7 years ago
  • Profile image

    @SenSkysh , hey bud, thanks for the the commands but how do i use the code for a gun that faces the opposite direction

    Image below : https://ibb.co/zSY19Bh

    2.7 years ago
  • Profile image
    15.1k SenSkysh

    @Doritos420 shortestAngele=true in rotator settings

    2.8 years ago
  • Profile image

    What I have to change to limitate the Horizontal angle and not make the turret spin a full circle?

    2.8 years ago
  • Profile image
    0 MelMel

    Using the table makes the gun turn in different directions and just kill my vehicle

    2.8 years ago
  • Profile image
    15.1k SenSkysh

    @ShiraLuzy yes, but it's harder to use

    2.9 years ago
  • Log in to see more comments