Meaning of "Swing ship"

The evolution of swinging a ship’s head through several headings to obtain compass errors for the purpose of making a deviation table.

Swing ship Meaning of