If a circling airplane (AC-130) fires a bullet how does the plane's trajectory alter the shell's flight path? Background: An AC-130 is a military aircraft that has a cannon that fires out the side of its fuselage.

If an AC-130 (or similar aircraft) is traveling in straight, level flight at a constant rate of speed calculating gun lead is straightforward.  For example if the plane is traveling forward at 100 meters per second, the target is 1000 meters to the side and its cannon shell travels at 1000 meters per second simply fire 1 second or 100 meters early to score a hit.

However what if the AC-130 is traveling in a circular orbit at 100 meters per second around its target instead of beside the target?  I'm not sure how to calculate gun lead in that circumstance.

Hopefully the image I attached below will help this make sense.  Thanks so much in advance for any input!
The bullet leaves the barrel with the combined velocity of barrel muzzle velocity plus the instantaneous aircraft true air speed velocity (actually, the instantaneous true air speed velocity of the tip of the muzzle). That puts the velocity vector of the bullet ahead of the line of the barrel (ahead of the 90 degree wing line). The fact that the barrel is rotating in inertial space is irrelevant. Whether the aircraft is straight and level, turning towards the tank, or away from it, if, at the moment the bullet leaves the muzzle, it is traveling in inertial space towards the tank, (and sufficiently above it for gravity drop) it will hit it.   

And since the bullet's velocity leaving the barrel is a simple vector sum of the muzzle velocity, and the aircraft's instantaneous velocity at that instant. The velocity vector of the aircraft before, (or after), the bullet leaves the barrel is of no relevance.

So if the aircraft is moving due North at 100m/s and the muzzle velocity is 1000m/s due East relative to the aircraft, the bullet is actually traveling 
SQR(100^2 + 1000^2) = 1004.98 ~1005m/s in a direction slightly North of due east by an amount equal to the arctangent of 100/1000 or ArcTan(0.1) = 6.345 degrees
So the bullet is traveling 1004 m/s on a heading of 90-6.34 degrees = 83.66 degrees true. 
So, to hit the tank, the pilot has to fly so that the gun barrel is pointed behind the tank by 6.34 degrees (and above it by a sufficient amount to account for gravity drop)