I seem to remember that in the RN, one salutes when in uniform, raises one's headdress when in civilian clothes but salutes when in mufti but not wearing a titfer. Also works when boarding or leaving HM Ships as you are saluting the Quarterdeck where the effigy of the Virgin used to be displayed (pre reformation obviously!).
Mog