Cruisers & Sailing Forums (https://www.cruisersforum.com/forums/)
-   OpenCPN (https://www.cruisersforum.com/forums/f134/)
-   -   Why Doesn't OpenCPN Send SOG to Autopilot (https://www.cruisersforum.com/forums/f134/why-doesnt-opencpn-send-sog-to-autopilot-60318.html)

RhythmDoctor 08-05-2011 19:48

Why Doesn't OpenCPN Send SOG to Autopilot
 
I have OpenCPN 2.3.1 interfaced with a Raymarine 4000+ MkII autopilot. When I activate a route and set the AutoPilot into track mode, it successfully transmits XTE, BTW, and DTW to the AutoPilot. However, the autopilot does not seem to be receiving SOG, and this causes stability problems with the course steered.

Does anyone have any clues on how I can fix this problem?

RhythmDoctor 27-05-2011 21:21

Re: Why doesn't OpenCPN send SOG to Autopilot
 
It's been a few weeks and no response. Any suggestions on how I can fix, or at lease better diagnose, this problem?

bdbcat 28-05-2011 06:53

Re: Why doesn't OpenCPN send SOG to Autopilot
 
RythmDoctor....

OCPN sends $ECRMB.... to the autopilot when engaged.
RMB contains SOG.

Do you see the RMB sentences at the autopilot?

Dave

ChuckSK 28-05-2011 11:07

Re: Why doesn't OpenCPN send SOG to Autopilot
 
Dave

Shouldn't RMB contain VMG to the waypoint rather than SOG?

Chuck

bdbcat 28-05-2011 11:19

Re: Why doesn't OpenCPN send SOG to Autopilot
 
ChuckSK....

Definition of RMB includes SOG. VMG would help the A/P estimate arrival time better, but not do too much for short time steering corrections, I guess. Also, SOG is easier to get that VMG.....

Dave

ChuckSK 28-05-2011 11:39

Re: Why doesn't OpenCPN send SOG to Autopilot
 
Dave

All the definitions of RMB that I found include velocity to the waypoint and not SOG.

It probably makes no difference to A/P behavior.

My Raymarine A/P does not read VMG or SOG from RMB anyway. It reads SOG from RMC. I have added a tweek to send RMC from OpenCPN to the autopilot.

Chuck

bdbcat 28-05-2011 12:07

Re: Why doesn't OpenCPN send SOG to Autopilot
 
ChuckSK....

Right you are. I spoke hastily. It should be VMG, not SOG, in RMB.

Just to confirm your setup, I understand that Raymarine AP will not extract speed (actually interpreted as VMG) from RMB, but will use SOG from RMC?

Dave

ChuckSK 28-05-2011 12:14

Re: Why doesn't OpenCPN send SOG to Autopilot
 
Dave

That is correct.

Chuck

RhythmDoctor 28-05-2011 23:35

Re: Why doesn't OpenCPN send SOG to Autopilot
 
Thanks for the responses. My autopilot is a Raymarine ST4000+. This is what the manual says:
NMEA data formats
TheST4000+ can decode the following NMEA 0183 navigation and
wind data:

Information NMEA 0183 data
Course Over Ground VTG, RMC, RMA
Speed Over Ground VTG, RMC, RMA
Cross Track Error APB, APA, RMB, XTE

On the display panel it reports "SOG" with a value of 0.0.

So if OpenCPN is sending RMB, the autopilot is ignoring it for SOG but using it for XTE.

My understanding from the documents is that the autopilot uses SOG to adjust its sensitivity (probably via gain), in other words, if the boat is moving faster it will respond faster, so the autopilot will make less abrupt adjustments via lower gain, and if it is moving slower it will do the opposite. There is a manual speed entry that you have to specify upon setup that the autopilot uses if it receives no SOG data. But that single value certainly does not work optimally for different sailing conditions.

Quote:

Originally Posted by ChuckSK (Post 696064)
...My Raymarine A/P does not read VMG or SOG from RMB anyway. It reads SOG from RMC. I have added a tweek to send RMC from OpenCPN to the autopilot...

How do I go about adding this tweak to OpenCPN 2.3.1? Do I need to change the source code and recompile? It's been decades since I compiled anything. I grew up in the FORTRAN era.

ChuckSK 29-05-2011 13:50

Re: Why doesn't OpenCPN send SOG to Autopilot
 
RythmDoctor

The tweak is a source change requiring the complete development environment.

A simpler and probably better solution would be to connect a second GPS directly to the A/P.

Chuck

RhythmDoctor 29-05-2011 14:14

Re: Why doesn't OpenCPN send SOG to Autopilot
 
Quote:

Originally Posted by ChuckSK (Post 696860)
RythmDoctor

The tweak is a source change requiring the complete development environment.

A simpler and probably better solution would be to connect a second GPS directly to the A/P.

Chuck

I don't quite understand this. Either OpenCPN should support interfacing with an AutoPilot or it shouldn't. If it isn't going to support it fully with SOG data, why not just take that capability out of OpenCPN completely and have everyone buy an additional GPS instead? (I already have two GPSs and would prefer not to buy a third.)

RhythmDoctor 30-05-2011 05:49

Re: Why doesn't OpenCPN send SOG to Autopilot
 
Quote:

Originally Posted by ChuckSK (Post 696860)
..A simpler and probably better solution would be to connect a second GPS directly to the A/P.

Please pardon my frustrations expressed above. I'd edit it if the forum would allow me.

More to the point is that fact that a puck GPS such as a Garmin 18x only outputs coordinates and speed (and other satellite info that Autopilot does not care about). To output track information such as XTE, BTW, DTW, etc., you need a chartplotter. So instead of just buying a cheap GPS I'd have to buy a full-featured chartplotter to do what you suggest. And that's what I had hoped to avoid by using OpenCPN!

I hope that the developers of OpenCPN are willing to make the minor tweak to their software to add SOG data to the other track information that they already output to external Autopilots.

balp 30-05-2011 22:18

Re: Why doesn't OpenCPN send SOG to Autopilot
 
Quote:

Originally Posted by RhythmDoctor (Post 697253)
Please pardon my frustrations expressed above. I'd edit it if the forum would allow me.

Is the setup so just repeating incomming gps signals would work? Or does thet need to be generated?

RhythmDoctor 31-05-2011 05:33

Re: Why doesn't OpenCPN send SOG to Autopilot
 
Quote:

Originally Posted by balp (Post 697787)
Is the setup so just repeating incomming gps signals would work? Or does thet need to be generated?

Click here for a complete description of my setup (perhaps more than you want to know).

The Raymarine ST4000+ supports three modes of operation:
  • Basic Autopilot mode, where the controller keeps the boat on a constant heading. This requires no external inputs, but works more effectively if the autopilot receives SOW (paddlewheel) or SOG data, because the controller will modify its gain to compensate for changes in the boat's responsiveness at high/low speeds
  • Track mode, where the controller minimizes XTE on a plotted course. In this case, it also uses SOG data to calculate and compensate for current and drift and to modify its gain to compensate for changes in the boat's responsiveness at high/low speeds
  • Wind vane mode, where the controller takes wind data and keeps a constant heading relative to the wind direction. I do not have an electronic wind transducer, so I do not use this mode.
I use the first two modes. I use basic mode over a large range of speeds from full cruising speed to idling the motor directly into the wind while I raise/drop my sails. I am having great difficulty tuning the controller to hold a constant heading over the full range of speeds. I believe that feeding SOG data to the autopilot would help this greatly.

The track mode requires XTE, BTW, and DTW to function, and also works better if it gets SOG or SOW. But it basically works fine without the SOG data, so it's less of a concern. However, I need to continue receiving XTE, BTW, and DTW from OpenCPN for this mode to work.

By the way, the track mode works very nicely in OpenCPN by simply right-clicking at a point on the chart and selecting "Go to here" from the drop-down menu. It is so easy that I am using it a lot more than I expected to.

You can see from my schematic in the link above that I could feed my GPS info or OpenCPN's chartplotter info to the Autopilot. I cannot feed both unless I buy a multiplexer. The GPS will feed SOG but not XTE, BTW, or DTW because you need a chartplotter to plot waypoints. If OpenCPN were modified to also send SOG data to the autopilot (by repeating RMC or VTG data that it receives from the GPS), I could have everything needed without having to buy a multiplexer.

RhythmDoctor 31-05-2011 05:59

Re: Why Doesn't OpenCPN Send SOG to Autopilot
 
By the way, I just discovered my Garmin 18x GPS is not currently configured to send out VTG data. Sometime over the next couple of days I will reconfigure it to include those sentences in addition to the RMC data that it is already sending. (Need to wait until I go to the boat.)

The OpenCPN user manual says that it receives both RMC and VTG data from the GPS. Is it possible that OpenCPN would send the VTG data to the AutoPilot? If so, that will fix my problem. If not, I would like to see OpenCPN modified to send either RMC or VTG data to the autopilot port. Either one would all the ST4000+ to detect SOG to assist its operation.

Thanks!


All times are GMT -7. The time now is 14:08.

Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2020, vBulletin Solutions, Inc.


ShowCase vBulletin Plugins by Drive Thru Online, Inc.