git clone https://github.com/psiphi75/beaglebone-windvanecd beaglebone-windvanenpm install .
All the constants are described in index.js.
I use the HMC5883L compass, as available from SeeedStudio. It comes with Grove connector, so connects directly with the BeagleBone Green, however, you can also connect this to the BeagleBone Black.
The anemometer has a range from 0.4 (at rest) to 2V (high wind) and presumably it's linear in between. The maximum the BeagleBone Black/Green can handle for an input voltage is 1.8V. This means that you will need to create a voltage divider to reduce the voltage. I used two 1 k-Ohm resistors. Below is a schematic of the connected anemometer. One issue I found with this anemometer is that it can take a short while (one or two seconds) to register an increase in wind speed, and a very long time (around 7 to 10 seconds) to register a decrease in wind speed.
Connections to BeagleBone: