Because of the rich set of sensors, smartphones have demonstrated their versatility in context-aware applications. Already a smartphone can act as a compass, a barometer, and a pedometer, but cannot behave as an anemoscope to measure the wind direction yet, which is useful to many outdoor activities.In this paper, we propose a creative approach to identify the wind direction purely using on-board sensors of a smartphone, i.e., a microphone and an orientation sensor. Our approach relies on the observation that the strength of the noises generated by wind blowing towards the microphone is symmetric to the incident angle of wind, and the symmetrical axis corresponds to the wind direction. Thus, we build an app (called Wind Compass) that lets user rotate a phone while recording acoustic signals to determine the wind direction. Granted that rotation velocities and background noises will affect the accuracy, we utilize noise filtering and symmetric restoring schemes to process the recording and propose a circular auto-convolution algorithm to identify the symmetrical axis. The algorithm is light enough to be implemented in smartphones and robust to modest measurement errors.We devise and implement a Wind Compass prototype on Android platform. We test the performance of Wind Compass under both indoor and outdoor conditions. Our experiments show that under indoor conditions, Wind Compass achieves an average error less than3°in a well-controlled motion and less than10°for free motion. In outdoors, Wind Compass achieves an average error less than20°if the wind stays stable while measuring. |