Hi,
I'd like to have correct formula to calculate speed and direction wind from data 3D vector Aircraft.Wind in 3 components (U, V, W) or XYZ.
I managed to calculate speed = _wind_speed = sqrt(pow(_wind.x,2.0) + pow(_wind.y,2.0) + pow(_wind.z,2.0));
But to calculate direction, I don't found for the moment, I tried this formula : _wind_dir = (atan2(_wind.y, _wind.x)*180.0) / M_PI;
Regards,
Chris.