-
Notifications
You must be signed in to change notification settings - Fork 34
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
True Wind Calculation #75
Comments
I agree... |
OK The conversions also seem to be wrong.
So, there is a confusion of (see wellenvogel/avnav#367)
|
N2K-0183-ConversionFor NMEA0183 sentences and PGNs see wellenvogel/avnav#367. AFAIK there are only 2 possible direct conversions between N2K and 0183.
There is no PGN containing TWD, it must be calculated as TWD=TWA+HDT to be able to send There are no NMEA0183 sentences for ground wind. I suspect that many of the (expensive) devices out there do not exactly follow these specs and send/receive wrong wind data or process them incorrectly. It's a mess. And then you wonder why your $$$ instruments display funny numbers. |
To make the converter work correctly with systems that send wrong wind data (i.e. true wind in 130306-True_North [ground wind]) it would make sense to have a config option to select how the data in PGN130306 is interpreted. Like 2 pairs of dropdown boxes N2K <-> 0183 with the following options
Then you could select something like
which tell the GW how to translate the data. This way you can tell the GW to do the conversion right even if your devices on the bus send the data with the wrong reference flags. |
I started to implement the proposed mappings for the N2K wind reference. |
That sounds good!
That's true. Sure, I could wrap this up. I would merge the information from
Performing calculations in the gateway can make sense in certain cases when the devices receiving the data need these fields but are not capable of calculating them on their own. But it should be optional. Performing the calculations downstream in the receiving devices/software might be more flexible. |
Completely agree. |
first steps with https://github.com/wellenvogel/esp32-nmea2000/releases/tag/20241114 |
First, thanks for this project! 🎩
related to wellenvogel/avnav#367 and https://github.com/kdschmidt1/Sail_Instrument
I noticed that the gateway computes true wind from COG/SOG and AWA/AWS, but I suspect the calculations not to be correct.
Testing
I fed the gateway with the following test data (as return by the GW in
PCDIN
) and got this output. The test data values were generated usingCourseData
.Wind data is sent to the GW as PGN130306
N2kWind_Apparent
.1. No Current
GW output
VTG
COG/SOG = 90°/5kn ✔️MWV-R
AWA/AWS = 310°/7.7m/s ✔️MWV-T
TWA/TWS = 292°/6.4m/s ✔️MWD
TWD/TWS 292°/12.4kn ❌ same asMWV-T
but should be true wind direction not angle (need to add HDT) Forwarding this to AvNav results in a wrong TWD.2. With Current
GW output
VTG
COG/SOG = 73.9°/6.2kn ✔️VHW
HDT/STW = 90°/5kn ✔️HDT
90° ✔️MWV-R
AWA/AWS = 310°/7.7m/s ✔️MWV-T
TWA/TWS = 286.5°/6.2m/s ❌ should be 292° 12.4kn (6.4m/s) because true wind is relative to water and must be calculated from HDT/STW, here COG/SOG is used and yields ground wind insteadMWD
❌ same problem as in 1. (angle instead of direction)Workaround
Blacklisting
MWD
, butMWV-T
is still wrong.Suggestions
MWV
is sent in two flavors which cannot be blocked separately.)The text was updated successfully, but these errors were encountered: