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 21-08-2019, 10:40   #1
Registered User
 
oprlid's Avatar

Join Date: Sep 2009
Location: near Mannheim/Germany
Boat: Feltz Scorpion II
Posts: 19
OpenCPN, Seatalk and COG CTW CMG etc.

Hi everyone,
i'm Frank. I have build a devices that translates from Seatalk to NMEA0183 and vice versa.

On the openCPN Supplementary Hardware manual pages, I got a some criticism, saying "Currently the device is unsuitable for use with OpenCPN".
See here

I'd like to to make things better and not worse, and i'd like to really understand what's right and whats wrong. Therefore I need some advice.

It's all about Seatalk and NMEA protocol - so my questions are pretty specific and detailed. Hope you don't mind if I ask detailed technical questions here.

------------------

The problem is :

What I have is the statement :
Quote:
SeaTalk Datagram 53 outputs COG, and Knauf's reference work says this is in degrees magnetic, not in degrees true. In my data dump example, I get a datagram 53 that gives 359 for COG. Given that my COG as seen from my track is clearly 015T, that confirms that datagram 53 is in degrees magnetic.
I'm not sure if the reference says "it's in degrees magnetic".


Knauf's reference work says :

Quote:
53 U0 VW Course over Ground (COG) in degrees:
The two lower bits of U * 90 +
the six lower bits of VW * 2 +
the two higher bits of U / 2 =
(U & 0x3) * 90 + (VW & 0x3F) * 2 + (U & 0xC) / 8
The Magnetic Course may be offset by the Compass Variation (see datagram 99) to get the Course Over Ground (COG).
Corresponding NMEA sentences: RMC, VTG
The question is - what is COG here.
Usually COG (Course over Ground) means - what a GPS will send.
The sum of HDG + Leeway + Current.

The reference say's, this SeaTalk sentence gives COG.
That's why I directly translate this COG into NMEA by using it to create a RMC Sentence.

On the other hand, the reference also says
Quote:
The Magnetic Course may be offset by the Compass Variation (see datagram 99) to get the Course Over Ground (COG).
To my understanding magnetic course + variation gives magnetic True-North, but not COG.

My question is, does this SeaTalk sentence send COG, that can be directly translated into a NMEA0184 RMC sentence, or does it send true heading. In that case I would not call it COG but heading.

If it is heading - what does a SeaTalk GPS device send ?

Thank you for any ideas or tips.
Frank
oprlid is offline   Reply With Quote
Old 22-08-2019, 11:08   #2
Registered User

Join Date: Sep 2017
Location: Vancouver, Canada
Posts: 52
Re: OpenCPN, Seatalk and COG CTW CMG etc.

Hi Frank,

Rick Gleason added that edit to the wiki as a result of my experiences with the SD128, which were detailed on the page you linked to.

I'm no expert on either NMEA0183 or SeaTalk, so I only had my own practical experience with the device onboard to use as well as the online resources like Knauf's SeaTalk document. I'm also very much only an amateur coder and don't have the skills to dive into a larger codebase to start making edits.

My experience was pretty straightforward: my boat has older ST60 instruments and an ST1000+ autopilot, all on a SeaTalk v1 network along with the RC520 chartplotter. The chartplotter displays the correct COG and heading (in either magnetic or true degrees). Once the data on the SeaTalk network had gone through the SD128, translated to NMEA0183, and onwards to OpenCPN on my laptop, the COG and heading info were no longer correct. I would see the wrong COG predictor line and my heading would also be wrong, and it always seemed to be wrong by exactly my magnetic declination (16E here near Vancouver Canada). Additionally, my track in OpenCPN was always very jagged - it seemed to jump around in ~20 m increments instead of smoothly updating every few metres.

The wiki page you linked to accurately describes my experiences and my thoughts on what the causes were. There were a few more minor issues (also described on the wiki page). As I said, however, I'm no expert so would likewise welcome a more experienced person to look over my post on the wiki page and chime in.

My main issues with the SD128 Bridge were:
1) its code doesn't allocate more than 1 byte for latitude and for longitude, which means it is limited to 0.01 min resolution (i.e. ~18 m), not sufficient for modern navigation chartplotters or OpenCPN display. It makes the boat jump around in 18 metre increments, making a jagged track of straight 18 m east-west or north-south segments. The Bridge appears to pull its lat/long info from SeaTalk datagrams 50 and 51 which according to Knauf's document only provide 0.01 min resolution. The fix would be to implement lat/long with datatypes of sufficient size to store 0.001 min resolution and pull this from datagram 58, which also gives lat/long with this higher precision (~1.8 m).

2) I think you're reading datagram 53 wrong. My reading of Knauf's reference is that COG (i.e. the track of the boat, calculated directly from sequential lat/long position data) is output in degrees magnetic in this datagram, so it needs to be corrected for magnetic declination at your location to give COG in degrees true. My understanding of your code is that you are using this datagram's data directly as-is in RMC sentences, so it gives the wrong COG predictor arrow in OpenCPN, off by the amount of local magnetic declination - in areas with low magnetic deviation like Germany, you probably don't even notice the mismatch, but here on the west coast of Canada where it's around 16 degrees east, it makes a big difference.

3) I think you're also inserting datagram 53 into the VHW sentence, which would also be wrong, as this requires heading data, not COG (track) data. From our correspondence, it seemed to me that you might be sometimes mixing up heading and track. The RMC sentence provides COG i.e. based on the movement of the boat and not its heading, whereas VHW gives the heading i.e. which way boat is pointing, not the direction it's going (as well as the speed through water). Compass heading in SeaTalk comes from a couple different datagrams (9C, 84, 89).

It seems to me like the raw heading and COG data on the SeaTalk network is always given in degrees magnetic, and the magnetic declination is available via datagram 99. You need to correct the COG for this declination before using it in an RMC sentence, and you need to ensure that the VHW sentence is constructed from heading data, not from COG.

I'm open to being wrong about any or all of this, but I did spend a fair bit of time trying to understand how the Bridge was displaying erroneous data, and I think the wiki page gives a good summary of my conclusions. At the end, I decided that the output of the SD128 wasn't correct, and I pulled it from the boat pending fixes.

I'm happy to help troubleshoot further as time permits, and hopefully someone who knows SeaTalk a lot better than me will also chime in.

Cheers
Dave
codger is offline   Reply With Quote
Old 22-08-2019, 15:38   #3
Registered User

Join Date: Sep 2017
Location: Vancouver, Canada
Posts: 52
Re: OpenCPN, Seatalk and COG CTW CMG etc.

I should add that I did subsequently purchase a different SeaTalk <-> NMEA device, and that one works correctly (OpenCPN ownship points in the correct direction, COG matches the track, etc), evidence that there is nothing wrong with my SeaTalk network. The issues are in the SD128. As I said, happy to help troubleshoot and help with testing once you've got a new firmware to try.

Frank - also check out the thread I had started when I first had issues with the Bridge: it shows some additional examples with screenshots:

http://www.cruisersforum.com/forums/...ng-205727.html
codger is offline   Reply With Quote
Old 22-08-2019, 17:08   #4
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,620
Images: 2
Re: OpenCPN, Seatalk and COG CTW CMG etc.

I have a similar experience with tiny seatalk, but I was not as focused on the problems. I did have #1 and #2 however. I do hope this can be fixed. I have not purchased another device, however I do have a nmea2000 network now.
rgleason is offline   Reply With Quote
Old 22-08-2019, 17:40   #5
Moo
Registered User

Join Date: Mar 2017
Posts: 804
Re: OpenCPN, Seatalk and COG CTW CMG etc.

Some confusion with "variation" and "declination" perhaps?
Moo is offline   Reply With Quote
Old 22-08-2019, 18:12   #6
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,620
Images: 2
Re: OpenCPN, Seatalk and COG CTW CMG etc.

Don't think so Moo, read David's post.
rgleason is offline   Reply With Quote
Old 22-08-2019, 18:17   #7
Moo
Registered User

Join Date: Mar 2017
Posts: 804
Re: OpenCPN, Seatalk and COG CTW CMG etc.

Quote:
Originally Posted by rgleason View Post
Don't think so Moo, read David's post.

I did. One of them is talking variation and one is talking declination.. different things.
Moo is offline   Reply With Quote
Old 22-08-2019, 18:47   #8
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,620
Images: 2
Re: OpenCPN, Seatalk and COG CTW CMG etc.

Agreed, the are different, but

Quote:
Some confusion with "variation" and "declination" perhaps?
in context is somewhat obscure and does not say all that you perhaps intended.
rgleason is offline   Reply With Quote
Old 23-08-2019, 03:35   #9
Registered User
 
oprlid's Avatar

Join Date: Sep 2009
Location: near Mannheim/Germany
Boat: Feltz Scorpion II
Posts: 19
Re: OpenCPN, Seatalk and COG CTW CMG etc.

Hello Dave,
thank you for your posting and your explanations. It helped a lot.
It took me quite a while, but I thing I understood now what went wrong.
You're right. Here in europe I ( and apparently the other users ) didn't notice the mismatch.
(I wonder why the users from new zealand didn't mention it - but anyway. )

I'll add magnetic declination to my calculations and make a new firmware.
I already fixed the VHW issue (#3) and I'll look at the other
points you had.

I let you know when it is ready.

Thank's
Frank
oprlid is offline   Reply With Quote
Old 23-08-2019, 05:02   #10
Registered User

Join Date: Sep 2017
Location: Vancouver, Canada
Posts: 52
Re: OpenCPN, Seatalk and COG CTW CMG etc.

Quote:
Originally Posted by Moo View Post
Some confusion with "variation" and "declination" perhaps?
My previous post should read 'declination' everywhere. The use of 'variation' was a typo; I had just refreshed my memory with a glance at Thomas Knauf's document on the SeaTalk specification, and he unfortunately uses the word 'variation' to mean 'declination' so it was stuck in my head when I wrote that post...
codger is offline   Reply With Quote
Old 23-08-2019, 05:03   #11
Registered User

Join Date: Sep 2017
Location: Vancouver, Canada
Posts: 52
Re: OpenCPN, Seatalk and COG CTW CMG etc.

Quote:
Originally Posted by oprlid View Post

I let you know when it is ready.

Thank's
Frank
I'm happy to re-install the SD128 once a new firmware is ready and help test it, so don't hesitate to reach out.

Cheers
Dave
codger is offline   Reply With Quote
Old 25-08-2019, 05:10   #12
Registered User
 
oprlid's Avatar

Join Date: Sep 2009
Location: near Mannheim/Germany
Boat: Feltz Scorpion II
Posts: 19
Re: OpenCPN, Seatalk and COG CTW CMG etc.

A new firmware has been released for testing.
At first only for the tiny usb seatalk<->nmea link.

Details can be found at http://www.cruisersforum.com/forums/...ml#post2962338
oprlid is offline   Reply With Quote
Old 19-05-2020, 03:21   #13
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,620
Images: 2
Re: OpenCPN, Seatalk and COG CTW CMG etc.

Also https://www.cruisersforum.com/forums...d.php?t=205727
rgleason is offline   Reply With Quote
Reply

Tags
opencpn, enc, seatalk

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
COG, true HDG, mag COG all wrong codger OpenCPN 18 19-05-2020 04:03
[SOLD] Seatalk 1 To Seatalk Ng Converter Kit E22158 Wench'sCaptain Classifieds Archive 1 27-10-2015 19:09
Remove CMG Seaward Stove zoe2086 Liveaboard's Forum 0 10-04-2015 16:32
For Sale: Captivating Womens 14K White Gold Over Sterling Silver 0.45 CTW 82 Diamonds Size 7 De Orrjames Classifieds Archive 0 18-01-2014 07:12
ownership, registrations, tax etc etc etc, (future boat owner) liquido Dollars & Cents 1 20-07-2008 05:00

Advertise Here


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


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.