Gunnery Check = 1d20 + the gunner’s base attack bonus or the gunner’s ranks in the Piloting skill + the gunner’s Dexterity modifier + bonuses from computer systems + bonuses from the captain and science officers + range penalty
Gunnery Check
Attempt a gunnery check for each weapon fired against a target (except for linked weapons, which are resolved using one action and a single gunnery check; see the sidebar on page 301).
Source
Core Rulebook pg. 320