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 22-04-2020, 01:27   #301
Registered User

Join Date: Sep 2013
Location: Auckland
Boat: Logan 33
Posts: 193
Re: New Plugin NmeaConvertor

Checksum question.
This sentence in the Preferences dialog box.....
$GPRMC,000532.39,A,3649.13831,S,17445.94387,E,0.00 ,33.4,240320,,E,A
results in that sentence with checksum '*39' being appended sent from OpenCPN.

But checksum generator https://nmeachecksum.eqth.net/ gives a checksum of *09

Any ideas? (I've checked the sentences are 'the same' and don't have the extra space)
daveNZ is offline   Reply With Quote
Old 22-04-2020, 02:27   #302
Registered User
 
rooiedirk's Avatar

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

Two points. In your sentence above there is a space after the 0.00. Second the plugin is removing the leading zero's from the first number.
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20200422_111346.png
Views:	60
Size:	82.9 KB
ID:	213440  
__________________
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 22-04-2020, 03:03   #303
Registered User

Join Date: Sep 2013
Location: Auckland
Boat: Logan 33
Posts: 193
Re: New Plugin NmeaConvertor

thanks. I had removed the space in the NMEAconvertor dialog box (but forgot to check in this thread) but the removal of leading zeroes explains the difference in checksum, and I hadn't noticed that.
many thanks.
daveNZ is offline   Reply With Quote
Old 22-04-2020, 06:24   #304
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,713
Images: 2
Re: New Plugin NmeaConvertor

For future checksum questions, there is an page of Online Nmea tools
https://opencpn.org/wiki/dokuwiki/do...l:online_tools
rgleason is online now   Reply With Quote
Old 22-04-2020, 06:45   #305
Registered User
 
Dsanduril's Avatar

Join Date: Aug 2011
Location: Petersburg, AK
Boat: Outremer 50S
Posts: 4,229
Re: New Plugin NmeaConvertor

Just for reference, the space after the 0.00 is an artifact of this forum. In the posted version the forum software places a space after any "word" (continuous string of characters) that is > 50 characters. This space won't/doesn't exist in the edit box, only in the final post. I opened a thread about it with forum help, not much/anything that can be done.

This drove me nuts for probably a year. Bottom line, when debugging long NMEA sentences here on CF, anyone working with a posted sentence must remove the space character at the 51st position in the sentence (and presumably out at 100 as well, but I haven't encountered that).

[Edit] maybe I shouldn't be so categorical, it could be browser related although I have tried 5 different browsers. And it could be related to the way NMEA sentences are built. Either way, for many/most, posting a sentence > 50 characters results in a space in the final post.
Dsanduril is offline   Reply With Quote
Old 22-04-2020, 07:45   #306
bcn
Registered User

Join Date: May 2011
Location: underway whenever possible
Boat: Rangeboat 39
Posts: 4,796
Re: New Plugin NmeaConvertor

You might want to use the code brackets in this cases when citing NMEA outputs

Code:

[code....  

[/code....
Instead of "...." use the closing square bracket "]"
bcn is offline   Reply With Quote
Old 22-04-2020, 09:10   #307
Registered User
 
Dsanduril's Avatar

Join Date: Aug 2011
Location: Petersburg, AK
Boat: Outremer 50S
Posts: 4,229
Re: New Plugin NmeaConvertor

Here's a quick test.

Code:
$GPRMC,000532.39,A,3649.13831,S,17445.94387,E,0.00,33.4,240320,,E,A
Quote:
$GPRMC,000532.39,A,3649.13831,S,17445.94387,E,0.00 ,33.4,240320,,E,A
Plaintext:
$GPRMC,000532.39,A,3649.13831,S,17445.94387,E,0.00 ,33.4,240320,,E,A

Indeed, the code box seems to work Although getting every user having problems with NMEA to know to use it...
Dsanduril is offline   Reply With Quote
Old 22-04-2020, 09:14   #308
bcn
Registered User

Join Date: May 2011
Location: underway whenever possible
Boat: Rangeboat 39
Posts: 4,796
Re: New Plugin NmeaConvertor

The code box will avoid the conversion of characters into smileys as well
bcn is offline   Reply With Quote
Old 23-04-2020, 13:56   #309
Registered User

Join Date: Feb 2014
Location: Nederland
Boat: Dufour 40P
Posts: 20
Images: 1
Re: New Plugin NmeaConvertor

Hello,
My available GPS shows no magnetic variation in the Nmea line $NRMC. I do need this to control the outdoor repeaters. Opencpn now also has a table with variation. Unfortunately I don't know how to read this in the Nmea converter. Fortunately, the connected H5000 computer also has such a table. And it correctly sends out $SDHDG. HDG contains the correct magnetic variation. So I made the following line:

$XXRMC,$GNRMC01,$GNRMC02,$GNRMC03,$ GNRMC04,$GNRMC05,$GNRMC06,$GNRMC07,$GNRMC08,$GNRMC 09,$SDHDG04,$SDHDG05,$GNRMC12

It seems to work correctly:
Input:
- $GNRMC,121750.000,A,5149.5290,N,00407.1208,E,0.00, 196.04,230420 ,,, D*77
- $SDHDG,237.0,,,1.2,E*30

Output:
$XXRMC,121750.000,A,5149.5290,N,407.1208,E,0.00,19 6.04,230420,1.2, E,D*77

The problem is that the leading zeros are missing at the position coordinates (00407.1208 -> 407.1208). This gives a wrong position for position applies that 5 digits must exist for the point.

Question is it possible to do something with a format or as a solution to make the filtering of the leading zeros adjustable.

Greeting,
Arnold de Maa
arnolddemaa is offline   Reply With Quote
Old 23-04-2020, 14:24   #310
bcn
Registered User

Join Date: May 2011
Location: underway whenever possible
Boat: Rangeboat 39
Posts: 4,796
Re: New Plugin NmeaConvertor

The standard states for lat:


Quote:


Fixed/variable length field:
degrees/minutes and decimal – three fixed digits of degrees, two fixed digits of minutes and a variable number of digits for a decimal fraction of minutes. Leading zeros always included for degrees and minutes to maintain fixed length. The decimal point and associated decimal fraction are optional if full resolution is not required.

bcn is offline   Reply With Quote
Old 24-04-2020, 03:03   #311
Registered User

Join Date: Feb 2014
Location: Nederland
Boat: Dufour 40P
Posts: 20
Images: 1
Re: New Plugin NmeaConvertor

Quote:
Originally Posted by rooiedirk View Post
@Tico,
You could try:
$ECWCV,$ECRMB12,N,int($ECRMB5)
Not sure however if it will work, and you will loose the leading zero's
No sorry I need the leading zero's it is an position coördinaat
arnolddemaa is offline   Reply With Quote
Old 24-04-2020, 23:51   #312
Registered User
 
rooiedirk's Avatar

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

I just added some code to fix the leading zero problem. The bad news is, that you need to be able to compile your own version of the plugin.
https://github.com/RooieDirk/NmeaConverter_pi


The plugin looks now if a number starts with a "0", and if so the number of digits before the "." is used in the output. If a formula with more numbers is used the max no of digits is used. So ..... 0.23*0001 .... will output 0000.23.

The same trick works for the decimals. ... 0.23*1.0000 ... gives 0.2300
__________________
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 25-04-2020, 00:44   #313
Registered User

Join Date: Feb 2014
Location: Nederland
Boat: Dufour 40P
Posts: 20
Images: 1
Re: New Plugin NmeaConvertor

Quote:
Originally Posted by rooiedirk View Post
I just added some code to fix the leading zero problem. The bad news is, that you need to be able to compile your own version of the plugin.
https://github.com/RooieDirk/NmeaConverter_pi


The plugin looks now if a number starts with a "0", and if so the number of digits before the "." is used in the output. If a formula with more numbers is used the max no of digits is used. So ..... 0.23*0001 .... will output 0000.23.

The same trick works for the decimals. ... 0.23*1.0000 ... gives 0.2300

Thank you for the quick respons. The problem for me is the compiling. Maybe there is an other person who want to compile this nice piece of code for me. I use Windows 10 on my maritieme pc.

Best Regard Arnold
arnolddemaa is offline   Reply With Quote
Old 25-04-2020, 01:45   #314
Registered User

Join Date: Jul 2010
Location: Hannover - Germany
Boat: Amel Sharki
Posts: 2,546
Re: New Plugin NmeaConvertor

Quote:
Originally Posted by rooiedirk View Post
I just added some code to fix the leading zero problem. The bad news is, that you need to be able to compile your own version of the plugin.
What about an icon for nmeaconverter_pi?
CarCode is offline   Reply With Quote
Old 25-04-2020, 02:07   #315
bcn
Registered User

Join Date: May 2011
Location: underway whenever possible
Boat: Rangeboat 39
Posts: 4,796
Re: New Plugin NmeaConvertor

Dirk...


please take into account that following the NMEA0183/IEC61162 standard the leading zeros in the case of lat (four digits) and lon (five digits) are mandatory.

(I confused lat with lon in my previous post)


Example RMC
Code:
$--RMC,hhmmss.ss,A,llll.ll,a,yyyyy.yy,a,x.x,x.x,xxxxxx,x.x,a,a,a*hh<CR><LF> 

......

Leading zeros always included for  degrees and minutes to maintain fixed length. The decimal point and  associated decimal fraction are optional if full resolution is not  required. 


What I don't know if you can catch this from the plug-in or if the user shall take care using the implemented work-around.


Hubert


bcn is offline   Reply With Quote
Reply

Tags
nmea, plug


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 06:04.


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.