Accident prevention on board ship at sea and in port