NMEA - HDG syntax error?

BlueSkyNick

Well-Known Member
Joined
29 Apr 2003
Messages
11,766
Location
Near a marina, sailing club and pub
Visit site
we have an original Autohelm 4000Mk1, Raymarine ST60 wind, depth and log, connected together into Seatalk-NMEA converter. Also have Garmin 152 GPS. all this information is displayed on an ICS Nav6 at the chart table. I've taken another feed off the converter into the laptop running Maptech, paralleled into a recently installed NASA AIS engine which in turn goes into the laptop. This is presenting its own issues, especially as I am using a serial-USB converter but that's another story.

My current problem relates to the HDG showing as 000 on the Nav6 .... and in Maptech. The Autohelm is showing and steering the heading correctly, so I have checked the NMEA sentences. I can see it OK in Hyperterminal, and have also discovered the Monitor function on the Nav6 which basically does the same job, ie displays the data coming into it - very useful.

so why is the HDG value showing ok in the sentence, but appearing as zero?

I phoned McMurdo to ask their Tech Support guru - who seemed to know his stuff. He said they don't process the data in any way, only display it - but it has to be correctly formatted, so maybe there is comma in the wrong place /forums/images/graemlins/confused.gif.

His suggestion is to reboot the Seatalk NMEA converter, but as it gets depowered after every outing I can't see that will make a difference.

ANy experts around here who can help me?
 
Can you capture some data in Hyperterminal so that we can take a gander? There are various heading sentences including HDT and HDG. They will be prefixed II so $IIHDG or $IIHDT

If you can post these I can check that they are valid

I have seen some firmware problems in the NMEA - Seatalk bridge. We have the same arrangement and for some reason it adds 32768 miles to the log before passing it onto the Nav6. This is where I suspect your problem lies
 
I think you might be confusing it with Track on the GPS, you have to be moving for the GPS to compute between one position and the next.

for heading, the fluxgate compass is working all the time, even when sat in the marina. it is correctly showing our heading on the Autohelm which in turn is appearing in the NMEA data - just not appearing on the display.
 
Which sentence are use using HDG from and what is the sentence header...at the start...can you post and example?
Also are your NMEA versions standardised throughout the system...?

Steve.
 
I would guess your heading source only outputs HDM, magnetic heading and that HDG is being generated in the Seatalk/NMEA Bridge. However, if there is no variation input on Seatalk or NMEA a valid true heading can't be calculated. Just a thought it might be something like this.
 
The only source of variation you are likely to have is from GPS which may generate it from an algorithim or manual input. There is an NMEA sentance other than the heading one's which includes it but I forget which sentence it is (VHR perhaps?). However, your GPS NMEA output would have to be an input to the Seatalk/NMEA bridge along with magnetic heading input form the autopilot, presumably by Seatalk. The bridge would then have the data to output valid HDG and HDT setences as well as HDM. However, this is all speculation as I don't know if lack of variation data is the problem in the first place!
 
The HDG message is made up as follows:

$--HDG,x.x,x.x,a,x.x,a*hh<CRLF>

The two dashes can be almost anything (often HS for heading sensor), most units reading in data do not bother checking. The first x.x is the magnetic heading, the second the magnetic deviation with the a being E/W and the third the magnetic variation with the a as E/W.

So from this true heading can be calculated.

Now the rub is that most heading sensors do not have a method of setting the deviation and variation so they send them as either a null (0.0) value or more often as nothing. So when it arrive at something expecting an HDG value it cannot work out what to do with the data, so it gets discarded.
 
Much as I feared then. My guess is older autopilots only output HDM which is what makes me think the Autohelm in this thread probably only supplies that sentence and the Seatalk/NMEA bridge is generating the HDG sentence but possibly without any variation data to combine.
 
Here is a set of sentences between HDG's (a paragraph?), exceptI have x'd out the position.

this came from the GPS straight into Hyperterminal. At the same time, i could see identical data on the monitor function of the Nav6. ie HDG showing 042, but displaying 000.

I didn't disconnect the AIS engine due to domestic pressure to not spend any more time onboard than necessary, given that we had agreed on a non-boaty weekend !!

All help gratefully received.


$IIHDG,042.0,,,2,W*2A
$IIHDM,042.0,M*24
$IIHDT,040.0,T*26
$IIRMB,A,0.00,R,,CALSPIT LS,,,,,xxxx,xxxx,,,A*40
$IIRMC,105624,A,xxxxxx,N,xxxxxxxW,0.0,302.5,200506,2,W,A*15
$IIMWV,214.0,R,9.4,N,A*37
$IIMWV,214.0,T,9.4,N,A*31
$IIVHW,040.5,T,042.5,M,0.00,N,0.00,K*57
$IIVPW,0.00,N,0.00,M*52
$IIVWR,146.0,L,9.4,N,4.8,M,17.4,K*67
$IIVWT,146.0,L,9.4,N,4.8,M,17.4,K*61
$IIAPB,A,A,0.00,R,N,,,,,CALSPIT LS,138.0,M,,,A*3A
$IIBWC,105624,,,,,136.0,T,xxxx,M,xxxxx,N,CALSPIT LS*70
$IIDBT,4.5,f,1.37,M,0.75,F*17
$IIGLL,xxxxxxxx,N,xxxxxxxx,W,105624,A,A*42
$IIHDG,042.5,,,2,W*2F
$IIHDM,042.5,M*21
$IIHDT,040.5,T*23
 
No not straight from the GPS these sentences came from the Seatalk-NMEA bridge

You have 3 heading sentences: HDG, HDM and HDT. HDG is showing variation 2 degs W so derived true (HDT) is correctly showing 40.5 degs

I'll check syntax and checksums when back in office
 
Ok, So the HDG sentence shows 042.0 degrees. There are then two null fields where the deviation and its direction could be put. Then finally there is the variation of 2 degrees and its direction of west. All topped off with the checksum. So in essence a perfectly valid sentence under NMEA rules.

The HDM and HDT sentences are then both complete and seemingly correct.

So, the only answer I can come up with is that the NAV6 is expecting a fully populated HDG sentence and not one with empty fields.

You can easily test this by creating a fully valid sentence like:

$APHDG,132.2,2.0,W,3.9,E*40

Stick this in multiple times to a notepad file and save it. Hyperterminal can then send the file to your NAV6 (having been suitable rewired). If it then works OK, then you can send the original sentence and see if it falls down again.

Good luck.
 
thanks for your help chaps, i follow what you are saying.

what is puzzling me most is that it has worked fine for 2 years until now - when I fitted the AIS engine.

having saved the data, i will also send it to McMurdo to see if they can explain it themselves.
 
Checked out the syntax, all is fine

I think the clue is that you've fitted the AIS engine which runs out NMEA at a much higher speed (38400 baud). How is this integrated? Wondering if you are overloading the interface
 
An apology (in part) to Q E Too

[ QUOTE ]
Are you moving? You must be moving to get a heading reading.

[/ QUOTE ]

You were partly correct, so I humbly grovel for dismissing your comment. The simple answer is that if the boat has not moved since powering up the system, the displayed HDG is 000, even though it is receiving an input from the compass.

once the boat starts moving, the heading is displayed. when you then come to a stop again, as we did on a visitors pontoon at a different place, without switching the system off, it continues to display whatever heading you on at the time.

So I shall be advising the tech support at McMurdo how their product actually works ! /forums/images/graemlins/smile.gif
 
Top