-
Notifications
You must be signed in to change notification settings - Fork 102
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
RS41 Humidity calculation #433
Comments
I think you are correct! I have not looked at this code for almost three years. In the first The interesting question is why the current code gives anything like a realistic value for the relative humidity. Usually, forgetting to zero a variable would have disastrous affects. I looked at some typical values received from an RS41 and the correction applied to I will go find a spare TTGO Lora board in my box of bits and pull the latest code then make the trivial fix. It it all tests OK, I will submit the update. |
Tested today and created pull request 445. It took far longer than expected to test this because I kept getting unrelated TG1WDT_SYS_RESET task timer problems. I had to comment out the u8x8->begin() in display.cpp just to stop it resetting every second. At first, I thought it was a problem with my TTGO hardware but I loaded a very old copy of the software from three years ago and the hardware was fine. On the test today, there was very little difference to the relative humidity value. I tracked it for a range of relative humidity results and the following is what I logged (for the very few of those who are interested). CpSum is the value of sum between the two relative humidity corrections. HR is the calculation with sum set to zero and old HR is the previous result without sum set to zero. As you can see, there is very little difference. HUMIDITY TEST: CpSum 0.015037, sum 1.643079, RH 2.835819, oldRH 2.861772 |
I already merged this (to the devel branch... will propagate to the main branch when I create the next version) |
In RX_FSK/src/RS41.cpp, there's code based on https://github.com/einergehtnochrein/ra-firmware
Around line 648 the code is:
However, in the original version of the code https://github.com/einergehtnochrein/ra-firmware/blob/master/src/rs41/rs41metrology.c at line 271, sum is set to 0 between the two loops, but that seems to be missing here.
The text was updated successfully, but these errors were encountered: