I think Eric has an interesting point here. In fact, to get the true wind from the apparent wind you need the speed and direction of movement of the boat RELATIVE to the WIND, so you should ideally take into account leeway, and current, although you can argue the current is already taken care of in the apparent wind speed and direction.
The apparent wind direction is, of course, measured relative to the yacht's centreline, which is the HEADING, but this is not necessarily (or usually) the direction of the boat's motion relative to the water, thanks to leeway.
The simplest and traditional approach as suggested by Paul is to measure apparent wind speed and direction, and boat speed, and to ignore leeway, or make a correction for an assumed leeway, which is what we did in India.
In theory, Eric's approach could potentially be more accurate, as it takes leeway into account more or less instantaneously, and leeway is really tricky to measure on board because the angles are so small, and there is so much noise from the boat's motions.
The problem with Eric's approach is that it brings the current into the mix, and it is difficult to take it out again, because you can't tell which part of the COG difference from the heading is due to leeway, and which part due to current. It also requires accurate and simultaneous compass readings
At the moment, we are taking the simple approach, and aiming to record apparent wind speed and direction, and boat speed, as accurately as we can. We are considering ways to measure leeway as well, but it is tricky and we may just make the crude assumption that the boats being tested are all roughly similar types which can be expected to make similar leeway. We might use GPS to try and observe some typical leeway figures when we manage to find some slack water. Then we can correct the results for assumed leeway, or not, as we choose.
We have calculated that provided the wind speed is greater than the boat speed, the change in the true wind angle for leeway of 5 degrees (on the large side) is less than 2.5 degrees, and if the wind speed is twice the boat speed the error is less than 1.53 degrees, so the error created by ignoring leeway is not huge, and about the same as the accuracy of the best wind instruments (we can afford) which is +/- 1.5 degrees.
I could go on... but I won't!