An officer responsible for tasks such as navigation that take place on a ship's main deck.

The term originates from the military title used on navy vessels but came in use for all sorts of ships.