The master or officer in command of a ship on a voyage or the pilot in command of an aircraft on a flight is justified in using and ordering the use of force for the purpose of maintaining good order and discipline on board his or her ship or aircraft if he or she believes on reasonable grounds that the use of force is necessary, and if the force used is reasonable in the circumstances.