Profile image

CCIP logic

3,156 GiuliMBorgesYT  3 days ago

Craft Link

Explanation:

If you have taken some physics classes before, you'll know how the motion of a projectile is composed by a constant horizontal speed and a uniformly varied vertical speed.

This means that, if you know your Altitude (or, actually, AGL), speed, and attitude, you can obtain your ballistic horizontal distance.

And, with both Altitude and horizontal distance, you can use the atan function to find the impact angle (from level flight) of your bomb. Combine that with your Pitch Angle and you have a firing solution.

My code works by solving eq. 2-15 for t,

then multiplying Fall Time by the Horizontal Speed to find the Horizontal Distance

then {acos(-AltitudeAgl/HorizontalDistance)} so I can find the angle between the impact point and the horizon

and, finally, {above-PitchAngle}. Then I'll just format it into a label text

This took me like 40 minutes and was pretty fun to conceive. Probably there are more efficient ways to find a CCIP solution but that's what I came up with atm.

It doesn't account for drag (yet)