rgleason / watchdog_pi

watchdog plugin for opencpn
GNU General Public License v3.0
1 stars 9 forks source link

Bug: Failing Alarm: "true Relative Wind" > 9 knots for 1260 seconds (Werner) - Fixed? #88

Closed rgleason closed 6 months ago

rgleason commented 7 months ago

I remember what you said about changes. I noticed, earlier already, but now for sure, that watchdog currently is not working properly. That is on my windows 10 machine, > 5.8 Watchdog 2.4.110.3

We installed an alarm yesterday, in true Relative Wind, > 9 knots for 1260 seconds …. Did not work. Just woke up, should have gone 15 minutes ago. All fine, good thing is we do have wind, and crew is hoisting the sails.

The wind history shows clearly that the wind was above 9 knots for over 30 minutes. It seems that watchdog is not seeing / receiving the actual / changing values of the wind, it still showed: X. 4.3 > 9, where 4.3 was the wind speed when I set the alarm.

I thought about reporting the bug, but then thought it might be better to ask you how to proceed. Might be a known issue. Or I might nave to update … which is possible with Starlink.

Well, I go back to sleep for a few hours and proceed tomorrow. As said, for us the good thing is there is wind. Happy with that. Though … it (solo) sailors rely upon WD alarms … therefor this message already.

More than willing to perform more tests as well if that helps.

pa2wlt commented 7 months ago

Thx @rgleason . I experimented a bit more And have the following additional info, posted 350 nM from Point Nemo.

If I do set 3 new alarms, for 1. Apparent, 2. True relative and 3. True Absolute only the first Alarm seems to work / process input. For both others I do see: N/A.

Whereas the dashboard instrument True Wind Angle & Speed does show TWS and TWA.

IMG_2036 And GPS data and heading are available, as can be seen in on the screen shot.

Last time the N/A was not visible. Instead I reckon it showed perhaps the Relative Wind.

Furthermore, even though Alarm 3 is showing N/A every now and then it does make a sound … ah, that is because I checked the option ‘Alarm if no data’.

In the NMEA connection string wind data is received via the following strings: $IMWV, 155,0,R,5.6,N,A*3F.

So, that is Relative Wind. Somewhere this is converted to True wind (otherwise the instrument should not show TWS and TWA), but not available in WatchDog.

I record a lot of NMEA streams. If that is of any help I can share these.

rgleason commented 7 months ago

Yes please, we would love some data strings for testing, if you can do that!

rgleason commented 6 months ago

From Werner

Dave, Rick,

Attached the files. Kept them very small. Here are my notes:

Windows 10 machine
OpenCpn 5.8.4.
WD plugin (latest) 2.4.103

1. WD shows expected behaviour for Apparant Wind Alarm.
Added new alarm
Wind > over speed > apparant > 5 kts > triggerd for 5 seconds.
Recorded nmea in 1.nmea
Alarm immediately went of
Removed the alarm

2. WD shows for ...
Added new alarm
Wind > over speed > True Relative > 5 knots  > triggered for 5 seconds.
Recorded Nmea in 2.
Alarm went off, because no data ...
WD itself shows N/A.
Changed the alarm to Apparant over 8, immediately alarm.
Changed the alarm back to True Relative > 8 kts
WD shows Wind 8.5 > 8.0, no alarm is triggered.
Stopped recording 2.nmea.

My comments:
True Relative requires wind sensors and GPS. Both are sending nmea data.
The instruments in the dashboard do show TWS and TWA.
Though WD does not see this data.

My best guess: TWS and TWA have been calculated from the NMEA data.
They are available in Dashboard, though not in WD.

So either copy the logic from Dashboard to WD so that TWA and TWS are available there as well.
Or ... see if the calculated data in Dashboard can be forwarded so that WD has access to it.

---

Furthermore:
In case there is no data (but there should be data) WD should now show 
the old data (8.5 apparent > 8.0, but show N/A). 
That is a simple improvement, though not improving functionality).

Last comments: (unrelated to the bug):
A few years ago I (PA2WLT, Github) implemented some code to add the Rudder Alarm and provided that to Sean. 
Pull request was accepted and it is available since then in the plugin.

I might be of any help here, though have no experience with debugging
OpenCPN / plugins, which is necessary here, since I wouldn't know where to start.

Would be good to learn that, since I would love to add other things as well,
like an alarm om VMG (which currently isn't possible since VMG is only available in
the route manager, there is no dashboard meter for it (yet), nor the option to
set an alarm.

Other thing that I'd like to pick up is a standard tracking function. Now more and more
Cruisers to have starling, I consider is very helpful if one can automatically send
a tracepoint every hour (5, 10, 15, 30 .. minutes) to some email address / tracker page.

All commercial initiatives have their own paid tracking pages and devices. Whereas it would
Be great to offer this as part of the open source version. I currently use a Iridium Go for
This, that is a very expensive solution though. I have no C++ dev environment om my Win machine,
Perhaps I should get that in place so I could start working on that.

Otherwise I will pick up after I have moored safely in Puerto Williams, and be back in Amsterdam.

Thx in advance for paying attention to this.

Please let me know if I can be of any help.

Werner Toonk
rgleason commented 6 months ago

Here are Werner's two files.

1.nmea.txt 2.nmea.txt

rgleason commented 6 months ago

Werner email comment:

As I (only) now notice, as a side effect (at least in my case) it is impossible to set an alarm on a change of the Wind Angle. For some reason, a Wind alarm can only be set for True wind. And that data is not available. Not sure why that is. Is Sean still in the lead for WD?

As a sailor I would preferably be able to set an alarm on any instrument on the dashboard, so that I can sail without continuously having to monitor instruments (since that is automated). Would love to dive into that one day.

rgleason commented 6 months ago

@pa2wlt Dave has fixed this. Please test. Watchdog 2.4.105 has been pushed to the PIM catalog, waiting to be accepted. Also android is hopefully better. Wind Alarms

Please test and advise.

rgleason commented 6 months ago

RFE: Wind T-A and Wind T-R when no data: "N/A" + old data https://github.com/rgleason/watchdog_pi/issues/74

RFE Alarm for VMG https://github.com/rgleason/watchdog_pi/issues/97

RFE: Standard Tracking Feature #98 https://github.com/rgleason/watchdog_pi/issues/98

Werner, we always try to use 1 Issue per "Issue" It is easier to close them and manage them!

Regarding Learning Debugging of plugins -

For nmea0183 run a VDR file with the necessary sentences and see what the plugin does, or simply use it on your boat as you have. Sometimes we use other tools like shipdirver or aissimulatior etc..

Regarding Rudder Alarm - Please Test it! PA2WLT, Github (Werner Toonk) added Rudder Alarm via Sean. my repo diverged from Sean's, Dave and I restored the rudder alarm. Please test it.

rgleason commented 6 months ago

Werner is still going to test and let us know, but I think this works, so I am closing it.