Wind direction sensor with RuuviTag

Hi! I was thinking about creating a wind direction sensor with RuuviTag utilizing RuuviTag’s three dimensional accelerometer. The basic idea is to place RuuviTag in a 90 degree angle toward earth, so that the gravitational force of earth is divided into X and Y accelerations. Then the RuuviTag would be linked to a part that turns according to wind direction through gogwheels. Then, by turning, different combinations off X and Y measuruments could be linked to specified wind directions.

Has anyone tinkered about or created such project before?

I could really use some help in making the measurements readable with Raspberry Pi.

Thanks, Oliver