Captain and Chief officer are overlapping terms, formal or informal, for the commander of a military unit, the commander of a ship, airplane, spacecraft, or other vessel, or the commander of a port, fire department or police department, election precinct, etc. Captain is a military rank in armies, navies, coast guards, etc., typically at the level of an officer commanding a company of infantry, a ship, or a battery of artillery, or similar distinct unit. Chief officer may be used interchangeably with captain in some situations, as when a Captain-ranked Navy officer is serving as the commander of a ship. The terms also may be used as an informal or honorary title for persons in similar commanding roles.