The needs of shipping at that time depended on accurate clocks as by these the navigator could work out his position. (Don't ask me how it's complicated!) As long as he had the sun or stars and an accurate timepiece he could get his ship into the intended harbour. Had the clock been inaccurate even by a few minutes this could lead to ships ending up miles of course a rather dangerous experience in Victorian days.
Leith, a small place near Edinburgh became the capital port, putting it to good use, and this small town was a very busy port during Victoria's reign. Not she bothered to visit even though her statue stands at the bottom of Leith Walk. Ships wanted confirmation of the time before sailing so during 1861 Captain Wauchope of the Royal Navy installed a ball on top of Nelson's Column high on Carlton Hill which dropped several feet exactly at one o'clock. To ensure accuracy the nearby Astronomical Observatory next door connected the ball to their accurate clock.
This was fine and ships in harbour at Leith, Granton or Newhaven would have benefited from this simple invention. Hold on, this is Edinburgh, known to the world as 'Auld Reekie' because of the smoke from the many chimneys that belched out daily, even in summer in Edinburgh! Add to this the 'Haar' which descends over the Firth of Forth and soon the watchman on deck of any ship would be unable to see the tower let alone note the ball drop. It should be noted the dropping sphere was a great idea but as the smoke/mist/haar descend two days out of three you would have thought a Naval person wopuld have considered this.
Later that year the answer was found when an 18 pounder cannon was placed on the 'Half Moon Battery' at Edinburgh Castle high above the New Town and daily four men manhandled the gun to ensure it was fired exactly at One. This required a four thousand foot long cable being laid from the Observatory to the castle (by the Royal Navy) and from that time on the gun has blasted out at one each day (bar Sunday) frightening the life out of people in Princes Street below and serving as an excellent tourist attraction.
It was rumoured that during the Great War the gun was fired at the Zeppelin that flew over dropping bombs on the Grassmarket and elsewhere, however it would not have been possible to manhandle that cannon into a suitable firing position, the castle was defenceless, unless a few rifle shots could reach but I doubt that would work.
In 1953 the cannon was replaced by a WW2 25 pounder field gun and moved to it's present position high above Princes Street, here it is clearly seen by ships in port and of course those delightful rich tourists who ought to be heading up the slope and into the castle. Blank ammunition for the 25 pounders ran out and now a more modern 105mm light gun is used to frighten citizens and foreigners alike. The reason for the gun died some time back and today ships guide themselves by highly technical equipment guided by satellites high above the earth. The tourist however need not know this and possibly imagines men on deck listening for the sound, some do indeed look for the explosion a mile or two out at sea.
the gun is fired by an ex-gunner fires the gun with appropriate military pomp a pomp somewhat diminished as today a woman has this onerous responsibility. A woman, firing the one o' clock gun! Is anything sacred today...?