What does "forestaff" mean?

Forestaff: An instrument formerly used at sea for taking the altitudes of heavenly bodies, now superseded by the sextant; -- called also cross- staff. Brande & C.

Sources