Skip to content
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

Possible regression on fix for frozen time in datafile on error #1617

Closed
caco3 opened this issue Dec 18, 2022 · 3 comments
Closed

Possible regression on fix for frozen time in datafile on error #1617

caco3 opened this issue Dec 18, 2022 · 3 comments

Comments

@caco3
Copy link
Collaborator

caco3 commented Dec 18, 2022

Issue

@jomjol I saw your change in 3d2fd2f#diff-bb975d46862cb17ba3f653bc43af5272494a4d02052ec9c164355e9cc6f16f47R710

// NUMBERS[j]->lastvalue = imagetime; // must only be set in case of good value !!! --> move to the end

I changed that some days ago as a bug fix for #1534

Where you aware of this? (I did not test after your change)

@jomjol
Copy link
Owner

jomjol commented Dec 18, 2022

No - I was not aware for you change and wondering, why this was changed. The problem with your change is in line #838 same file:

        double difference = difftime(imagetime, NUMBERS[j]->lastvalue);      // in Sekunden
        difference /= 60;  
        NUMBERS[j]->FlowRateAct = (NUMBERS[j]->Value - NUMBERS[j]->PreValue) / difference;

This is then always zero and in case of a RateChange criteria (which I use) the rate is "inf", due to division by zero. Therefore I have moved this code.

@caco3
Copy link
Collaborator Author

caco3 commented Dec 18, 2022

Ok, then I will try if #1532 still is an issue after your changes

@caco3
Copy link
Collaborator Author

caco3 commented Dec 18, 2022

This seems to be still ok in the latest rolling (I set the pre-value to far to low to trigger a rate error):

2022-12-18T23:19:46+0100,main,656.3,656.3,656.3,nan,0.0,no error,6.1,5.1,5.9,3.2
2022-12-18T23:20:46+0100,main,656.3,656.3,656.3,nan,0.0,no error,6.0,5.1,5.8,3.2
2022-12-18T23:21:47+0100,main,656.3,656.3,656.3,nan,0.0,no error,6.0,5.2,5.9,3.2
2022-12-18T23:22:46+0100,main,656.3,656.3,656.3,nan,0.0,no error,6.0,5.2,6.0,3.2
2022-12-18T23:23:47+0100,main,656.3,656.3,656.3,nan,0.0,no error,6.0,5.1,5.9,3.2
# => Set Pre Value too low
2022-12-18T23:24:47+0100,main,656.3,,500.000000,,0.0,Rate too high - Read: 656.3 - Pre: 500.0 - Rate: 156.3,6.0,5.2,6.0,3.2
2022-12-18T23:25:46+0100,main,656.3,,500.000000,,0.0,Rate too high - Read: 656.3 - Pre: 500.0 - Rate: 156.3,6.0,5.2,5.9,3.2
2022-12-18T23:26:46+0100,main,656.3,,500.000000,,0.0,Rate too high - Read: 656.3 - Pre: 500.0 - Rate: 156.3,6.0,5.2,6.1,3.2
2022-12-18T23:27:46+0100,main,656.3,,500.000000,,0.0,Rate too high - Read: 656.3 - Pre: 500.0 - Rate: 156.3,6.0,5.2,6.0,3.2
2022-12-18T23:28:46+0100,main,656.3,,500.000000,,0.0,Rate too high - Read: 656.3 - Pre: 500.0 - Rate: 156.3,6.0,5.2,6.0,3.2
# Restored Pre Value
2022-12-18T23:29:46+0100,main,656.3,656.3,656.3,inf,0.0,no error,6.0,5.2,6.1,3.2
2022-12-18T23:30:46+0100,main,656.3,656.3,656.3,nan,0.0,no error,6.0,5.2,6.1,3.2

So there seems to be no regression!

@caco3 caco3 closed this as completed Dec 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants