You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The wind direction SW gives U8:8 and Enum:8, but shows direction North
The wind direction W gives U8:14 and Enum:8 but shows direction North
All other directions mappings looks to be correct.
The text was updated successfully, but these errors were encountered:
The resistance of the direction west is 120K (see elektor weather station mark1, page 30) which gives Dir-ADC3870, u8val 15 and enumval 8, but will not pass if(u8_dir < 15){ WindDir = obj->WindDirLUT[u8_dir]; changed it to if(u8_dir < 16){ WindDir = obj->WindDirLUT[u8_dir]; } and now it gives enum value 6, which is west
}
Hello.
I found some faults in the WindDirSensor.cpp
After the correction the sensor provides plausible values in all 3 channels
From winddir you can get only the 10s average (see line 230 and 237) the switch case instraction is wrong.
The calculation of average_60s is wrong (line 178). When you add 6 values then you must divide by 6 not by 10.
The calculation of average_3600s is also wrong. You have to add all 60 values (line198) and then divide by 60 (line 202).
Regards
Thomas
The wind direction SW gives U8:8 and Enum:8, but shows direction North
The wind direction W gives U8:14 and Enum:8 but shows direction North
All other directions mappings looks to be correct.
The text was updated successfully, but these errors were encountered: