Having been born and raised in Edinburgh, I am well familiar with the "One O'clock gun. This is a very old tradition. Years ago, when few people had clocks or watches, they needed to find out what time it was, especially if they couldn't see the Tron Church clock.
Later on, the gun was fired, to allow people to set their clocks to the correct time, or are at least check them out.
During the two world wars, the practice was stopped, due to the shock some military men, home from the front, would have, when it went off.
Learn to like it, and think of the history of the gun. It's not a shell they fire, but a blank they use. Why don't you visit the Castle, and see them do it, I am sure someone there will give you any information about the firing.
I still miss the Castle, having played there, most days, when I grew up.