Two hotwire wind sensors ?
koal01
Concerning direction, not obvious to get it properly i know.
Anyway thank you for the code that allows to handle mutliple hotwires.
|
|
Howard Dutton
On Wed, May 19, 2021 at 01:17 PM, koal01 wrote:
A second question. If the test of adding two Hotwires improves the accuracy do you think it would be possible in the future for OCS to handle 4 hotwires so we can increase accuracy and get the right direction of the wind ?Seems to me wind direction with this is impossible. Adding more would be follow the same pattern, trivial.
|
|
koal01
So great and so nice ! I’m going to order a second sensor and test the changes. I was not sure this feature was possible so I prefered waiting. May I ask a question ? I don’t know the modern device library but I was wondering since we have two axis detected if a kind of direction of the wind is possible ? For example in my installation the first Hotwire is oriented east-west and the second will be oriented north-south. For instance if the wind is coming from west since the value is given by Hotwire1 can OCS display a kind of suggestion « east-west » just near the wind speed index in the weather panel. A second question. If the test of adding two Hotwires improves the accuracy do you think it would be possible in the future for OCS to handle 4 hotwires so we can increase accuracy and get the right direction of the wind ? I’m going to order the component, upgrade soft and hardware and let you know !
|
|
Howard Dutton
Guess the following should work. It takes the higher windspeed from the two devices and returns that... // -----------------------------------------------------------------------------------------------------------------
// gets windspeed in kph
// for the Modern Devices wind sensor, https://moderndevice.com/product/wind-sensor-rev-p/
#define HotWire1Pin A6 // wind sensor analog pin hooked up to Wind P sensor "OUT" pin (primary)
#define HotWire2Pin OFF // wind sensor analog pin hooked up to Wind P sensor "OUT" pin (secondary)
// return (invalid) if not implemented or if there's an error
double weatherWindspeed() {
int hw1ADU;
int hw2ADU;
if (!windspeedGood) return (invalid);
hw1ADU = analogRead(HotWire1Pin);
if (HotWire2Pin != OFF) hw2ADU = analogRead(HotWire2Pin); else hw2ADU = hw1ADU;
double windMPH1 = pow((((float)hw1ADU - 264.0) / 85.6814), 3.36814);
if (isnan(windMPH1)) windMPH1 = 0;
double windKPH1 = windMPH1 * 1.60934;
double windMPH2 = pow((((float)hw2ADU - 264.0) / 85.6814), 3.36814);
if (isnan(windMPH2)) windMPH2 = 0;
double windKPH2 = windMPH2 * 1.60934;
if (windKPH2 > windKPH1) windKPH1 = windKPH2;
if (windKPH1 < 0 || windKPH1 > 350) windKPH1 = invalid;
return (windKPH1);
}
bool initWindspeed() {
return true;
}
|
|
koal01
Hi Howard,
Experimenting the modern device hotwire sensor which is actually oriented east-west in my installation i was wondering if adding a second one north-south would be possible in OCS environnement. We know that the device has the drawback of flow directions and i saw wind sensor flow projects using multiple sensors. https://miniwindtunnel.wordpress.com/tutorial/ Aflter more than a year experimenting this sensor, i've learnt how to use it as a warning sensor and i like it since it is reliable in this specific use. Now i'm wondering how improving the accuracy of this sensor and i would suggest to test this upgrade and report. Wind measurement is important in weather conditions, a clear night with all sensors ok but a crazy wind should result in an unsafe general conditions, that's why i would like to work on that. Thank you
|
|