Measuring wind speed and direction from pitot tube data

hi i am using pixhawk 4 on my fixed wing UAV. i noticed in the qgroundcontrol telemetry file after flight that there is a wind speed and direction column data at the end of the csv file. i was wondering is this accurate and reliable data? how is it calculated? what reference is the wind direction measured from in this data?

i know that wind vector is the vector difference of ground velocity vector and the true airspeed vector. is this wind data already computed based on that mathematics?

any help on this would be appreciated.

Thanks,

Hi,
For a standard fixed wing vehicle the wind vector is calculated from airspeed and synthetic sideslip measurements using an Extended Kalman Filter.
Simplified: The pitot tube measures airspeed, that minus ground speed (GPS) is the wind in that direction.
Here is some documentation