[In the layout on the diagram battery A would not be able to fire anything as there is a friendly unit closer than the enemy]
Correct
[The infantry now charge into Battery A, so they are at zero distance and hence closer than the Russian friendly unit.]
Correct
[In this situation the rules on page 41 allow the full 5 gun battery to fire as there are no friendly units closer than the enemy, this seems wrong as at least 2 of the guns are firing through their friends.]
I understand what you're saying. It was a poor decision on the part of the Russian commander to put a friendly infantry unit right in front of his own battery. By the same token, however, that player might ask: "Hey, if you're penalizing me by not letting me shoot with the un-blocked gun sections during the enemy's approach, how come you're suddenly allowing me to shoot with those same gun sections when the enemy is at point-blank range?"
We did puzzle through all of this during playtesting, and there were many advocates for the approach of "Just count the eligible shooting bases, and the first thing they hit... they hit. Period. At all times."
...which seems like a wonderfully simple solution until you begin to apply it in practice, especially with large units, and you find that it hopelessly divides firepower to the point that a shooter is virtually impotent if he has multiple targets in front of him.
So I settled for a system that (I think) is easier to apply, and produces more decisive results, even if it sometimes looks as if there's some "magical" angular shooting going on there. I wanted, above all, to make defensive fire something to reckon with.
best,
Sam