Alright. The leaf wetness sensor is a completely different animal, I think it can be ignored. If anything, in air, the temps are inversely proportional WRT humidity because of natural reasons, not because they are mathematically related. Making a lookup table as you hinted is a workable solution. Based on that you could even invent a suitable approximation formula. I might try to convert the raw value and the sensor specs to invent something. Sadly all they provide is a printed curve, no numerical values. I'll try to dig for more info or maybe MCU C code later, I'm sure capacitive sensors have working formulas for them since long ago.
On Wednesday, April 3, 2019 at 3:02:10 PM UTC+2, [email protected] wrote: > > On Wednesday, 3 April 2019 09:37:32 UTC-3, kobuki wrote: >> >> *Temperature and humidity are independent values.* *There is no direct >> relation between the two*. >> > > Kobuki, > > I know, you mentioned that before. :-) > > I work with the following data: > 1. Raw humidity values as received in the weewx-rtldavis driver. Not sure > about the hi-bits because one byte always had value 0x85; for now I assume > the right nibble (5) are the hi-bit part of the raw humidity value. > 2. Values received from the Vantage driver, both humidity and outTemp > values. > > We know the Davis console and the rtldavis.go program will receive the > same radio-signals from the ISS, so the raw message codes for both are > equal. > > We then take a group of samples with the same raw humidity value. > They all should have the same humidity % value as presented by the Davis > console, which is read by the Vantage driver. Shouldn't they? > > But, they have not! > > For samples with all the same raw humidity value, the samples with the > higher percentage presented by the Vantage driver have also a higher > temperature value. > That's why I presume a relation between the two. > > Luc > > PS. I noticed the same behaviour for the soil-moisture and leaf-wetness > sensors. By experiment I detected norm factors to compensate for > temperature influences. > See the code below: > > # soil moisture potential > # Lookup soil moisture potential in SM_MAP > norm_fact = 0.009 # Normalize potential_raw > soil_moisture = lookup_potential( > "soil_moisture", norm_fact, > potential_raw, temp_c, SM_MAP) > > > # leaf wetness potential > # Lookup leaf wetness potential in LW_MAP > norm_fact = 0.0 # Do not normalize > potential_raw > leaf_wetness = lookup_potential( > "leaf_wetness", norm_fact, > potential_raw, temp_c, LW_MAP) > > >
