One of the first bits of navigational math taught in nautical science is vector math. An angle deck carrier will have a fixed anemometer forward of the island to measure the relative wind, but will also use other equipment (as below) to determine the relative wind.
The vector 'ER' represents the ship's motion.
The vector 'RW' represents the relative wind.
The vector 'EW' represents the true wind.
Given any two, you can graphically solve for the third.
Back in the old pre-GPS days, a similar equation utilizing ER, RM, and EM was first utilized to determine the ship's motion first taking into account set & drift (direction and speed of the underlying sea current).
Sea room permitting, the ship's course and speed is normally set to provide the relative wind down the angle deck at 30+ knots.