Ships usually have inertial measurement units for heading and attitude. Even smaller boats have IMUs for better autopilot performance, but vessels of this size have sensors precise enough for strap-down navigation with little enough drift to bridge potential GPS outages.