An apparatus having a body that attaches to a
barrel of a firearm and a chamber disposed in the body that receives
combustion gases from the
barrel during a firing sequence of the firearm. Sensors, mounted on the body, capture a measurement of an initial line-of-
sight to a target prior to the firing sequence and measure deviation from the initial line-of-
sight after capture of the measurement of the initial line-of-
sight and during the firing sequence. Ports, in communication with the chamber, are controllable to vary
discharge of the
combustion gases from the chamber. A
feedback control unit receives the measurement of the initial line-of-sight and the deviation from the sensors and controls the ports to vary
discharge of the
combustion gases from the chamber during the firing sequence to generate forces on the
barrel to drive the deviation to a minimum.