Two car garages have a common gate which needs to open automatically

Two car garages have a common gate which needs to open automatically when a car enters either of the garages or cars enter both. A circuit, that resembles this situation using diodes for this situation.

As, car enters in the gate, any one or both are opened. The device is shown below: