True wind on a moving platform
Originally developed for ships, the required parameters include the vessels course over the ground, speed over the ground, heading, any anemometer offset and observed wind speed and direction relative to the vessel. Note that the vessels heading (indicated by compass) and course over the ground (as measured by GPS track) may well be different due to the effects of tide and leeway.
The technique can also be applied to moving land platforms but in this case the course over the ground and heading values will almost certainly be the same. All calculations are performed in the mathematical coordinate system which has an angle of zero degrees on the positive x-axis with angles increasing in a counterclockwise direction. Each vector direction, originally defined using the meteorological conventions is converted to mathematical coordinates prior to other calculations. Primes (') denote values in math coordinates.
The direction of the observed wind in math coordinates A is:
where h is the vessels heading, R the anemometer offset (if any) from zero and P the platform relative observed wind direction.
The course over the ground C of the vessel in math coordinates is:
The true wind is then calculated by summing the vector components of the observed wind and vessels motion:
where positive Tu and Tv are eastwards and northwards components of the true wind in the earth reference frame.
The true wind speed |T| and direction Tθ can then be calculated:
NOTE: The 270° converts the value of the atan operation to a direction from which the wind is blowing (meteorological convention) in the Earth coordinate system. For the atan operation to return a correct angle, the atan function must have a range from -180° to 180° to determine the vector's trigonometric quadrant (e.g., Python/Excel atan2 function). Also, any program must have a check to avoid dividing by zero.