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 07-01-2020, 11:17   #271
Registered User

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

Quote:
Originally Posted by Hakan View Post
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.
Cheers Hakan, Running Win10, so will give anything a try. If anything, it only teach me more.
Will check your attachment on PC later, it’s low res on my phone, and I can’t see the script.

Thanks Goodwind
goodwinds is offline   Reply With Quote
Old 07-01-2020, 12:24   #272
Registered User

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

Goodwind..
Ok, here is a link to a new dashboard_pi.dll to replace your existing. Extract the downloaded zip-file somewhere and read my included note.
https://www.dropbox.com/s/n2g0csm667..._test.zip?dl=1

When installed open OCPN and right click Dashboard->preferences ->Appearance. Edit "Wind angle offset....." to your needed offset and hit OK. Check if the offset is accurate. Otherwise change again. See shot


Note: The change to Dashboard only affects NMEA $xxMWV. Be sure to exclude any $xxVWR and $xxVWT from the actual connection. These massages are not (yet) corrected by the offset. See my second shot.


Good luck
Håkan
Attached Thumbnails
Click image for larger version

Name:	DB_offset.png
Views:	76
Size:	24.4 KB
ID:	206497   Click image for larger version

Name:	CON_VWR.png
Views:	79
Size:	35.5 KB
ID:	206498  

Hakan is offline   Reply With Quote
Old 07-01-2020, 22:57   #273
Registered User

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

Quote:
Originally Posted by Hakan View Post
Goodwind..
Ok, here is a link to a new dashboard_pi.dll to replace your existing. Extract the downloaded zip-file somewhere and read my included note.
https://www.dropbox.com/s/n2g0csm667..._test.zip?dl=1

When installed open OCPN and right click Dashboard->preferences ->Appearance. Edit "Wind angle offset....." to your needed offset and hit OK. Check if the offset is accurate. Otherwise change again. See shot


Note: The change to Dashboard only affects NMEA $xxMWV. Be sure to exclude any $xxVWR and $xxVWT from the actual connection. These massages are not (yet) corrected by the offset. See my second shot.


Good luck
Håkan

Hakan,

Excellent work, installed and tested and looks great so far. I had composed a longer email, however I did just get a Blue screen of death, so I will monitor this.

I haven't tested the full range of wind directions yet, just tested on mooring. So need to take through 180 degrees, and see if STW or SOG changes something with AWA or TWA. However O is reading exactly what my ST50 is!!!!

I checked the wind reading on the p70 pilot, however it till reads the old corrupted data.
On the Output filtering I blocked the 2 sentences same as the input, and tested. Then to test further, I turned off the Output to pilot option, then lost all wind angle/speed data on P70 pilot, so the pilot is reading the Output from O.

The Pilot as the option to choose data source, either from ST or NMEA2K-0183, or Auto, I selected each and no difference. I default back to NMEA which is from O.

Is there anyway to use the corrected MWV sentence as the Output in O, and potentially send the corrected offset data to output of MWV, or use a spare like VWT sentence to send to pilot? Or some other way to get the now corrected data to Pilot? Another challenge for the Brains trust.

I must admit, the only reason for this is to use Gybe inhibit on the pilot, which is sort of important downhill single handing!!

Again, Thanks heaps for your help

Goodwinds
Attached Thumbnails
Click image for larger version

Name:	Capture.PNG
Views:	77
Size:	58.1 KB
ID:	206544   Click image for larger version

Name:	Capture1.PNG
Views:	73
Size:	55.1 KB
ID:	206545  

Click image for larger version

Name:	Capture2.PNG
Views:	69
Size:	287.6 KB
ID:	206546  
goodwinds is offline   Reply With Quote
Old 07-01-2020, 23:14   #274
Registered User

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

Just checked the debug mode, so the incoming and output are still the same, so obviously the correction was done just to the O wind direction, which makes sense with what I'm seeing.
Attached Thumbnails
Click image for larger version

Name:	Capture3.PNG
Views:	75
Size:	71.7 KB
ID:	206547  
goodwinds is offline   Reply With Quote
Old 08-01-2020, 00:43   #275
Registered User

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

Quote:
Originally Posted by goodwinds View Post
Hakan,

Excellent work, installed and tested and looks great so far. I had composed a longer email, however I did just get a Blue screen of death, so I will monitor this.

I haven't tested the full range of wind directions yet, just tested on mooring. So need to take through 180 degrees, and see if STW or SOG changes something with AWA or TWA. However O is reading exactly what my ST50 is!!!!
The new offset correction for Dashboard is just for what's viewed there, nothing else.
Quote:
I checked the wind reading on the p70 pilot, however it till reads the old corrupted data.
Yes, ideally the offset correction should have been done to the data source on the wind sensor gadget. That's the usual way
Quote:
On the Output filtering I blocked the 2 sentences same as the input, and tested. Then to test further, I turned off the Output to pilot option, then lost all wind angle/speed data on P70 pilot, so the pilot is reading the Output from O.
Obviously P70 is using $xxVWR! Then I suggest you take away the In/Out filtering for VWR and VWT in OCPN connections. It may not disturb Dashboard and the new offset correction as long MWV is received. As said before is MWV prioritized in Dashboard. (If this offset function will be incorporated in OpenCPN also Dashboard's view of VWR/VWT has to be offset corrected as well.)
Quote:
The Pilot as the option to choose data source, either from ST or NMEA2K-0183, or Auto, I selected each and no difference. I default back to NMEA which is from O.

Is there anyway to use the corrected MWV sentence as the Output in O, and potentially send the corrected offset data to output of MWV, or use a spare like VWT sentence to send to pilot? Or some other way to get the now corrected data to Pilot? Another challenge for the Brains trust.

I must admit, the only reason for this is to use Gybe inhibit on the pilot, which is sort of important downhill single handing!!
No there's no way OCPN can manipulate data on the incoming network.
But... Your pilot P70 will probably not care about the wind angle offset. At least not for the wind pilot function. If you set it to hold a course relative the present wind angle when the function is activated it will do just that and don't care about the absolute figures. You can though be disturbed yourself if you read the wind data on the pilot. (On the other hand since VWR is used, where Left/Right signs are present, it can be unexpected reactions. Hmm.. Again -- correct the wind data source if possible instead of all this.)
Hakan is offline   Reply With Quote
Old 08-01-2020, 23:48   #276
zzz
Registered User

Join Date: Jul 2016
Posts: 12
Re: New Plugin NmeaConvertor

Quote:
Originally Posted by RhythmDoctor View Post
After some additional work tonight, I am concerned that this sentence in ZZZ's "dialect" of NMEA will fail except in certain quadrants of wind direction. The (obsolete) VWR and VWT sentences report angles from 0-180 with an additional parameter for L (left) or R (right). Fortunately, the Dashboard plugin recognized this and displays correctly.

But the newer MWV sentence syntax reports direction as 0-360° with no L or R provided. This creates a uniqueness issue for any use of the atan() function. tan(45°) =1. But tan (225°)=1 also. Conversely, atan(1) could be 45° or 225°. The answer is not unique without further information on the quadrant (such as L or R, which is provided by the obsolete VWR/VWT sentences).

Maybe this is why ZZZ's equation worked for others, but not for me (although the value > 1 within the atan() function still raises alarm bells). Perhaps my equation works for the obsolete VWR/VWT sentences, but ZZZ's equation is needed for MWV sentences.

Eventually, I suggest that examples of both types of sentences be included in the Wiki, but only after further testing. That testing must be sure to include wind angles from all four quadrants for a complete test.
This has been long overdue..., but I think you are totally right. The equation fails in certain quadrant. To solve this, I believe I need conditional statement and atan2 (rather than atan), both of which are not available in nmea conv. Now I’m thinking to let arduino to do this conversion.
zzz is offline   Reply With Quote
Old 24-03-2020, 21:48   #277
Registered User

Join Date: Mar 2020
Posts: 23
Re: New Plugin NmeaConvertor

Plugin just crashes in version 5. I tried setting things up before starting the data stream. Turning on the data stream crashes OpenCPN?
Jurien72 is offline   Reply With Quote
Old 25-03-2020, 03:53   #278
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 must provide greater detail if you want help. If you enter garbage you will likely crash anything. Start gradually. If you are creating a feedback loop, of course it will crash. Look at the examples in the wiki too, act like a very careful surgeon.
rgleason is offline   Reply With Quote
Old 25-03-2020, 07:28   #279
Registered User
 
Dsanduril's Avatar

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

Pretty sure I sent him down the wrong path, created a feedback loop with wildcards (working in a different thread where the converter came out as the solution).

@Jurien, replace the wildcard "??" with "GP" and all should be well with the plugin. My bad.
Dsanduril is offline   Reply With Quote
Old 26-03-2020, 20:27   #280
Registered User

Join Date: Mar 2020
Posts: 23
Re: New Plugin NmeaConvertor

Oh yeah, that's what happened. Our bad!
Jurien72 is offline   Reply With Quote
Old 16-04-2020, 18:00   #281
Registered User

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

Error trying to load something from a dynamic library for NMEAConvertor plugin.
MacOS 10.11.6 (El Capitan), OpenCPN 5.0.1 and what I think is the latest plugin package NmeaConverter-Plugin_0.2.pkg (download referenced much earlier in this thread)

I hope this is some basic version error or similar, I'm retired from system software work and hoping not to learn how to build MacOS libraires!
Any help much appreciated.
Dave

The error in the system log is ....
12:31:20 NZST: Error: dlopen(/Applications/OpenCPN.app/Contents/PlugIns/nmeaconverter_pi/libnmeaconverter_pi.dylib, 2): Symbol not found: __ZN12wxWindowBase19SetVirtualSizeHintsEiiii
Referenced from: /Applications/OpenCPN.app/Contents/PlugIns/nmeaconverter_pi/libnmeaconverter_pi.dylib
Expected in: flat namespace
in /Applications/OpenCPN.app/Contents/PlugIns/nmeaconverter_pi/libnmeaconverter_pi.dylib

— lines deleted —

12:31:37 NZST: PlugInManager: /Applications/OpenCPN.app/Contents/PlugIns/libwmm_pi.dylib
API Version detected: 108
PlugIn Version detected: 101
daveNZ is offline   Reply With Quote
Old 17-04-2020, 00:31   #282
Registered User

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

daveNZ


Reason is the plugin NmeaConverter-Plugin_0.2.pkg has not been compiled with the wxWidgets version which was used for compiling OpenCPN version 5.0.1.


Such things have been foreseen because the developer Dave Register has build his own wxWidgets version for macOS to fix a bug and not using the official wxWidgets version.


Workaround:
You may ask the developer of this plugin to compile a version with the wxWidgets version of David Register or you can try not to use OpenCPN version 5.0.1 but version 5.0.0 with this plugin. I'm not sure however if the latter will work.
CarCode is offline   Reply With Quote
Old 17-04-2020, 01:47   #283
Registered User

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

I've have a reasonable look around but I can't find a 5.0.0 download. Should there be a link somewhere? thanks
daveNZ is offline   Reply With Quote
Old 17-04-2020, 03:28   #284
Registered User

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

Quote:
Originally Posted by daveNZ View Post
I've have a reasonable look around but I can't find a 5.0.0 download. Should there be a link somewhere? thanks
You can try:
http://download.opencpn.org/5.0.0/Op....0+9065270.dmg


This version has a bug for macOS Mojave but may work with macOS Catalina. Because 5.0.1 and 5.0.0 depends of different wxWidgets versions there may be problems with plugins. That means your NmeaConvertor plugin might work with 5.0.0 but your other plugins not.
CarCode is offline   Reply With Quote
Old 17-04-2020, 04:27   #285
Registered User

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

thanks again, but exactly the same result with both versions 5.0.0 and also 4.0.0 ??
Some basic mistake here?
daveNZ 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 02:49.


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.