Lighting candles in Jerusalem 40 minutes before sunset

Various reasons for this ancient minhag have been proposed. I have heard that 40 minutes allow one to watch the candles being lit before walking to the kotel or that 40 minutes is 30 minutes adjusted for the summer, among others. What we suggest is that 40 minutes is the earliest uniform time that throughout the year always occurs after plag ha-minha. That would be most logical, were it only true. What is shown that a long-forgotten method of calculation of what we call the position of the Magen Avraham makes 40 minutes precise. This method was certainly used in the 18th and 19th centuries. It was discarded because of a major problem that plagued it. What is demonstrated is how to solve the problem with only minor adjustments without discarding the method in toto. Colloquially, discarding the bathwater, not the baby.