Skip to content

Rain calculation #5

Open
Open
@Hserfontein

Description

@Hserfontein

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions