Cruisers & Sailing Forums (https://www.cruisersforum.com/forums/)
-   OpenCPN (https://www.cruisersforum.com/forums/f134/)
-   -   NMEA0183 HDM, IIHDM, PCHDM and dashboard_tactics (https://www.cruisersforum.com/forums/f134/nmea0183-hdm-iihdm-pchdm-and-dashboard_tactics-249765.html)

AedanC 21-04-2021 07:22

NMEA0183 HDM, IIHDM, PCHDM and dashboard_tactics
 
Hello,


Is it a requirement that a NMEA0183 HDM (Magnetic Heading) is prefixed by II for OpenCpn Dashboard_Tactics to recognise it? I can't get it to respond to PCHDM but it does respond to IIHDM correctly. I would have expected it to ignore the talker ID.



Thanks,


Aedan

Schnapsy 21-04-2021 07:32

Re: NMEA0183 HDM, IIHDM, PCHDM and dashboard_tactics
 
You can try it with NmeaConverter, t is possible to use wildcards in the identifiers.
https://opencpn.org/OpenCPN/plugins/nmeaconvert.html

AedanC 21-04-2021 09:14

Re: NMEA0183 HDM, IIHDM, PCHDM and dashboard_tactics
 
Quote:

Originally Posted by Schnapsy (Post 3392228)
You can try it with NmeaConverter, t is possible to use wildcards in the identifiers.
https://opencpn.org/OpenCPN/plugins/nmeaconvert.html


Thanks Schnapsy, I have done something like that as an experiment by another means, I was hoping to find a more elegant solution to switch between two incoming HDM streams but I might have to do that or something similar.

Dsanduril 21-04-2021 09:33

Re: NMEA0183 HDM, IIHDM, PCHDM and dashboard_tactics
 
OpenCPN should ignore the talker ID if the sentence is correct. Is the PH sentence being accepted in the NMEA Debug Window? That would help in determining whether to start looking the PI code or the OpenCPN code.

Could you post some sample sentences from both devices here?

Schnapsy 21-04-2021 09:43

Re: NMEA0183 HDM, IIHDM, PCHDM and dashboard_tactics
 
Quote:

Originally Posted by AedanC (Post 3392295)
Thanks Schnapsy, I have done something like that as an experiment by another means, I was hoping to find a more elegant solution to switch between two incoming HDM streams but I might have to do that or something similar.

I quickly looked in the DashTactics dashboard_pi.cpp and only the HDM expression is retained, in fact "--HDM" .
Maybe it's a checksum problem?

Dsanduril 21-04-2021 09:58

Re: NMEA0183 HDM, IIHDM, PCHDM and dashboard_tactics
 
That was my thought, possible checksum problem, have seen that from some vendors.

There's a decent NMEA checksum tool at https://nmeachecksum.eqth.net/. You have to grab the right parts of the sentence from the Debug window (between, but not including the $ and the *) and then you can check against the checksum in the sentence you have.

AedanC 21-04-2021 11:37

Re: NMEA0183 HDM, IIHDM, PCHDM and dashboard_tactics
 
Thanks everyone for your ideas.


I have checked the PC version in the checksum checker pointed to above and it passes. The OpenCpn NMEA monitor window also colours it green. The PC version is being generated by my code so I can alter it as required, but I can't use the II talker ID for what I want to do.


Schnapsy, thanks for looking at the code. Is there any possibility there is a pre-filter elsewere that requires a smaller set of talker IDs, eg just GP and II?



Here are some samples, two that work and two that don't.


Version from my B&G instruments, works:


$IIHDM,076,M*3D


Version from my code, works:


$IIHDM,289.7,M*26


Other versions from my code that don't work:


$PCHDM,289.7,M*35
$PCHDM,289,M*2C


Any ideas gratefully received.


Thanks,


Aedan

Dsanduril 21-04-2021 11:48

Re: NMEA0183 HDM, IIHDM, PCHDM and dashboard_tactics
 
Just as a test, what happens if you set your TalkerID to "HC"? That is a valid NMEA Talker ID (Heading - Magnetic Compass) and is recognized in the OpenCPN expanded ID routine. There are no valid (in the expanded ID routine) talkers that begin with "P". I think it should be ignored, but using a known Talker ID would be a good test point.

You could also try "YX" (transducer - undefined) and "CC" (Computer - Programmed Calculation).

I don't know if any of those would work, but if they do it points to an issue with an unknown identifier.

AedanC 21-04-2021 13:09

Re: NMEA0183 HDM, IIHDM, PCHDM and dashboard_tactics
 
I tried HC and it works find. I chose PC randomly as I thought the talker ID would be ignored but just now I have read that P* is vendor specific. It was a bad random choice.


Thanks everyone for all your help, hopefully I can help one of you out with something someday.


Aedan

Dsanduril 21-04-2021 13:52

Re: NMEA0183 HDM, IIHDM, PCHDM and dashboard_tactics
 
Thanks for the report back. Interesting that the expanded identifier is not ignored. With the proliferation of new Talker IDs I've seen of late might need to look into the code to see why it is not accepted.

AedanC 21-04-2021 15:13

Re: NMEA0183 HDM, IIHDM, PCHDM and dashboard_tactics
 
When looking into that do bear in mind that anything starting with P is a special case as itís vendor specific. It may well be legitimate to ignore P???? sentences, Iíll leave it open for discussion.

Canne 22-04-2021 13:02

Re: NMEA0183 HDM, IIHDM, PCHDM and dashboard_tactics
 
Quote:

Originally Posted by AedanC (Post 3392485)
When looking into that do bear in mind that anything starting with P is a special case as itís vendor specific. It may well be legitimate to ignore P???? sentences, Iíll leave it open for discussion.

Correct Aedan, it is defined in OpenCPN Dashboard, at this line. Consequently, also in dashboard_tactics. It allows, among other manufacturers NKE to define its own performance records.


All times are GMT -7. The time now is 15:53.

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


ShowCase vBulletin Plugins by Drive Thru Online, Inc.