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

Rain calculation #5

Open
Hserfontein opened this issue Feb 12, 2017 · 2 comments
Open

Rain calculation #5

Hserfontein opened this issue Feb 12, 2017 · 2 comments

Comments

@Hserfontein
Copy link

Hi Rob,
I agree with afeno, this is an excellent project and perfectly documented :)
I would like to add my experience to your project. I did some vigorous testing on the rain calculation and found that a factor of "*25.4/1000.0" (instead of 25.0), yields a 100% accurate result compared to the Oregon base station.
The calculations should therefor read as follows:

void rain(){
rainTotal = float(((nyb(18)*100000)+(nyb(17)*10000)+(nyb(16)*1000)+(nyb(15)*100)+(nyb(14)*10)+nyb(13))*25.4/1000.0);
//Serial.println((nyb(18)*100000)+(nyb(17)*10000)+(nyb(16)*1000)+(nyb(15)*100)+(nyb(14)*10)+nyb(13),DEC);
rainRate = float(((nyb(8)*10000)+(nyb(9)*1000)+(nyb(10)*100)+(nyb(11)*10)+nyb(12))*25.4/1000.0);
//Serial.println((nyb(8)*10000)+(nyb(9)*1000)+(nyb(10)*100)+(nyb(11)*10)+nyb(12),DEC);

I am not sure, but I think it has to do with the fact that there are 25.4 mm in an inch.

Regards,
Hennie

@robwlakes
Copy link
Owner

robwlakes commented Feb 12, 2017 via email

@Hserfontein
Copy link
Author

Hserfontein commented Feb 14, 2017 via email

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

2 participants