2019-08-06, 11:33 PM
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.
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.
if i'm wrong please also let me know.
greetings Rob
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.
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.
if i'm wrong please also let me know.
greetings Rob