Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Made by NumbersNumbersTheMan
- Highly Experimental Prototype
- Free License (No License at All)
- Explanation FunkyTrees For "FLAK AA TURRET"
- https://www.simpleplanes.com/a/C3oN8V/Flak-AA-Autoturret
- STEP ONE: TIME FUSE
- detonation: detonate when the projectile's X value matches the target's X
- ((cos(TargetElevation) * TargetDistance)/(cos(ELE) * CannonSpeed))
- ELE -> The adjusted elevation of the cannon to account for a parabolic trajectory.
- CannonSpeed -> Muzzle Velocity of the cannon.
- 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.
- =====
- STEP TWO: PROJECTILE AIMING
- we need compensate for gravity messing up the direct-line targeting.
- 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
- atan(((pow(CannonSpeed,2)) - (sqrt((pow(CannonSpeed,4)) - (9.81 * ((9.81 * pow(X, 2)) + ((2 * (Y)) * pow(CannonSpeed,2)))))))/(9.81 * X)) / 90
- X = (cos(TargetElevation) * TargetDistance)
- Y = (sin(TargetElevation) * TargetDistance)
- =====
- STEP THREE: COMBINING THEM TOGETHER
- Mk2 NO CORRECTION
- atan(((pow(CannonSpeed,2)) - (sqrt((pow(CannonSpeed,4)) - (9.81 * ((9.81 * pow(X, 2)) + ((2 * (Y)) * pow(CannonSpeed,2)))))))/(9.81 * X)) / 90
- ((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
- 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