I recently figured out a way to use GPS 3-dimensional velocity data and the direction-cosine-matrix information in real time as a plane flies along, to estimate the 3 dimensional wind vector, and the 3 dimensional air speed vector, without a pitot tube or any other sort of airspeed sensor. It has been tested, and it works quite well.
The core of the theory for estimating wind speed is described here.
The basic idea is to first estimate the airspeed vector by relying on the fact that the determinant of the direction cosine matrix is equal to one. Therefore, when a plane rotates, the magnitude of the change in the GPS velocity is equal to the magnitude of the airspeed, times the magnitude of the change of the appropriate column of the direction cosine matrix. Then, once you know the airspeed vector, you can compute wind vector. Built into the algorithm is an immunity to any yaw error in the matrix.
The algorithm only works when the plane is rotating around the yaw or pitch axis, but not much rotation is needed, and once the wind vector is measured, it can be locked in during straight flights, and used to compute the airspeed even if the plane no longer yaws or pitches. However, when the plane is yawing and pitching, the algorithm produces a steady stream of up-to-date wind estimates, so it will work in situations (like the field where I fly) in which the wind varies in time and space.
As a bonus, the algorithm includes the vertical component of the wind, which of course is the slope or thermal lift, so we plan to develop a lift-seeking algorithm for sailplanes.
I want to thank Peter Hollands, who contributed a great deal to the development of the algorithm. He implemented the wind-compensation portion of the computations, made a lot of test flights, and wrote scripts to convert the raw telemetry to spreadsheets for analysis, and to kmz files for display in Google Earth.
Here is a jpg file, a spreadsheet, and a Goolge Earth kmz file, from one of Peter's flights.
Note in the kmz file that Peter has a plane icon to indicate which way the plane is heading, as determined by the direction-cosine matrix. Note that there is a very clear indication of the crab angle of the plane, so the firmware knows which way the plane is pointing, which way it is moving and which way the wind is blowing.
Peter's tests were successful, he was able to fly comfortably in heavy winds, including landing the plane in RTL mode.
Wind compensation is presently an option in the MatrixPilot code under the Source tab in the project repository, and will be available in the next release of the download code.
Once again, thanks to Peter Hollands and the rest of the UAV DevBoard team.