I think this calculation is already done, but we should considere the drift of the boat.
The fact is to calculate a precise wind angle, at a buoy for example, by combination of the vessel course on the water, on the ground and anemometer sensor.
Information you need are:
- Vessel heading on the water
- Vessel heading and speed on the ground
- Apparent wind angle and speed
The anemometer sensor gives us the apparent wind angle from the bow and the speed.
With GPS tracking we have the ground heading (Course Made Good CMG) and the ground speed.
If we considere that the true heading of the boat (on the water) and CMG are the same, you could calculate the true wind. But most of the time, True Heading and CMG are different due to current, drift. This difference is called Crab-Angle.
So if you want a true wind angle you need to add or substract this crab-angle to your previous calculation.
The True Heading of the boat is given by compas or gyrocompas.
My request concerns 3 NMEA input messages:
- MWV from anemometer
- VTG from GPS
- HDT from gyrocompas