In addition to the other replies lighthouses rotate a specific number of times per minute so by counting the rotation ships not only know that there are dangerous rocks around, but also the specific location of the lighthouse and the nature of the danger.
Latest Answers