A very interesting artefact! It is of course a
red ensign used by the Royal Navy and the merchant navy, also called a 'red duster'. A crown used on a
union flag signified that it was used by a British consulate. I don't know if that applies when it was
part of a
red ensign. Prior to 1801, the union flag and hence also the
red ensign did not have the St. Patrick's
cross - the diagonal
red cross - so the dating of this flag is not long after the change, if that has any significance.
The flag looks as if it has been in a battle, but that may just be the result of age. I don't know of any naval battles on 16th April 1804, although
Britain and
Spain were at war in 1804 (although it didn't start officially until October there
had been attacks on
Spanish ships before then). Maybe try the National
Maritime Museum in Greenwich.