norbert-walter / esp32-nmea2000-obp60

nmea2000 gateway with ESP32
GNU General Public License v2.0
12 stars 5 forks source link

dev20220309: AWD value displayed instead of AWA #22

Closed W-Geronius closed 2 years ago

W-Geronius commented 2 years ago

The windsensor transmits this Apparent Winddirection: image

Webinterface (DATA) of esp correctly displays image

On OBP60 AWA displays as 244 deg in all (one, two, values) formats. This is wrong, should be same as above (-116°)

norbert-walter commented 2 years ago

The value for apparant wind is correct for now. Only the representation differs in the advertisements. It is not exactly defined how apparant wind should be displayed, as 0...360° or as +/-180°.

W-Geronius commented 2 years ago

it's not explicitly defined anywhere that's correct, the majority of commercial products however display 180° +,- or P,S. So it appears to be a convention. In fact I am am not aware any brand displaying 0..360° for AWA. AWD certainly get's displayed as 0...360° as it is a direction relative to true North

norbert-walter commented 2 years ago

The problem is the treatment in the formatter. It gets rad as any angular value and converts that to deg. A case distinction would then have to be inserted in the formatter for AWA. However, the formatter does not know what the value is. He only knows that these are angular values. The software design is inadequate at this point. Actually, the numerical value of AWA is not of interest. A pointer instrument has the better informative value.

norbert-walter commented 2 years ago

I close it.