rgleason / autopilot_route_pi

autopilot route plugin for opencpn
GNU General Public License v3.0
0 stars 4 forks source link

Windows version show incorrect heading calculation #6

Open marcobergman opened 2 years ago

marcobergman commented 2 years ago

In the attached example, the calculated guide heading seems to be 005.3 (NMEA debug), corrected with max error angle to be -014.7. As can be seen these headings are incorrectly calculated. The version 0.5 straight out of the master github shows the right headings.

image

rgleason commented 2 years ago

Please clarify further. Is the image posted from what version of the plugin? Also please post an image for the master github showing the right settings under the same circumstances. Additionally please record the VDR file and post it here. I am not sure how I will use it but it may help.

rgleason commented 2 years ago

PS thank you for testing this! Perhaps you can explain how you are testing this? I am puzzled why the two versions would be different, since I have not really touched the main code.

marcobergman commented 2 years ago

I test this with a self made tool https://github.com/marcobergman/ais_simulation; the readme includes some usage hints, but let me know if you want to actually start using it. I can give some easier tests that don't require simulation. Stand by for this.

marcobergman commented 2 years ago

Straight from sean's github, this static test (no simulation) yields this effect: image This makes sense: the guide heading is way off the track heading, so the track heading is clipped by the max error angle: 284-20=264

marcobergman commented 2 years ago

The PIM version 0.4.4.0 under windows gives two results that both don't match the result that makes sense:

image

image

rgleason commented 2 years ago

Thank you Marco. I am going to get this plugin working by updating it to Sean's current code. I should get familiar with your simulator too, eventually. I'll make some progress in the next couple of days.

rgleason commented 1 year ago

@marcobergman Marco, Dave Register and I have just completed a complete new version of Watchdog that now includes the Pypilot alarms, rudder and improvements to the depth alarm.

Would it be possible for you to test the pypilot alarms? I don't know of anyone else who would be able to do this. Watchdog 2.4.60.0 t is in the updated PIM catalog and it should be available on your RPI and computer now. If you could let me know if it is working properly I would really appreciate it. Thanks.

Also we have a new version of Testplugin Frontend that should be much much better and I am going to rebuild all the plugins again.

marcobergman commented 1 year ago

Yes just back from a trip, give me a few days. Great news regarding the watchdog btw!

marcobergman commented 1 year ago

Rick it works fine in the lab. Tested on windows with OpenCPN 5.8.4 and raspberry with OpenCPN 5.6.2. I will start to put it out on the boat for real-life scenario's, but so far no objections here.

I have not been able to check all tests yet. The main problem was that a previous version of the published watchdog used the so-called signalk client, which was an old version of the pypilot internal communication mechanism, which had been obsolete since mid 2020, and the watchdog was not able to communicate at all anymore with modern versions of pypilot. Now that has been rolled out in the PIM version, it is immediately useful, doing the default checks on presence of a running pypilot and the engine driver.

I will put it out on a local forum here as well and will report any issues. Thx again.

rgleason commented 1 year ago

Marco, Thanks for the tests. These are encouraging. I am very interested in how it goes with the real time tests of Autopilot_route, Watchdog (pypilot alarms) and the Pypilot_pi plugin! That's a lot of testing, but there would be no better person than you to do it.

If there are some issues, and I expect there will, hopefully, we can all address them as a team, you, Sean and I!!

Thanks again. My fingers are crossed. Here is the TP Plugins thread which is kept updated as work is done (the thread is an Issue on Jon's Testplugin Page) You might want to bookmark it.

marcobergman commented 1 year ago

TBH I don't update anything on my boat as long as it works, but I can take my windows laptop and test these three next time. The simulations in the lab environment have proven pretty representative though.

rgleason commented 1 year ago

Thanks Marco, there is nothing like a real world test by a guy who knows what is supposed to happen! I totally understand why you are going to use your laptop and not your boat computer. Thank you!

marcobergman commented 1 year ago

At the boat now; at least one finding, which I might also have seen at home: the pypilot alarm is saved, but not loaded. So, after configuration, it works (basic test for now), if I shut down, I can see it in the config file (see attached), but when I restart OpenCPN, the alarm is no longer there. I have this both on Ubuntu, OpenCPN 5.6.2 and watchdog plugin 2.4.70.0 from the master catalog, and on Windows, OpenCPN 5.8.0, watchdog plugin 2.4.70.0.

WatchdogConfiguration.xml.txt

marcobergman commented 1 year ago

The latest version of autopilot_route plugin 0.4.14 and pypilot plugin 0.40.6 seem to work without major problems, both on Windows and Ubuntu; I have swithed my operational system to these versions now. There seems to be some correlation between the latest pypilot plugin and a segmentation fault at OpenCPN shutdown time, that results in a 'disable plugins?' question at next startup, but I cannot positively reproduce that. Neither do I know how to troubleshoot a segmentation fault.

rgleason commented 1 year ago

Marco, thanks. Also does the Windows version show incorrect heading calc still?

rgleason commented 1 year ago

Maybe we should be making individual Issues, and closing the ones that are solved?

rgleason commented 1 year ago

Thank you so much for your testing, it is a lot of work, but much appreciated. So, I guess for each of the various Plugins, we need to make an Issue in that plugin. Have I got this right?

Watchdog 2.4.70 the pypilot alarm is saved, but not loaded. So, after configuration, it works (basic test for now), if I shut down, I can see it in the config file (see attached), but when I restart OpenCPN, the alarm is no longer there. I have this both on Ubuntu, OpenCPN 5.6.2 and watchdog plugin 2.4.70.0 from the master catalog, and on Windows, OpenCPN 5.8.0, watchdog plugin 2.4.70.0.

WatchdogConfiguration.xml.txt

autopilot_route plugin 0.4.14 pypilot plugin 0.40.6 The latest version of autopilot_route plugin 0.4.14 and pypilot plugin 0.40.6 seem to work without major problems, both on Windows and Ubuntu; I have swithed my operational system to these versions now. There seems to be some correlation between the latest pypilot plugin and a segmentation fault at OpenCPN shutdown time, that results in a 'disable plugins?' question at next startup, but I cannot positively reproduce that. Neither do I know how to troubleshoot a segmentation fault.