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 03-12-2019, 13:12   #256
Registered User

Join Date: Nov 2019
Posts: 39
Re: New Plugin NmeaConvertor

Good afternoon gang,

I'm trying to get my Maretron WSO100 weather sensor to input data into the OpenCPN dashboard. I struggled for a bit with the incoming XDR sentence converting over to MDA, but after finally figuring out NMEAConverter I was able to get Air Temp and Barometric Pressure to come online. The problem I'm having is specifically (I think) with NMEAConverter. The pressure is coming in the XDR stream as bars, but really 100 x bars, an example being the data showing today is 98500. OpenCPN needs this to read (apparently) 0.985 to register correctly. I have attempted to insert a mathematical function to chop the 98500 down to 0.985 (divide by 100000), but OpenCPN is truncating the output to 1. I can see it doing this truncation as I divide by 10, then 100, then 1000, etc...it keeps dumbing down the number and both rounding up as well as reducing the decimal feedback. I've attached a screen shot of my specific example. I'm curious how to fix this, as with a reading of 1 from an output of 98500, I don't believe there will be any change in barometric pressure on the dashboard gauge regardless of the change in pressure. It currently reads 1000mbar at an output of 1 on the MDA stream. Any help would be appreciated.
Attached Thumbnails
Click image for larger version

Name:	1.png
Views:	90
Size:	35.0 KB
ID:	204299   Click image for larger version

Name:	2.png
Views:	84
Size:	32.2 KB
ID:	204300  

AboardAdventurer is offline   Reply With Quote
Old 04-12-2019, 07:59   #257
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,150
Re: New Plugin NmeaConvertor

You're correct that Dashboard-tactics_pi use a value of bar(g) > .8 < 1.1

Hopefully the calculation handle double in the calculations but if only float the 1/100000 will be strange.
A long shot >> try $IIXDR6/100000 or $IIXDR6*10^-5
But if the strange XDR sentence always use five digits a normal pressure, 10130, will be incorrect anyhow.
Hakan is offline   Reply With Quote
Old 05-12-2019, 04:47   #258
Registered User

Join Date: Nov 2019
Posts: 39
Re: New Plugin NmeaConvertor

I'm away from the setup for a few days, but I can confirm that the $IIXDR6/100000 does the exact same thing. I'll try the version with the exponent, but I suspect it will also do the same thing. It almost seems like the XDR sentence is pre-configured within either OpenCPN or NMEAConverter to reduce down at that "position" within the sentence. The temperature portion of the code as well as the humidity portion of the code doesn't do it...just the 6th position (as best I can tell from limited testing). I know openCPN supposedly can also accept XDR sentences directly for just humidity, but I have had no success making this work. The only benefit to this would be that I believe the XDR sentence can accept not just 0.8-1.1, but also 800 to 1100. Why does OpenCPN only accept MDA sentences with humidity between 0.8 and 1.1? This seems rather silly to me....a number is a number and it just needs to display it....why not just report whatever is coming in thru the sentence?



AA
AboardAdventurer is offline   Reply With Quote
Old 10-12-2019, 09:35   #259
Registered User

Join Date: Nov 2019
Posts: 39
Re: New Plugin NmeaConvertor

Tried the code with an exponent and it did the same thing. I came across a thread (of course I can't find it now) describing that the Dashboard plugin sets the decimal count for a particular NMEA incoming sentence fragment by the amount of decimals the incoming data has. I.E, if 0.15 is brought in, than that sentence fragment will always have x.xx available, regardless of the math applied. In my case, I bring in a whole number, no decimals, so it doesn't allow any decimal places. This is extremely frustrating and I'd really like to know what options I've got here...super expensive weather sensor that OpenCPN can barely talk to....doesn't seem right for an otherwise astounding amount of functionality....


AA
AboardAdventurer is offline   Reply With Quote
Old 10-12-2019, 13:02   #260
Registered User

Join Date: Nov 2019
Posts: 39
Re: New Plugin NmeaConvertor

SOLVED.



The math I required was $IIXDR/100000 because the data coming in was in Pascals (99700 today), but obviously OpenCPN Dashboard requires it to read 0.997 in order for everything to work in hPA. Dividing by 100000 was rendering a 1 as the output which is of course useless.



The trick is to add decimals to the divisor in the quantity you need, in my case 100000.000 allowed the data to correctly display in hpa. I hope this helps somebody out there...banged my head on the wall for days to figure this out and the solution is of course ridiculously stupid!!


Best.



AA
AboardAdventurer is offline   Reply With Quote
Old 10-12-2019, 13:29   #261
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,150
Re: New Plugin NmeaConvertor

AA..
Congratulations. Well done. And as usual....Of course! That's one way to tell the compiler this is a float, with decimals, and not a integer, without decimals. On the other hand it's not expected that a average user would know anything about that. So it may be the plugin code would take care of that.
Hakan is offline   Reply With Quote
Old 12-12-2019, 01:05   #262
Registered User
 
rooiedirk's Avatar

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

The plugincode does as is. indeed a check for the number of decimals in the input, and uses the same amount in the output.
I could try to add something to format the output. My first idea is then to add something like the printf formating https://www.cprogramming.com/tutoria...t-strings.html
This would be relative simple coding and give a lot of flexibility. Any other ideas??
__________________
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 23-12-2019, 12:43   #263
Registered User
 
Antipole's Avatar

Join Date: Oct 2019
Location: Emsworth, UK
Boat: Alubat Ovni 395
Posts: 287
Re: New Plugin NmeaConvertor

Can SKS point me to the latest Mac package for NMEAConverter, please? The manual only has the Windows versions and the thread only a link to an very old package.
Thanks.
Antipole is offline   Reply With Quote
Old 05-01-2020, 20:47   #264
Registered User

Join Date: Sep 2012
Posts: 25
Re: New Plugin NmeaConvertor

Just wondering if I should of posted the link here, I originally had on main Opencpn Forum page, however it's more of a NMEA Converter question.

http://www.cruisersforum.com/forums/...on-216079.html

Basically I want to put take the first field value in a MWV sentence, and add 60 degrees to the value and use the new value for OpenCPN Wind display, and output to STNG.

Original thread link has Debug sentences, and screen shot, and of course the processes I've tried/had suggested etc.

Thanks for any advise
goodwinds is offline   Reply With Quote
Old 06-01-2020, 02:00   #265
Registered User
 
rooiedirk's Avatar

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

Sorry, that won't work. You can not send a sentence with the same identifier as you use for composing it. This would cause an infinite loop.
__________________
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 06-01-2020, 07:53   #266
Registered User
 
rgleason's Avatar

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

You could try blocking that sentence in O
and send it in on a separate virtual port
Using Paul Elliots navmonpc http://www.navmonpc.com/

Nope that won't work you need to use nmeaconverter between navmonpc and O and that is not possible.

Just get it calibrated or fixed.
rgleason is offline   Reply With Quote
Old 06-01-2020, 13:23   #267
Registered User

Join Date: May 2012
Posts: 1,206
Re: New Plugin NmeaConvertor

What about using the redundant sentence "VWT"? Will the dashboard still recognise this? Convert from "MWV" to "VWT".

Mike
Rasbats is offline   Reply With Quote
Old 06-01-2020, 13:58   #268
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,150
Re: New Plugin NmeaConvertor

Mike..
Both VWR and VWT are parsed in Dashboard as before.
Hakan is offline   Reply With Quote
Old 06-01-2020, 14:09   #269
Registered User

Join Date: Sep 2012
Posts: 25
Re: New Plugin NmeaConvertor

Quote:
Originally Posted by Rasbats View Post
What about using the redundant sentence "VWT"? Will the dashboard still recognise this? Convert from "MWV" to "VWT".

Mike
Interesting thought, then display True wind on O as my apparent wind!!
However, someone smarter than me would need some funky calculation to add 60degrees, and change the L or R in the sentences with the converter.

Example, ST50 NMEA0183 sentence to O is 140 R, while the actual ST50 display shows 170 L (or relative 190 R), so while it might work for wind angles less than 130 degrees, issues may arise when passing through 180, or maybe 0 degrees, the calculation would require R & L manipulation, though interesting idea.

I know the output sentence from the ST50 is wrong, however replacing the instrument and vane just so I can display on O, and use Vane mode on AP seems excessive.

What if the Wind direction on O is still incorrect, Then I block the output sentence of MWV and then could I use the NMEA converter to modify a output sentence in VWT back to AP, so at least the AP could use Vane mode.

I'm not sure what sentences the Evo 1 accepts, especially since its via a Actisence, and ST-STNG converter.
goodwinds is offline   Reply With Quote
Old 07-01-2020, 01:03   #270
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,150
Re: New Plugin NmeaConvertor

goodwinds..
What OS do you use for OCPN? If on Win I've small patch to Dashboard if you would like to be a test pilot. I added an option to enter MWV wind angel offset.
Attached Thumbnails
Click image for larger version

Name:	windoffset.png
Views:	82
Size:	59.8 KB
ID:	206470  
Hakan 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 14:44.


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.