(f) any movement or other activity of a ship, submarine or aircraft if the movement or other activity is carried out for the purpose of public safety, law enforcement or national security or for the exercise of Canadian sovereignty and

(i) the ship, submarine or aircraft is owned or operated by or on behalf of Her Majesty in right of Canada or by a foreign military force acting in cooperation with, or under the command or control of, the Canadian Forces; or

(ii) the movement or other activity is carried out for the purpose of an emergency response under the direction, command or control of the Canadian Coast Guard;

(g) marine scientific research activities that are carried out or sponsored by a foreign government and in respect of which that government has received the consent of the Minister of Foreign Affairs under paragraph 3(2)(c) of the Coasting Trade Act, if the activities are carried out in a manner that complies with the terms and conditions of the consent; and