Switching for Double Heading

We were asked for a diagram for a double heading switch that could let either loco be at the front of the pair, and could be facing either way. This seems to make selection of reverse very complicated, but it is in fact quite simple as this diagram shows.

double heading switch

With SW2 as shown, SW1 will operate both controllers so both are in forward or both in reverse.

Throw SW2 however and one controller will be in forward, the other in reverse. SW1 will change them over.