Приветствую.
В описании Seatalk на тему определения курса есть следующая формула:
89 U2 VW XY 2Z Compass heading sent by ST40 compass instrument
(it is read as a compass heading by the ST1000(+) or ST2000(+) autopilot)
Compass heading in degrees:
The two lower bits of U * 90 +
the six lower bits of VW * 2 +
the two higher bits of U / 2 =
(U & 0x3) * 90 + (VW & 0x3F) * 2 + (U & 0xC) / 2
Locked stear reference (only send by the ST40 compass):
The two higher bits of V * 90 + XY / 2
Z & 0x2 = 0 : St40 in Standby mode
Z & 0x2 = 2 : St40 in Locked stear mode
Corresponding NMEA sentences: HDM, HDG, HDT, VHW
Не могу понять, что это за U и VW. Может кто с этим разбирался?
Composition of Messages
[font="arial, helvetica, sans-serif;"][color=rgb(0,0,0);background-color:rgb(221,221,204);]Each datagram contains between 3 and 18 characters: [/color][/font]89 U2 VW XY 2Z
[font="arial, helvetica, sans-serif;font-size:12px;"]Type of command (the only byte with the command-bit set) | 89[/font]
[font="arial, helvetica, sans-serif;"]Attribute Character, specifying the total length of the datagram in the least significant nibble: | U2[/font]
[font="arial, helvetica, sans-serif;"] Most significant 4 bits: 0 or part of a data value | U
Least significant 4 bits: Number of additional data bytes = n => | 2
Total length of datagram = 3 + n characters | 5[/font]
[font="arial, helvetica, sans-serif;"]First, mandatory data byte | VW[/font]
[font="arial, helvetica, sans-serif;"]3 - 18 optional, additional data bytes | XY 2Z[/font]