Get the distance to the finish:
On current leg:
Using either distance projected onto straigh line between previous and next mark or
The distance projected onto the wind vector passing through the next mark
On the following legs: The direct distance between the marks