This problem is so complicated that I'm almost finished writing a book. Simply put, when the artillery is aiming at the target, the target area cannot be seen from the position (gun position) where the artillery shell is fired. In order to make the cannonball hit the target accurately, aiming points are set behind the gun by using the parallel line principle and triangle principle, so that the angle change value between the targets is a fixed multiple of the position change of the aiming point behind the gun sight, and the gun can change itself in time according to the change of the target when shooting.
As for why all guns can be fired in one direction, that is the benchmark shooting of guns. It's simple. A Sunday is divided into six thousand positions and fired in one direction at the same time.