Hello,
I have been pondering why my total log value shown in my ST1 log gauge and Signal K are not identical.
The gauge shows 11451NM and SignalK about half less.
The gauge is Raymarine ST60+, attached on the boat year 2006.
Plugged the STALK_read.py today and the total log datagram (25h) was stable and its value was:
25h 14h 4Ch BFh 00h 00h 00h
According to Thomas Knaufs "SeaTalk-2002.pdf" the last 3 NULLs are the trip value, and NULLs are ok as the boat was stationary.
The document states that the total log is calculated as: "total= (XX+YY*256+Z* 4096)/ 10 [max=104857.5] nautical miles".
Putting the values in: XX =4Ch =76d, YY =BFh =191d, and Z =10h =16d we get
(76 +191*256 +16 *4096) /10 =11450,8 and that is exactly what the ST60+ gauge shows.
So I dug into SignalK and found this page: https://github.com/SignalK/nmea0183-sign...lk/0x25.js
In the file "0x25.js" there is the calculation for the total log value.
It seems first OK, except that the value Z is first bitwise anded by value F0h (14h becomes 10h) which is correct, but then it is shifted 4 bits to the right (10h becomes 01h).
So is the shift by 4 to the right correct because that corrupts the total log value?
But honestly I do not even know for sure that the "0x25.js" is used in SignalK...
with best regards to all,
tjm
I have been pondering why my total log value shown in my ST1 log gauge and Signal K are not identical.
The gauge shows 11451NM and SignalK about half less.
The gauge is Raymarine ST60+, attached on the boat year 2006.
Plugged the STALK_read.py today and the total log datagram (25h) was stable and its value was:
25h 14h 4Ch BFh 00h 00h 00h
According to Thomas Knaufs "SeaTalk-2002.pdf" the last 3 NULLs are the trip value, and NULLs are ok as the boat was stationary.
The document states that the total log is calculated as: "total= (XX+YY*256+Z* 4096)/ 10 [max=104857.5] nautical miles".
Putting the values in: XX =4Ch =76d, YY =BFh =191d, and Z =10h =16d we get
(76 +191*256 +16 *4096) /10 =11450,8 and that is exactly what the ST60+ gauge shows.
So I dug into SignalK and found this page: https://github.com/SignalK/nmea0183-sign...lk/0x25.js
In the file "0x25.js" there is the calculation for the total log value.
It seems first OK, except that the value Z is first bitwise anded by value F0h (14h becomes 10h) which is correct, but then it is shifted 4 bits to the right (10h becomes 01h).
So is the shift by 4 to the right correct because that corrupts the total log value?
But honestly I do not even know for sure that the "0x25.js" is used in SignalK...
with best regards to all,
tjm