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 18-03-2019, 01:02   #226
Registered User

Join Date: Aug 2016
Location: Stockholm, Sweden
Posts: 272
Re: New Plugin NmeaConvertor

Thanks Dirk for your prompt reply,
I am well aware of the difference and that is why I am generating an 'XXHDM' based on the first field in 'HDG and adding an 'M', omitting the other fields in HDG.

$--HDM,x.x,M*hh<CR><LF>Field Number:

  1. Heading Degrees, magnetic
  2. M = magnetic
  3. Checksum

/LennartG
LennartG is offline   Reply With Quote
Old 18-03-2019, 01:07   #227
Registered User
 
rooiedirk's Avatar

Join Date: Aug 2010
Location: Netherlands
Boat: Oneoff
Posts: 510
Re: New Plugin NmeaConvertor

But in nmea you are not free to simple omit data fields. It is a fixed data structure.
You may leave fields empty though, so
$XXHDM,$ECHDG1,,,,
should also be valid.
__________________
Navigation is know where you are and what to do to get where you want.
But also: Know where you don't want to be and what to do to don't get there.
rooiedirk is offline   Reply With Quote
Old 18-03-2019, 01:13   #228
Registered User

Join Date: Aug 2016
Location: Stockholm, Sweden
Posts: 272
Re: New Plugin NmeaConvertor

Dirk,
as I read it 'HDM' only has three fields and I have supplied all three. What you are suggesting is 'extending' the HDM with additional fields from HDG.
I will try that later as I'm a bit busy right now.
/LennartG
LennartG is offline   Reply With Quote
Old 18-03-2019, 01:17   #229
Registered User
 
rooiedirk's Avatar

Join Date: Aug 2010
Location: Netherlands
Boat: Oneoff
Posts: 510
Re: New Plugin NmeaConvertor

Quote:
Originally Posted by LennartG View Post
Dirk,
as I read it 'HDM' only has three fields and I have supplied all three. What you are suggesting is 'extending' the HDM with additional fields from HDG.
I will try that later as I'm a bit busy right now.
/LennartG
Oops, you are right
Your commandsentece should work. Is there something in the log to help find out what's going on?
__________________
Navigation is know where you are and what to do to get where you want.
But also: Know where you don't want to be and what to do to don't get there.
rooiedirk is offline   Reply With Quote
Old 18-03-2019, 04:15   #230
Registered User

Join Date: Aug 2016
Location: Stockholm, Sweden
Posts: 272
Re: New Plugin NmeaConvertor

Dirk,
the logs are empty (regarding this 'happening'). I have tried this on both 4.8.8 and 4.9.9 with exactly the same result. Running Ubuntu 16.04 XFCE.
My guess is that 'HDM' somehow is not 'enabled', it is not in the list on the NmeaConverter documentation pages. It is however used for the Dashboard magnetic heading and is listed as such in the OpenCPN 'NMEA 0183 Sentences', section 'Dashboard Plugin'.
Otherwise: Not a clue, not being a programmer but former system administrator.
/LennartG
LennartG is offline   Reply With Quote
Old 18-03-2019, 07:32   #231
Registered User
 
rooiedirk's Avatar

Join Date: Aug 2010
Location: Netherlands
Boat: Oneoff
Posts: 510
Re: New Plugin NmeaConvertor

A quick test here works as it should be.
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20190318_153014.png
Views:	107
Size:	112.0 KB
ID:	188273  
__________________
Navigation is know where you are and what to do to get where you want.
But also: Know where you don't want to be and what to do to don't get there.
rooiedirk is offline   Reply With Quote
Old 18-03-2019, 08:29   #232
Registered User

Join Date: Aug 2016
Location: Stockholm, Sweden
Posts: 272
Re: New Plugin NmeaConvertor

Dirk,
this was really odd!
Using the same signals as in the picture and assuming that:
message 0 is sent after update
message 1 is generated once per second
it works just fine here as well!

Now adding the ECHDG from an external source (replacing signal '1' in the picture) causes OpenCPN to hang. The external signal used is 'ECHDG,184.4,,,6.6,E', completely valid and generated thru gpsfeed+.

The error: Not in NmeaConverter nor OpenCPN but a bug in gpsfeed+ that calculates the checksum the wrong way!

Line 1901 (about) in the tcl-script should read 'return [format %02X $xor]', the '02' was omitted causing the checksum to be in error. That together with OpenCPN hanging (feels a bit drastic though) fooled me completely!

Thanks for your assistance and effort
/LennartG
LennartG is offline   Reply With Quote
Old 31-03-2019, 12:45   #233
Registered User

Join Date: Apr 2018
Posts: 379
Re: New Plugin NmeaConvertor

Hi!

Awesome plugin. I am having one issue with wind data: it seems like the wind data is being sent too quickly? Basically only 1 our of 4-5 of the messages are being updated as I want them to (I'm changing the wind angle). Am I doing something wrong? Is there a way I can have OpenCPN ignore the other sentence?
odonnellryan is offline   Reply With Quote
Old 01-04-2019, 00:11   #234
Registered User
 
rooiedirk's Avatar

Join Date: Aug 2010
Location: Netherlands
Boat: Oneoff
Posts: 510
Re: New Plugin NmeaConvertor

Some more info please. What exactly is your input, what is your command sentence and what is the output. And what is the desired ouput.
__________________
Navigation is know where you are and what to do to get where you want.
But also: Know where you don't want to be and what to do to don't get there.
rooiedirk is offline   Reply With Quote
Old 01-04-2019, 04:18   #235
Registered User

Join Date: Apr 2018
Posts: 379
Re: New Plugin NmeaConvertor

Rooiedirk, I don't have the exact data right now (not on the boat) but it is essentially:

Input (from wind device which goes to another Pi device (PyPilot) which is then sent to the main OpenCPN device):

$ARMVW,10,R,1.1,M*a1

Command sentence (just trying to change the degrees by 120 about):

$xxMVW,$ARMVW1+120,$ARMVW2,$ARMVW3,$ARMVW4,$ARMVW5

Output is correct, it would look like this:

$ARMVW,130,R,1.1,M*a1

Which is the desired output.

HOWEVER, I'll get multiple inputs sent before getting an output (it is NOT on the 1 sentence a second setting).

I thought this might have been because in the docs it is mentioned "update will be sent after every variable has changed" but I'm not sure if that means anything?

My other option is to change this on the other device, the PyPilot. Maybe that would work? That is more effort and I'd rather not take it out of the case etc.. that I have it installed in if I don't need to.
odonnellryan is offline   Reply With Quote
Old 01-04-2019, 04:51   #236
Registered User
 
rooiedirk's Avatar

Join Date: Aug 2010
Location: Netherlands
Boat: Oneoff
Posts: 510
Re: New Plugin NmeaConvertor

If I use the same plugin to send "$ARMVW,10,R,1.1,M" every second, and "$xxMVW,$ARMVW1+120,$ARMVW2,$ARMVW3,$ARMVW4,$ARMVW 5" upon received all data, it works just nice here.
All I can think off: Are your incoming checksums OK, and didn't you make a typing error?
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20190401_134442.png
Views:	72
Size:	92.6 KB
ID:	189149  
__________________
Navigation is know where you are and what to do to get where you want.
But also: Know where you don't want to be and what to do to don't get there.
rooiedirk is offline   Reply With Quote
Old 01-04-2019, 04:58   #237
Registered User

Join Date: Apr 2018
Posts: 379
Re: New Plugin NmeaConvertor

Quote:
Originally Posted by rooiedirk View Post
If I use the same plugin to send "$ARMVW,10,R,1.1,M" every second, and "$xxMVW,$ARMVW1+120,$ARMVW2,$ARMVW3,$ARMVW4,$ARMVW 5" upon received all data, it works just nice here.
All I can think off: Are your incoming checksums OK, and didn't you make a typing error?
I did that test too! Works fine, I figured because the frequency of the messages is just 1 second. The messages from the windvane come in bursts.

The wind direction changes fine - the issue is it "jumps" on the dashboard between my 2 directions. Usually it stays on the "bad" direction because the signals go like this:

$ARMVW ....
$xxMVW ....
$ARMVW ....
$ARMVW ....
$ARMVW ....


So you'll get the one good one, changes that one, then you get 4 other signals which cause the "bad" direction to stick in the dashboard until the next update.

I can browse through the code at some point. I thought it just may have been a user error or something. I don't want to waste time if it is something more complicated

> Are your incoming checksums OK, and didn't you make a typing error?

Not sure actually how to check checksums, I'll have to do that. But like I said it does work - but the frequency of the messages causes the other value to be the one that is mostly displayed.
odonnellryan is offline   Reply With Quote
Old 28-06-2019, 10:48   #238
Registered User

Join Date: Apr 2019
Posts: 21
Re: New Plugin NmeaConvertor

Hi,

I want to convert HDM to HDT to get the right heading of the ship symbol (my compass is adjusted for the magnetic variation). Unfortunately my knowledge about NMEA sentences is too low to achieve that.
Is there anyone that could helpe me?
keoe is offline   Reply With Quote
Old 28-06-2019, 21:23   #239
Moo
Registered User

Join Date: Mar 2017
Posts: 804
Re: New Plugin NmeaConvertor

Quote:
Originally Posted by keoe View Post
Hi,

I want to convert HDM to HDT to get the right heading of the ship symbol (my compass is adjusted for the magnetic variation). Unfortunately my knowledge about NMEA sentences is too low to achieve that.
Is there anyone that could helpe me?

That is not something that you would generally do. Your compass is usually adjust for deviation (the error) and you can adjust for declination but this can only ever be temporary as it changes continually.



What compass is producing the HDM sentance? Can it be set to transmit True? otherwise True is Mag + Variation (E) + Deviation
Moo is offline   Reply With Quote
Old 28-06-2019, 23:17   #240
Registered User

Join Date: Apr 2019
Posts: 21
Re: New Plugin NmeaConvertor

Quote:
Originally Posted by Moo View Post
That is not something that you would generally do. Your compass is usually adjust for deviation (the error) and you can adjust for declination but this can only ever be temporary as it changes continually.



What compass is producing the HDM sentance? Can it be set to transmit True? otherwise True is Mag + Variation (E) + Deviation
I am fully aware of what magnetic variation and deviation means. In the area where I sail, the Magnetic variation is small and the annual change is less than 0.1 degrees per year.

Since it not possible to set the compass to send the HDT message, I want to convert HDM to HDT. Is that possible via the NMEAConverter plugin?
keoe is offline   Reply With Quote
Reply

Tags
nmea, plug

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
Calculator_pi New Finished Plugin for OpenCPN SaltyPaws OpenCPN 136 28-12-2022 07:19
New IAC Fleetcode Plugin for OpenCPN CBorchardt OpenCPN 77 23-04-2019 05:40
New Plugin Development on Linux globalkeith OpenCPN 5 03-05-2012 07:16
New History Plugin for OpenCPN seandepagnier OpenCPN 11 04-10-2010 14:11

Advertise Here


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


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.