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
Route second waypoint issue
#1
When activating a route and enabling the autopilot with the Pypilot OpenCPN plugin, the autopilot is successfully enabled.
The green line points directly at the first closest waypoint and the tiller does it's job.

However, when passing the first waypoint, the green line points to a whole other direction than it's supposed to be. Not exactly the opposite number of degrees, but always the opposite direction.

I don't know what the cause is here, I don't suppose it has anything to do with my compass because it is a GPS course.
I suspect it has something to do with the OpenCPN connections, maybe the Pypilot TCP output has a faulty priority or maybe I am sending the wrong sentences?

Hope you can help me out!

The sentences that I forward to Pypilot are:
APB,ECRMB,ECRMC,ECAPB,ECRMB,ECRMC,ECAPB

Somehow in the list there are duplicates?
Reply
#2
the autopilot only uses APB.

I"m not sure which green line, do you have a screenshot?

Are you using the autopilot route plugin? Does your route have more than 2 waypoints?
Reply
#3
(2020-07-13, 08:52 PM)seandepagnier Wrote: the autopilot only uses APB.

I"m not sure which green line, do you have a screenshot?

Are you using the autopilot route plugin?   Does your route have more than 2 waypoints?

Ah, I'll try to only keep APB then. I am using the built in OpenCPN route, I draw it and then activate it. Then Pypilot automatically uses the GPS course.
OpenCPN then depicts three "heading" lines in front of the current position, one of which is green. That green line wil point to the closest "waypoint" that I've drawn.

[Image: Whats-App-Image-2020-07-12-at-16-18-16.jpg]

This image was the only one I got, doesn't depict the active route but mentions the green line I'm talking about.
The route that I used earlier had 3 waypoints.
Reply
#4
Here's another screenshot of what I mean, first waypoint has passed and second waypoint is active, but the green line does not steer to that waypoint like it did with the first. Also changed the sentence output to APB only.

[Image: 2020-07-14-17-33-45-Aye-Aye-Systems-2-op...Viewer.png]

When dragging that second waypoint to the other direction, the autopilot tiller responds and goes in the other direction. But, the green line goes to the complete opposite direction:

[Image: 2020-07-14-17-37-27-Aye-Aye-Systems-2-op...Viewer.png]

Maybe now the tiller responds correctly, but I cannot explain the behavior of the lines.
Also, you think that the autopilot route plugin is to be recommended for following routes (I can't find it in OP2 OpenCPN release canditates, where can I get it)? Or do you prefer the built in method?
Reply
#5
I've installed the autopilot route plugin from git now, and enabled it. 

Also, when activating the route, the console canvas with XTE appears, but then OpenCPN is stuck and doesn't do anything anymore. Can't press deactivate in the console canvas also. I'll create another topic for this.

Hope you can support.
Reply
#6
Ok, I've tried with only APB, and with the CRMB,ECRMC,ECAPB, together or separate. They both work and send data to pypilot. However, the second waypoint will always be off course. How can it be that the menu function when right clicking on the map and choosing navigate to here or the first waypoint in a route is properly picked up by PyPilot? The green line is the graphical overlay you can choose with pypilot plugin, and this properly is lined up with the first waypoint or navigate to here function. But still, it will not line up with a second waypoint.

I've tried this with and without the autopilot route plugin, both have the same behavior.
How can I troubleshoot this issue further?

My magnetic compass is OK, GPS is OK and there are no other datastreams that might interfere I think. On reason might be signalk?
Should I apply a filter to the incoming opencpn connection? I'd really like to have the autopilot follow a route on my next journey Smile
Reply
#7
I may have figured it out. The way I think OpenCPN routes seem to work is that it saves the "course corrections" that need to be made the first time you draw the route. When I drag the first and closest waypoint to the ship, it does not calculate the new heading, but just takes the "course correction" from the old situation as it was when the route was drawn in the first place. But, somehow this feels illogical to me, as activating the next waypoint should point the new heading exactly to that new heading, or? It should be possible also to test this from land, not changing the original route in any way, but the green line points to the wrong direction anyway. I really have trouble understanding this.

This was the only situation I could test the route while being on land, the real situation ofcourse would be that the ship would reach the waypoint rather than the waypoint being dragged onto the ship.

At least, this is my presumption right now. I'll try to test it in real life, or figure something out to simulate gps data.
Anyway, will report soon and I am very curious about experiences from others.
Reply
#8
OK, after simulating GPS data with GPSGate client, all is OK. This saved me a lot of headache, I could test a number of scenarios without having to sail out. I've found that the VDP plugin didn't work for me so I just simulated a route and speed, and then played with several settings:

- OpenCPN: connections and filters
- Signalk plugin: signalk to nmea converter
- pypilot settings: true north mode on/off
- OpenCPN: own ship calculate SOG based on position changes

Graphical overlay for pypilot is very handy for checking if heading is correct (red line), if autopilot direction is correct (green line).
And this will help what is the right moment to activate route, or activate pypilot in general in GPS or Compass mode.
This would be impossible for me to find out without the simulator, now I can test in real life!
Reply
#9
(2020-07-20, 06:47 PM)jamos.tan@gmail.com Wrote: OK, after simulating GPS data with GPSGate client, all is OK. This saved me a lot of headache, I could test a number of scenarios without having to sail out. I've found that the VDP plugin didn't work for me so I just simulated a route and speed, and then played with several settings:

- OpenCPN: connections and filters
- Signalk plugin: signalk to nmea converter
- pypilot settings: true north mode on/off
- OpenCPN: own ship calculate SOG based on position changes

Graphical overlay for pypilot is very handy for checking if heading is correct (red line), if autopilot direction is correct (green line).
And this will help what is the right moment to activate route, or activate pypilot in general in GPS or Compass mode.
This would be impossible for me to find out without the simulator, now I can test in real life!

I would like to contribute to your project with my experience but atm I cannot get pypilot pluging to see GPS data even though OpenCPN does, what versions are you using? And as a starting point what settings have you had the most success with? I have experienced many of what you have mentioned above regarding the Route pluggin as well but I suspected this was due pypilot plugin not seeing or using the GPS data.
Reply
#10
(2020-07-21, 03:23 PM)rastam4n Wrote:
(2020-07-20, 06:47 PM)jamos.tan@gmail.com Wrote: OK, after simulating GPS data with GPSGate client, all is OK. This saved me a lot of headache, I could test a number of scenarios without having to sail out. I've found that the VDP plugin didn't work for me so I just simulated a route and speed, and then played with several settings:

- OpenCPN: connections and filters
- Signalk plugin: signalk to nmea converter
- pypilot settings: true north mode on/off
- OpenCPN: own ship calculate SOG based on position changes

Graphical overlay for pypilot is very handy for checking if heading is correct (red line), if autopilot direction is correct (green line).
And this will help what is the right moment to activate route, or activate pypilot in general in GPS or Compass mode.
This would be impossible for me to find out without the simulator, now I can test in real life!

I would like to contribute to your project with my experience but atm I cannot get pypilot pluging to see GPS data even though OpenCPN does, what versions are you using? And as a starting point what settings have you had the most success with? I have experienced many of what you have mentioned above regarding the Route pluggin as well but I suspected this was due pypilot plugin not seeing or using the GPS data.

Hi Rastam4n,

Thanks! I am using versions OpenCPN 5.0.0 and Pypilot version 0.5.

Working Autopilot route plugin settings:   
The settings for autopilot route plugin that work for me (without crashing opencpn, freezing opencpn) and avoids the problem that route directions are ignored, for me is:

[Image: 2020-07-21-16-32-43-Start.png]

Working OpenCPN settings:

The built in OpenCPN route works best if I configure:

Connections:
- incoming signalk localhost tcp port 10110, priority 1
- outgoing tcp localhost connection port 20220, priority 0, with outgoing filters: APB, ECRMB, ECRMC, ECAPB

Display settings:
- Show only true bearings and headings

Own ship settings:
- Calculate SOG and COG from position changes

Pypilot plugin settings:
- Forward NMEA: OFF 
- Enable graphical overlay: ON
- True north mode: ON

At least, for now.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)