Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wind speed calculation doesn't match data sheet #16

Open
daviesian opened this issue Oct 5, 2022 · 0 comments
Open

Wind speed calculation doesn't match data sheet #16

daviesian opened this issue Oct 5, 2022 · 0 comments

Comments

@daviesian
Copy link

The data sheet for the anemometer says that "A wind speed of 2.4km/h causes the switch to close once per second", and this library quotes the data sheet in this comment. However, the actual calculation performed doesn't match this specification. The current calculation:

ANE_RADIUS = 7  # Radius from center to the center of a cup, in CM
ANE_CIRCUMFERENCE = ANE_RADIUS * 2 * math.pi
ANE_FACTOR = 2.18  # Anemometer factor

...

wind_hz /= 2.0  # Two pulses per rotation
wind_cms = wind_hz * ANE_CIRCUMFERENCE * ANE_FACTOR
self.wind_speed = wind_cms / 100.0

Nowhere in the data sheet does it say that there are two pulses per rotation, but let's assume that you've worked that out by experimenting with the hardware.

If a wind speed of 2.4km/h gives one pulse per second, and each rotation gives two pulses, a wind speed of 4.8 km/h would result in two pulses per second, so wind_hz == 1. Let's assume that ANE_CIRCUMFERENCE is correct at $7\times2\pi = 44$ cm, and note that 4.8 km/h is 133 cm/s. Then:

$$ 133 = 1 \times 44 \times ANE\_FACTOR $$

$$ ANE\_FACTOR=\frac{133}{44}=3.02 $$

So, have you experimentally verified that the data sheet is wrong, in which case the comment in the code should probably be updated, or is the ANE_FACTOR (or ANE_RADIUS) constant wrong? I would measure the radius myself, only the kit is now a long way up on the roof of my garage :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant