|
|
28-06-2019, 23:34
|
#241
|
Registered User
Join Date: Mar 2017
Posts: 804
|
Re: New Plugin NmeaConvertor
Quote:
Originally Posted by keoe
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?
|
Cool as you understand what it is you'll be able set it up just fine then, it can do it, RTFM; which you can find here
|
|
|
28-06-2019, 23:53
|
#242
|
Registered User
Join Date: Apr 2019
Posts: 21
|
Re: New Plugin NmeaConvertor
Quote:
Originally Posted by Moo
Cool as you understand what it is you'll be able set it up just fine then, it can do it, RTFM; which you can find here
|
Dear Moo,
Thank you for your kind reply...
In my bok, knowledge about how a compass work and how to compensate for magnetic variation and deviation does not mean knowledge about NMEA sentences
|
|
|
03-07-2019, 13:33
|
#243
|
Registered User
Join Date: Jul 2019
Posts: 11
|
Re: New Plugin NmeaConvertor
Hi
I am looking at NMEAconverter to send data to a mast display. I dont have a PC available right now, so till I borrow it, maybe its easier to ask the questions here.
I have the Tactics plugin output a sentence specific to NKE displays, indicating polar boat speed. It looks like:
$PNKEP,01,5.5,N,9.6,K
where 5.5 is the target boat speed I want to display.
I want NMEAtranslator to translate this to:
$--WHV,,T,,M,,5.5,N,9.6,K
and then I want to filter and send this on a separate USB-NMEA converter to a simple and cheap speed display, which will think its my actual boat speed (I wish) and display it to the crew as target.
questions:
-can NMEAconverter read $PNKEP,01?
-is there a way to have this sent directly to the USB, or will the resulting WHV sentence cause confusion in OpenCPN (I can filter it to output only on the usb and not on the wifi for the ipads)
thank you
Balazs
|
|
|
03-07-2019, 21:57
|
#244
|
Registered User
Join Date: Aug 2010
Location: Netherlands
Boat: Oneoff
Posts: 510
|
Re: New Plugin NmeaConvertor
The converter reads any sentence that starts with a "$" and has at least one ",".
AFAIK the WHV sentence is not used in OpenCPN so it shouln't harm.
btw you could also add a small calculation with SOG or STW and display the result as a performance 0 .. 100%
__________________
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.
|
|
|
04-07-2019, 07:40
|
#245
|
Registered User
Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,523
|
Re: New Plugin NmeaConvertor
rbhun,
If you use nmeaconverter, will you be kind enough to share the particulars of your use with us so that we can add that as an example in the manual?
|
|
|
04-07-2019, 11:05
|
#246
|
Registered User
Join Date: Jul 2019
Posts: 11
|
Re: New Plugin NmeaConvertor
I started working on this and ran into a problem.
The Tactics plugin outputs the nke marine display format. That is, $PNKEP,01, x.x
the problem is that $PNKEP,01 has different data than $PNKEP,04. But nmeaconverter seems to think they are both the same data.
So I have created a code in the converter:
$XXVHW, $PNKEP4
and I have incoming sentences:
$PNKEP,01, 5.6,N, 10.38,K
$PNKEP,04, -nan, -nan, -40.4, 83.3
and the result is
$XXVHW, 10.38
$XXVHW, -40.4
I cannot make the code differentiate between $PNKEP,01 and $PNKEP,04
is there an IF = function..?
|
|
|
04-07-2019, 11:23
|
#247
|
Registered User
Join Date: Aug 2010
Location: Netherlands
Boat: Oneoff
Posts: 510
|
Re: New Plugin NmeaConvertor
No there is no IF function but there is a wildcard. (RTFM )
But you only can make the difference is the second field is a non number.
So to get $XXVHW, 10.38, -40.4 you need something as
$XXVHW, $PNKEP?????????N1, $PNKEP??????nan2
But this will only work if the length of '$PNKEP,01, 5.6,N' is always the same length.
__________________
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.
|
|
|
04-07-2019, 11:29
|
#248
|
Registered User
Join Date: Jul 2019
Posts: 11
|
Re: New Plugin NmeaConvertor
I’m not sure I follow. The ? Wildcard can stand in for anything, comma, space etc?
And why do you add N1? Not just 1?
|
|
|
04-07-2019, 11:39
|
#249
|
Registered User
Join Date: Aug 2010
Location: Netherlands
Boat: Oneoff
Posts: 510
|
Re: New Plugin NmeaConvertor
Instead of using $PNKEP4 (The forth field is 10.38) U use as identifier $PNKEP?????????N but now 10.38 is the first field after the identifierstring therfore $PNKEP?????????N1
And why do you add N1? Not just 1? Because N is part of the input sentence, the first non number after $PNKEP
PS now I start wondering myself maybe it schould be $PNKEP?????????N4
__________________
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.
|
|
|
04-07-2019, 17:21
|
#250
|
Registered User
Join Date: Jul 2019
Posts: 11
|
Re: New Plugin NmeaConvertor
Quote:
Originally Posted by rooiedirk
And why do you add N1? Not just 1? Because N is part of the input sentence, the first non number after $PNKEP
|
I think I got it, but the differentiating character cannot be a number...
if I have $PNKEP,01 and $PNKEP,03 the filter should be $PNKEP?01 but the last 1 is not used as a filter, its used to select the data to be picked. So this filter will go for both $PNKEP,01 and $PNKEP,03 and display the first data (in this case 1 and 3)
however I was able to construct another custom message. $PNKEA,PO is polar speed and $PNKEA,BS is boat speed. In this case, using $PNKEA?BS1 will correctly filter to boat speed, first data.
the question now, is how to divide by 100 and not to lose the decimals. Now if I divide 329 by 100, I got 3, not 3.29 (speeds are being sent without decimals)
BTW:
if I enter $PNKEA?BS1 and add a decimal after OpenCPN crashes.
UPDATE:
to divide by 100 and not to lose decimals, you have to multiply by 0.01 and then the decimals are preserved. Dont enter *0. because O will crash, enter *001 and add the . after
|
|
|
04-07-2019, 22:08
|
#251
|
Registered User
Join Date: Aug 2010
Location: Netherlands
Boat: Oneoff
Posts: 510
|
Re: New Plugin NmeaConvertor
Quote:
Originally Posted by rbhun
UPDATE:
to divide by 100 and not to lose decimals, you have to multiply by 0.01 and then the decimals are preserved. Dont enter *0. because O will crash, enter *001 and add the . after
|
The plugin code could use some more bad input detection, indeed now it sees the ending '.' and doesn't know how to handle it if at that moment a calculation is started.
__________________
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.
|
|
|
13-07-2019, 06:34
|
#252
|
Registered User
Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,523
|
Re: New Plugin NmeaConvertor
I think we need to add some good points made by Dirk and others, to the manua, also some more examples. I will do that soon,when I get a chance.
Also there is a pretty good list of desireable features from this thread. Is there someone willing to post this list and add it to tracker, or even better, make a PR to Dirk's repos?
This plugin is gaining traction and has a good record of practical solutions. Thank you Dirk!
|
|
|
03-12-2019, 10:02
|
#253
|
Registered User
Join Date: Dec 2019
Posts: 2
|
Re: New Plugin NmeaConvertor
Hello there,
I am testing nmeaConverter. I'd like to create waypoint closing velocity from RMB. Here is my convertion string:
$ECWCV,$ECRMB12,N,$ECRMB5
Unfortunately the converter consider the waypoint ID ($ECRMB5) as a number and introduce a dot (.):
Quote:
--> 18:51:26 (Serial:/dev/ttyUSB0) $ECRMB,A,0.020,L,001,002,4330.719,N,00658.396,E,9. 354,168.236,-0.296,V,A*54
18:51:26 (Virtual $ECWCV,-0.3,N,2.0*0A<0x0D><x0A>
--> 18:51:26 (Serial:/dev/ttyUSB0) $ECWCV,-0.3,N,2.0*0A
|
How could I transmit the Waypoint ID as a string ?
Thanks a lot
Tico.
|
|
|
03-12-2019, 11:10
|
#254
|
Registered User
Join Date: Aug 2010
Location: Netherlands
Boat: Oneoff
Posts: 510
|
Re: New Plugin NmeaConvertor
@Tico,
You could try:
$ECWCV,$ECRMB12,N,int($ECRMB5)
Not sure however if it will work, and you will loose the leading zero's
__________________
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.
|
|
|
03-12-2019, 11:40
|
#255
|
Registered User
Join Date: Dec 2019
Posts: 2
|
Re: New Plugin NmeaConvertor
Quote:
Originally Posted by rooiedirk
@Tico,
You could try:
$ECWCV,$ECRMB12,N,int($ECRMB5)
Not sure however if it will work, and you will loose the leading zero's
|
Thanks a lot for your support. I'll give it a try, but I believe I need to have the exact wp id.
|
|
|
|
|
Thread Tools |
Search this Thread |
|
|
Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
Advertise Here
Recent Discussions |
|
|
|
|
|
|
|
|
|
|
|
|
Vendor Spotlight |
|
|
|
|