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
What's the right way to encode Peukert ? Or is this a bug in the decoding ?
I tried to find out where it might be in decoding, but could not see, the offset seems to be mentioned, and I assume it is applied, but perhaps not ?
0xE1 = 225
225*0.002 = 0.45 which matches the output seen.
There must be an offset because Peukert only goes from 1 - 1.506, and 1/0.002 = 500 which is > uint8_t ?
The text was updated successfully, but these errors were encountered:
keesverruijt
changed the title
Is Puerket decoding right ?
Is Peukert decoding right ?
Jun 10, 2023
Hi, I haven't analysed this fully, but I have changed your 'Puekret' to 'Peukert' (the poor fellow deserves his name written right, at least I think?) (See https://en.wikipedia.org/wiki/Peukert%27s_law )
(Funnily enough, my editor also 'corrected' me in auto-correcting Peukert to something else...)
canboat/analyzer/fieldtype.h
Line 836 in 357f0c9
Take Peukert 1.25 (typical lead acid)
As per https://canboat.github.io/canboat/canboat.html
Range is 1 - 1.506
1 bit = 0.002
Offset = 500
1.25/0.002 = 625
625-500 = 125 = 0x7D
analyse produces
2023-05-07-09:12:54.231 6 26 255 127513 Battery Configuration Status: Instance = 1; Battery Type = AGM; Supports Equalization = No; Reserved = 00; Nominal Voltage = 12V; Chemistry = Pb (Lead); Capacity = 0 Ah; Temperature Coefficient = 5 %; Peukert Exponent = 0.250; Charge Efficiency Factor = 95 %
I dont think its a signed int vs unsigned int thing.
1.45/0.002 = 725
725-500 = 225 = 0xE1
2023-05-07-09:17:57.662 6 26 255 127513 Battery Configuration Status: Instance = 1; Battery Type = AGM; Supports Equalization = No; Reserved = 00; Nominal Voltage = 12V; Chemistry = Pb (Lead); Capacity = 0 Ah; Temperature Coefficient = 5 %; Peukert Exponent = 0.450; Charge Efficiency Factor = 95 %
What's the right way to encode Peukert ? Or is this a bug in the decoding ?
I tried to find out where it might be in decoding, but could not see, the offset seems to be mentioned, and I assume it is applied, but perhaps not ?
0xE1 = 225
225*0.002 = 0.45 which matches the output seen.
There must be an offset because Peukert only goes from 1 - 1.506, and 1/0.002 = 500 which is > uint8_t ?
The text was updated successfully, but these errors were encountered: