This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Garmin plotter crashes nmea communication
#2
(2019-08-06, 11:33 PM)rmvdmrl Wrote: Hi Sean,

 
I'm just starting a new topic as there is no reaction on the original topic (only compass mode) and that topic is just the result of this problem.
 
I have a Garmin Plotter (so does Webber83) it sends the GPAPB sentence (I think other plotters do this aswell). If there is no active waypoint the sentence is still transmitted but with empty data.
 
When i send my nmea data from openplotter 1.2 to the TinyPilot (tpc port 20220) everything works fine as long as there is an active waypoint. As soon as i remove the active waypoint on the plotter communication with Tinypilot crashes.
 
in your code (nmea.py) you do (2x line 485 and 486) a float without checking for empty data (or try, except) which causes the script to crash when the data is an empty string, communication stops, Tinypilot doesn't get gps or wind data and only displays compass mode.
 
I am also curious why in nmea.py the mode is switched to compass (line 481) as soon as it sees an APB sentence with a magnetic heading. 
 
You must have an older pypilot version. Did you update from git? I believe the crash has been fixed.

As for changing to compass mode if apb has magnetic heading.. what should it do instead?
Quote:I do set waypoints in my plotter and sometimes like the autopilot to steer on the wind direction for instance when i have to tack against the wind. If the autopilot then switches from wind to compass it would try to head to the waypoint and steer the boat straight against the wind. To my opinion it would be good if the autopilot would only try to steer to the waypoint when it is on gps mode and keep it on gps mode and if it is on wind steering just ignore the APB sentence.

This is a personal preference then. It's possible for route following to work for both gps and compass modes as you have found. Can't you just output apb sentence with gps (true north) heading?

It currently switches to gps or compass mode if apb sentence is received making steering to wind impossible unless you deactivate the route or waypoint. This is convenient since you don't have to switch modes. If the gps drops out, it automatically falls back to compass holding course and will switch back to gps and resume following the route when gps is available again.

What you suggest would prevent this, but it could be convenient as well. I'm not sure it's better. It would be very easily to implement this feature in the autopilot route plugin of opencpn. The plugin would simply not output apb messages if the autopilot is not in gps mode if this option is set. I can't make it work for other chart plotters than opencpn unless pypilot itself is changed and it would need this extra option.

What do you think?
Reply


Messages In This Thread
RE: Garmin plotter crashes nmea communication - by seandepagnier - 2019-08-07, 12:53 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)