Convert a Point of the Compass to Degrees
Ruby, 118 106
Thanks to Martin Büttner for 12 bytes saved.
This is currently the same length regardless of whether it's a function or a program.
lambda function
-&gt;s{n=4
d=0,0
s.chars{|e|c=&quot;SWNE&quot;.index e
c ?d[c%2]+=c/2*2*n-n :n=1}
(Complex(*d).arg*5.1).round%32*11.25}

program
n=4
d=0,0
gets.chars{|e|c=&quot;SWNE&quot;.index e
c ?d[c%2]+=c/2*2*n-n :n=1}
p (Complex(*d).arg*5.1).round%32*11.25

This is a cartesian walk through the points. The characters NSEW add or subtract 4 from the x and y coordinates stored in d[]. After a b (or any symbol other than NSEW) is encountered, this is reduced to 1.
The x and y data is then treated as a complex number to extract the angular argument. This is multiplied by 16/PI=5.1 . Although there are some geometrical errors in the approach, rounding this angle is sufficient to give the correct number -15..+16. Modulo is used to correct this to 0..31 (in Ruby % always returns positive.) Finally the result is multiplied by 11.25.