Cruisers Forum
 


Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 05-05-2022, 17:27   #1
Moderator
 
hpeer's Avatar

Cruisers Forum Supporter

Join Date: Dec 2008
Location: Between Caribbean and Canada
Boat: Murray 33-Chouette & Pape Steelmaid-44-Safara-both steel cutters
Posts: 8,778
OCPEN ROUTE TO PYPILOT?

I have OCPN running on an Android phone and a PYPILOT driving a CPT wheel motor. The arrangement works well enough for “point and shoot”. I would like to add the capability to steer to a waypoint and route.

Is this possible?

I believe there was once a plug (created by Sean?) but that it no longer functions?

Is there another method?
hpeer is offline   Reply With Quote
Old 05-05-2022, 21:19   #2
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,514
Re: OCPEN ROUTE TO PYPILOT?

hpeer...
This should be possible from standard OCPN. But there are some specific details relative to Android, on the hardware side.



As a start, how would you propose to have the Android device communicate with the PyPilot hardware? Wired connection from the Android device? Some sort of WiFi bridge?


Dave
bdbcat is offline   Reply With Quote
Old 05-05-2022, 22:41   #3
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,430
Re: OCPEN ROUTE TO PYPILOT?

You really only need a tcp nmea connection to pypilot port 20220. Generally you could connect your android device to the same wireless networking to do this. In opencpn you have to also check "output on this port..." which is not by default. This will allow route following without any plugins.

There is the autopilot route plugin which provides alternate calculations for route following overriding the default ones in opencpn.
seandepagnier is offline   Reply With Quote
Old 06-05-2022, 04:24   #4
Moderator
 
hpeer's Avatar

Cruisers Forum Supporter

Join Date: Dec 2008
Location: Between Caribbean and Canada
Boat: Murray 33-Chouette & Pape Steelmaid-44-Safara-both steel cutters
Posts: 8,778
Re: OCPEN ROUTE TO PYPILOT?

Bdcat:

The Pypilot AP provides its own wifi channel and a “control console” to give the AP headings. So the AP and Android are already talking wireless.

Sean:

Thanks for the reply. We were finally able to get underway after nearly 2 years. We did a passage from Delaware to St Thomas. The AP seemed to struggle in GPS mode (drifting off) and was more stable in Compass mode. I still need more familiarity and to test other headings.

Let me try this step by step:
I fire up both pypilot and android.
I connect the Android to the AP wifi.
In OCPN
1- Open CONNECTIONS
2- GENERAL - all boxes UNchecked
3- DATA CONNECTIONS
BOX 1 - ENABLE
BOX 2 - ENABLE.
TYPE - Network
Direction - Input
Protocol -TCP
Network Address - 192.168.4.1 (YDNR connection to receive AIS info)
Network Port - 1456
Priority -1


Now IF this is correct, how do I enable route following?
hpeer is offline   Reply With Quote
Old 06-05-2022, 05:00   #5
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,430
Re: OCPEN ROUTE TO PYPILOT?

Basically, you need to add a connection in opencpn to the ip address of the AP on port 20220 tcp with both input and output checked.

It is probably best to continue on the pypilot forum:
https://forum.openmarine.net/forumdisplay.php?fid=18
seandepagnier is offline   Reply With Quote
Old 06-05-2022, 05:34   #6
Moderator
 
hpeer's Avatar

Cruisers Forum Supporter

Join Date: Dec 2008
Location: Between Caribbean and Canada
Boat: Murray 33-Chouette & Pape Steelmaid-44-Safara-both steel cutters
Posts: 8,778
Re: OCPEN ROUTE TO PYPILOT?

Sean;

I appreciate the suggestion to move it there and may eventually.

I would rather handle it here to get input from a different crowd.

That place is probably best for developers and people deeply involved in code.

I need something more for Joe Six Pack, more on my level of comprehension.

Q1: To that end, once I have this connection enabled correctly then I just activate a route?

Q2: Please recall I have a big steel boat. Pypilot compass headings are +100° different from actual or magnetic. Is this a problem? Or does OCPN nust give Port/Stbd correction signals.

The control head is mounted as far from the hull as possible, 6’ off the deck under solar mounts on arch. The compass issue is not going to get better.
hpeer is offline   Reply With Quote
Old 06-05-2022, 18:19   #7
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,430
Re: OCPEN ROUTE TO PYPILOT?

Quote:
Originally Posted by hpeer View Post
Sean;

I appreciate the suggestion to move it there and may eventually.

I would rather handle it here to get input from a different crowd.

That place is probably best for developers and people deeply involved in code.

I need something more for Joe Six Pack, more on my level of comprehension.

Q1: To that end, once I have this connection enabled correctly then I just activate a route?
Yes.
Quote:
Q2: Please recall I have a big steel boat. Pypilot compass headings are +100° different from actual or magnetic. Is this a problem? Or does OCPN nust give Port/Stbd correction signals.
Did you try entering a heading offset? It does not know which way it faces in the boat depending on how you mounted it.
Quote:
The control head is mounted as far from the hull as possible, 6’ off the deck under solar mounts on arch. The compass issue is not going to get better.
You mentioned it works under compass mode? Maybe compass is "ok" ?
seandepagnier is offline   Reply With Quote
Old 07-05-2022, 04:21   #8
Moderator
 
hpeer's Avatar

Cruisers Forum Supporter

Join Date: Dec 2008
Location: Between Caribbean and Canada
Boat: Murray 33-Chouette & Pape Steelmaid-44-Safara-both steel cutters
Posts: 8,778
Re: OCPEN ROUTE TO PYPILOT?

Sean,

Thanks for reply.

Yes on the heading off set, as much as 30° to 40°. Compass mode seemed to need significantly less offset than GPs.

The binnacle compass makes a great coat hanger. I don’t have any hope for that. I discovered a magnometer app for the Phone. It has helped located a spot with less interference for the sensor.

As long as the Py Sensor deviation is relatively constant around the entire swing it will be OK. Big jumps would mess it up. Thats why I moved from the CPT sensor, it would work fine on some headings but in other quadrants it could not seem to find a null. BUT the CPT sensor must be within arms reach. I can mount the Py in a much more magnetically friendly location.

We will transit to St Maarten tomorrow I think. I may have a chance to fool with the OCPN route then.

I am also going to try having a Pelagic run my Aeries. The two sensor units are mounted in the same location.
hpeer is offline   Reply With Quote
Old 07-05-2022, 07:25   #9
Moderator
 
hpeer's Avatar

Cruisers Forum Supporter

Join Date: Dec 2008
Location: Between Caribbean and Canada
Boat: Murray 33-Chouette & Pape Steelmaid-44-Safara-both steel cutters
Posts: 8,778
Re: OCPEN ROUTE TO PYPILOT?

Sean,

Rereading your reply I may be confused about “heading offset”.

Are you ou talking about Calibration / Magnetic Heading Offset?

Right now it is set to -90.

If I change it nothing seems to change in Control / Heading (while on anchor).

Next, I have set up the connection (in/out) as described above. Entered in a very simple route, and activated the route. Is there any visual indication at anchor that the Android OCPN and PyPilot are communicating?
hpeer is offline   Reply With Quote
Old 12-05-2022, 05:52   #10
Moderator
 
hpeer's Avatar

Cruisers Forum Supporter

Join Date: Dec 2008
Location: Between Caribbean and Canada
Boat: Murray 33-Chouette & Pape Steelmaid-44-Safara-both steel cutters
Posts: 8,778
Re: OCPEN ROUTE TO PYPILOT?

Sean (or others)

Question 3: I have set up the OCPN connection as noted including 192.168.14.1/TCPIP/in&out/20220/priority1 hit “Apply” and “OK” and have turned off the instruments connection. Android WIFI set to pypilot, the PYPILOT command screen is active and showing my heading so the Android to PY connection is active. I have a Test route in OCPN and have activated it.
???How do I verify OCPN is talking to the PYpilot and accepting the route???

Question 4: going back to the “offset” issue above. Which “offset”?
A: offset by heading e.g. desire 180 but dial in 200 for a 20° offset?
B: CALIBRATION/Magnetic Heading offset - now set to -90. I fiddle with this but see no change in Heading or Command.
C: CONFIGURATION/Wind Offset - I have not fiddled with this, seems unlikely.
hpeer is offline   Reply With Quote
Old 12-05-2022, 06:20   #11
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,430
Re: OCPEN ROUTE TO PYPILOT?

Quote:
Originally Posted by hpeer View Post
Sean (or others)

Question 3: I have set up the OCPN connection as noted including 192.168.14.1/TCPIP/in&out/20220/priority1 hit “Apply” and “OK” and have turned off the instruments connection. Android WIFI set to pypilot, the PYPILOT command screen is active and showing my heading so the Android to PY connection is active. I have a Test route in OCPN and have activated it.
???How do I verify OCPN is talking to the PYpilot and accepting the route???
pypilot will adjust commanded heading to the active route. Depending on the talker id set, it will automatically switch to gps mode, otherwise you need to manually switch to gps mode.
Quote:
Question 4: going back to the “offset” issue above. Which “offset”?
A: offset by heading e.g. desire 180 but dial in 200 for a 20° offset?
B: CALIBRATION/Magnetic Heading offset - now set to -90. I fiddle with this but see no change in Heading or Command.
C: CONFIGURATION/Wind Offset - I have not fiddled with this, seems unlikely.
I referred to magnetic heading offset. There is a bug a few versions back that make it impossible to change from the web interface. Try changing it from the ocpn pypilot plugin?
seandepagnier is offline   Reply With Quote
Old 12-05-2022, 07:24   #12
Moderator
 
hpeer's Avatar

Cruisers Forum Supporter

Join Date: Dec 2008
Location: Between Caribbean and Canada
Boat: Murray 33-Chouette & Pape Steelmaid-44-Safara-both steel cutters
Posts: 8,778
Re: OCPEN ROUTE TO PYPILOT?

Sean;

Thanks for the response. One question at a time for the moment.

I will look into the offset thing.

Quote:
pypilot will adjust commanded heading to the active route. Depending on the talker id set, it will automatically switch to gps mode, otherwise you need to manually switch to gps mode.
This is NOT occurring. Please explain “talker set ID”. Is that to port 20220?
hpeer is offline   Reply With Quote
Old 12-05-2022, 08:24   #13
Moderator
 
hpeer's Avatar

Cruisers Forum Supporter

Join Date: Dec 2008
Location: Between Caribbean and Canada
Boat: Murray 33-Chouette & Pape Steelmaid-44-Safara-both steel cutters
Posts: 8,778
Re: OCPEN ROUTE TO PYPILOT?

Sean,

OK that did it, I think, thanks for the help.

IIRC I had tried ti download the PY plugin previously and it didn’t work with my version. Have you updated it or just my poor memory?

In any case I now see the unit finding and adjusting for the route.

Still not sure about the compass adjustment. The plugin has some additional boxes. The adjustment I made was under Calibration/Alignment.

In CALIBRATION/Compass is an untitled box in the lower left corner thT has a slider on the right. It says….
“Insufficient coverage: 6 need 12”
That sounds like satellites, not a compass thing?
hpeer is offline   Reply With Quote
Old 12-05-2022, 18:35   #14
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,430
Re: OCPEN ROUTE TO PYPILOT?

it uses measurements similarly to satellites to compute a 2d or 3d compass fix to compensate the sensors.

Dont worry about the heading offset too much as you can always just add/subtract the number displayed in your mind.

At this point, the next thing is to just try with an active route and see if it works.
seandepagnier is offline   Reply With Quote
Old 22-05-2022, 07:33   #15
Moderator
 
hpeer's Avatar

Cruisers Forum Supporter

Join Date: Dec 2008
Location: Between Caribbean and Canada
Boat: Murray 33-Chouette & Pape Steelmaid-44-Safara-both steel cutters
Posts: 8,778
Re: OCPEN ROUTE TO PYPILOT?

Sean,

I believe the PyPilot is correctly steering to the OCPN route. Very good and thanks.

I would like to get a more accurate compass course if possible.

The control head is mounted on the arch, probably not good for pitch/roll but the best option I have for magnetic interference.

Right now the boat is laying about 60⁰ on anchor in Marigot Bay, St. Martin. PyPilot is reporting 270ⁿ. Very nearly backwards. Other headings appeared about 90⁰ off IIRC.

This morning calibration screen shots follow. Does this tell you anything ? Greek to me.
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20220522-101417_Chrome.jpg
Views:	48
Size:	258.7 KB
ID:	258148   Click image for larger version

Name:	Screenshot_20220522-101449_Chrome.jpg
Views:	44
Size:	168.3 KB
ID:	258149  

hpeer is offline   Reply With Quote
Reply

Tags
route


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PyPilot rgleason OpenCPN 123 31-10-2023 18:34
OpenCPN constantly crashing with pypilot plugin racer_99 OpenCPN 6 01-06-2020 23:39
New OpenPlotter/PyPilot build FluffyLittleSki OpenCPN 1 26-03-2020 16:44
Octopus auto helm with Pypilot control? motthediesel Marine Electronics 1 03-12-2019 11:54
OpenCPN / PyPilot build scruff OpenCPN 1 16-08-2019 06:00

Advertise Here
  Vendor Spotlight
No Threads to Display.


All times are GMT -7. The time now is 09:11.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.