The obvious way to convert the wind direction into NSWE is with a nice long switch statement. But that seemed very long winded and boring – and this is my project, I am allowed to find a more interesting way. Thanks to mathsisfun.com for their excellent content on this subject.