Guest User

Simpleplanes Funky Trees Cannon Flak Turret Explanation

a guest
Sep 9th, 2020
550
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.02 KB | None | 0 0
  1. Made by NumbersNumbersTheMan
  2. Highly Experimental Prototype
  3. Free License (No License at All)
  4.  
  5. Explanation FunkyTrees For "FLAK AA TURRET"
  6. https://www.simpleplanes.com/a/C3oN8V/Flak-AA-Autoturret
  7.  
  8. STEP ONE: TIME FUSE
  9. detonation: detonate when the projectile's X value matches the target's X
  10. ((cos(TargetElevation) * TargetDistance)/(cos(ELE) * CannonSpeed))
  11.  
  12. ELE -> The adjusted elevation of the cannon to account for a parabolic trajectory.
  13. CannonSpeed -> Muzzle Velocity of the cannon.
  14.  
  15. Derived math: This finds the horizontal component of the projectile's velocity, and finds the time it will take to reach the target's horizontal distance.
  16.  
  17. =====
  18. STEP TWO: PROJECTILE AIMING
  19. we need compensate for gravity messing up the direct-line targeting.
  20.  
  21. atan(((pow(829,2)) - (sqrt((pow(829,4)) - (9.81 * ((9.81 * pow(TargetDistance, 2)) + ((2 * (sum(Pitch) * 10)) * pow(829,2)))))))/(9.81 * TargetDistance)) / 90
  22.  
  23. atan(((pow(CannonSpeed,2)) - (sqrt((pow(CannonSpeed,4)) - (9.81 * ((9.81 * pow(X, 2)) + ((2 * (Y)) * pow(CannonSpeed,2)))))))/(9.81 * X)) / 90
  24.  
  25. X = (cos(TargetElevation) * TargetDistance)
  26. Y = (sin(TargetElevation) * TargetDistance)
  27.  
  28. =====
  29. STEP THREE: COMBINING THEM TOGETHER
  30.  
  31. Mk2 NO CORRECTION
  32. atan(((pow(CannonSpeed,2)) - (sqrt((pow(CannonSpeed,4)) - (9.81 * ((9.81 * pow(X, 2)) + ((2 * (Y)) * pow(CannonSpeed,2)))))))/(9.81 * X)) / 90
  33.  
  34. ((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)) <-Horizontal Detonation Fuse
  35.  
  36. TargetSelected?(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)) / 90:0 <-Elevation
Add Comment
Please, Sign In to add comment