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:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to send an OpenCPN GPS Route to Pypilot
#1
Hi, I'm trying to send a GPS route to Pypilot from OpenCPN. I'm using Openplotter on a Raspberry Pi3b and have the Pypilot plugin enabled. 

I set up an input/output connection in OpenCPN to port 20220 and filtered sentences ECRMB, ECRMC and ECAPB following the instructions in the OpenCPN manual for sending an active route to an autopilot. The NMEA debugging window shows that the sentences are being sent successfully.   

In the Pypilot plugin window there is no option to navigate by GPS in the pulldown menu, only compass. Does this have to be enabled somewhere else? I couldn't figure it out. 

Thanks for the amazing work on Pypilot. It's such a great program and I can't wait to try it out on the water
Reply
#2
Actually quite easy, but I searched also a lot.
In the Connectionsettings of OpenCPN, you have to enable the "Output" Checkbox on Port 20220.
There is a field to push the Data to the Autopilot.
Once applied, Pypilot should get the Heading and Start navigating based on openplotter!
Reply
#3
Normally with openplotter you can set up gpsd to read from the gps, and pypilot will automatically use gpsd. OpenCPN can have a connection for gpsd.

pypilot cannot follow heading from OpenCPN (from APB messages) unless gps is available. If opencpn has a gps, it needs to forward this to pypilot on port 20220 if pypilot does not already have gps. Without this, it cannot follow the route.

In theory opencpn could command pypilot in compass mode, but regardless opencpn would need a gps to compute the courses to follow a route. Since a gps is needed, it is not really a priority to support this, instead it's better to ensure the gps opencpn has gets shared with pypilot. You might have to adjust the output filter for the tcp connection
Reply
#4
Hey guys, this is an old thread but still important.
I still have issues figuring this out. I have OpenPlotter 1.2.0 running after installing from one of the ready made images for the Raspberry Pi 3 ad then updating to 1.2.0.
I managed to get pypilot to work to hold a course.
However, when I activate my route and set the pypilot plugin to gps it just continues to hold the course but nothing else.
Here is my configuration is a bunch of screenshots:

   

Here are my added connections to OpenCPN
   

Both are configured the same. For testing I filtered for APB only. Output filter or not had no impact on the working status of my autopilot.
   

I can see messages coming when the route is active:
   

However, when I activate either compass or gps and click on AP in the pypilot plugin, the autopilot just keeps following the current course.


Can you see what I am missing? The way I see it, the messages in the NMEA debugging window are NOT blue! They are red and seem to be either only into or faulty. Am I sending to the incorrect IP?

In another thread, I read the connection to PyPilot needs to be UDP and not TCP.

After switching to UDP, the autopilot relevant messages are being sent (blue) and also accepted (green).

   

However, when activating AP using the PyPilot OpenCPN plugin, I get no indication if the activated route is being used or if just the course is being held.
Should I see any change in color or a text marker or anything that indicates pypilot is following an active route?
I'm asking because maybe it works already but I have no idea because I'm sitting at the dock?

   
Reply
#5
Its 20220, not 20200 :-)
Reply
#6
THANK YOU! That was a good catch!

On TCP or UDP?
Reply
#7
(2019-12-11, 04:09 PM)McNugget Wrote: THANK YOU! That was a good catch!

On TCP or UDP?

TCP
Reply
#8
It works!
Thank you so much! After changing the connection back to TPC and setting the port to 20220 (I must have flipped a bit, literally, at some point during my tests) pypilot accepted a new course to drive towards whenever I moved the active waypoint around! That's an excellent sign and enough for now! I'll test this as soon as the weather clears up. Hopefully this weekend!
Again, this was a long search and you solved my last piece to the puzzle! Cheers!
Reply
#9
Good to hear. It was only one bit. All the other millions of bits are credit to Sean. But enjoy!

Sent from my Nexus 5 using Tapatalk
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)