Hi there,
I am NSW Australia based.
Napoleon was having a great deal of difficulty around this time, his military were "invading" the Iberian Peninsula.
The English were supporting the Spanish against Napoleon....
Land Forces led by the Irish chap who became known as the Duke of Wellington were victorious at the Battle of Waterloo.
(Battle of Trafalgar had given the English the control of the seas, including of course The Rock of Gibraltar)
Your chap could have been in any of the regiments of foot serving there.... Some of those regiments were on tour in NSW in the years after that, as garrison forces over the convicts, and also as the clerical/admin staff supporting the various Governors appointed by Whitehall.
There are military records to follow up on my thoughts re service in those regiments of foot. Usually held at the UK National Archives (Kew) ....
Many of the regiments of foot had their own Masonic Lodge Branches, and as I understand it, some branches were established in NSW as early as Gov Bligh's "reign" and were encouraged to blossom during Gov Macquarie's "reign". These "reigns" cover the both the Battle of Trafalgar and the Battle of Waterloo. I have forebears who settled in NSW with long standing navy or army careers. One line had served under Nelson. One line had served under Wellington. I have had a quick look, my Navy lot don't mention any Masonic connections, but the Army lot do mention that. They were contributing to Masonic funds to provide schooling for the orphans of their army fallen. I must mention though, that those funds were expended at private schooling in Sydney Town NSW in the 1820's and 30's ....
Hopefully there will be UK based RChatters along soon, perhaps the time zone differences is delaying their help.
Cheers, JM