The latest model of the AC130 gunship is the AC130J Ghostrider. The new model was armed with a single 30mm gun and precision munitions like the Griffin, SOPGM (Standoff Precision Guided Munitions) and GBU-39 small diameter bomb. Recently it’s been announced a 105mm cannon will be added.
One of the key advantages of a cannon is it’s much cheaper than precision munitions. It can also be fired much closer to troops on the ground. The other advantage is cannon fire typically allows you to suppress the enemy longer because of more ammunition than the payload of precision munitions. Suppressing the enemy is critically important so you can hold the enemy in place while withdrawing or maneuvering to a position of advantage. Finally, cannon rounds get there much quicker.
The latest is a desire to research putting a laser on the AC130J. Don’t know if it will be designed to target ground targets or ground to air missiles but the initiative is fascinating.