How can avionics detect tailwind?
This can be sensed by means of either an INS or GPS to determine a ground velocity and both the data from the pitot static system and a magnetometer to determine the true air velocity.  The local wind velocity is the difference between the ground velocity and the true air velocity.