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 15-07-2024, 00:40   #421
Registered User

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

JF..
The math questions I can't resolve.
I may be curious why you want to "invent the wheel" since the function is already present in Dashboard.
0-360° sounds like you want the true wind direction, relative to north, and not true wind angle, relative to the bow? That's is two different instruments in Dashboard. To calculated the direction you need true heading to be present though.
Hakan is offline   Reply With Quote
Old 15-07-2024, 00:57   #422
Registered User

Join Date: Apr 2023
Posts: 14
Re: New Plugin NmeaConvertor

Hakan,

I have just made a new test : without any true wind formula in nmea converter, displaying true wind data in dashboard with forcing AWA to 0 leads to OCPN crash. It could be AWS, with the same result.
I force the AWA to 0 by disconnecting my anemometer and setting up a new line in nmea converter : $WIMWV, 0, R, 10, N, A.
Let me know what do you think of this issue.

Regards, JF.
The divided by 0 is also not handled in dashboard.
Aqua_vitae is offline   Reply With Quote
Old 15-07-2024, 01:16   #423
Registered User

Join Date: Apr 2023
Posts: 14
Re: New Plugin NmeaConvertor

It is not a question of re-inventing the wheel. This is just because the MWV nmea sentence operates with a 0-360° scope in opposite of WWR of your plugin manual example which operates with a 0-180° scope and L(eft) or R(ight) additionnal field.
Aqua_vitae is offline   Reply With Quote
Old 15-07-2024, 01:46   #424
Registered User

Join Date: Apr 2023
Posts: 14
Re: New Plugin NmeaConvertor

Of course, most of the time, the anemometer sends not null values for AWS and AWA. But what will happen if one day either AWS or AWA is equal to 0 ?
Regarding of the test I made with forcing AWA to 0, I think OCPN could crashs as I experiment today.

I am currious to know what do the development team think about that.
Of course, this is not a great issue but I would be happy to have contributed to discover it if it is revealed to be an actual issue.

Best regards, JF.
Aqua_vitae is offline   Reply With Quote
Old 15-07-2024, 01:50   #425
Registered User

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

JF
In Dashboard code I can't see how a AWA=0 can be a trouble? That value is not used as a divisor what I can see. The crash may come from your code in NMEA Converter?
Hakan is offline   Reply With Quote
Old 15-07-2024, 02:25   #426
Registered User

Join Date: Apr 2023
Posts: 14
Re: New Plugin NmeaConvertor

Please Hakan,
Have a look at atan2 function : it is said that the 2nd argument should not be null. And what is the second argument .... a kind of sinus AWA ....
Best regards, JF
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20240715_182321_Samsung Internet.jpg
Views:	35
Size:	161.1 KB
ID:	292048  
Aqua_vitae is offline   Reply With Quote
Old 15-07-2024, 02:37   #427
Registered User

Join Date: Apr 2023
Posts: 14
Re: New Plugin NmeaConvertor

In fact, either using dashboard internal calculation or user's formula in nmea converter, the special case of AWA=0 or AWS=0 should be handled to get TWA. This is just a mathematical reason due to atan fonction. If not handled, an exception rise. And my first question was : how to handle this case in nmea converter, nothing more.
Regards, JF.
Aqua_vitae is offline   Reply With Quote
Old 15-07-2024, 02:54   #428
Registered User

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

JF..
Thanks for the atan2 clarification. In real the value could theoretically be 0.0 although obviously not likely. But still it would be worth a safe implementation to Dashboard.
Hakan is offline   Reply With Quote
Old 15-07-2024, 03:13   #429
Registered User

Join Date: Apr 2023
Posts: 14
Re: New Plugin NmeaConvertor

Hakan,
Thanks for your reply.
In C code, the atan2 function has two arguments and the inside code can manage if one is null and can return an available result.
In nmea converter, the atan function has only one argument. This suppose that the division Y/X (also done In atan2) is calculated before the atan call. That is why an exception is rised if X is null.
A better appraoch In nmea converter should be passing two arguments, one for Y, one for X and managing In the inside code the null.
Best regards, JF.
Aqua_vitae is offline   Reply With Quote
Old 15-07-2024, 03:29   #430
Registered User

Join Date: Apr 2023
Posts: 14
Re: New Plugin NmeaConvertor

By the way, I would like to suggest you an additionnal option in nmea converter.
When you submit a new formula to calculation, you have two trigger options : every X seconds or when ALL inside datas have changed. I would be happy to find another trigger option : when ONE of the inside data has changed.
For me, it makes more sens than waiting all datas are updated.
(Sorry if my english is not academic enough ...).
Best regards, JF.
Aqua_vitae is offline   Reply With Quote
Old 02-08-2024, 06:29   #431
Registered User
 
sv.KUJIRA.ch's Avatar

Join Date: Jan 2021
Location: Guaymas MX
Boat: #stratimer #endurance44_03
Posts: 5
Re: New Plugin NmeaConvertor v1.4.15

Quote:
Originally Posted by bdbcat View Post
Scud...
NmeaConverter v1.4.13 is now available in master catalog.
Thanks for the input
Dave

with v1.4.15 i have trouble with field length before decimal point if separated with "," not so if separated with ";"
orig: $PPGLL,4706.1420,N,00838.4390,E,141015,A
result with",": $ECGLL,$PPGLL1,$PPGLL2,$PPGL3, ...
$ECGLL,706.1420,N,838.4390,E,1015,A
result with";": $ECGLL;$PPGLL1;$PPGLL2;$PPGL3, ...
$PPGLL;4706.1420;N;00838.4390;E;141015;A

where lays the problem?
Thanks for ideas or fix
sv.KUJIRA.ch is offline   Reply With Quote
Old 29-08-2024, 00:07   #432
Registered User
 
sv.KUJIRA.ch's Avatar

Join Date: Jan 2021
Location: Guaymas MX
Boat: #stratimer #endurance44_03
Posts: 5
Re: New Plugin NmeaConvertor

p.s.
problem with field length seems to be with ocpn 5.9.2-0
not with NmeaConverter v1.4.15
sv.KUJIRA.ch is offline   Reply With Quote
Old 29-08-2024, 07:43   #433
Registered User

Join Date: Jan 2011
Posts: 672
Re: New Plugin NmeaConvertor

The problems you are describing sound similar to ones I reported (and were fixed) about a year ago. See replies #382-400 in this thread:
https://www.cruisersforum.com/forums...ml#post3812142

Different anemometer models report their data in different ways, so you may have uncovered a different bug. But the fix that Dave implemented works perfectly for my Raymarine ST4000+ under v5.8.4. I have not had time to try out 5.10.0, and hope that the update hasn't broken NMEAconverter.

Going forward, I'd recommend recording an NMEA script of your anemometer's output, manually editing the data to test certain values, then playing the script back to test NMEAcalculator. That will pinpoint the problem much better, and doesn't require disconnecting your hardware or other difficult hacks. And you can post the script here so others can replicate your problem.
__________________
Please support OpenCPN by donating through Paypal!
RhythmDoctor is offline   Reply With Quote
Old 29-08-2024, 08:05   #434
Registered User

Join Date: Jun 2022
Location: Cantabria
Boat: Jeanneau - Merry Fisher 925
Posts: 613
Re: New Plugin NmeaConvertor v1.4.15

Quote:
Originally Posted by sv.KUJIRA.ch View Post
with v1.4.15 i have trouble with field length before decimal point if separated with "," not so if separated with ";"
orig: $PPGLL,4706.1420,N,00838.4390,E,141015,A
result with",": $ECGLL,$PPGLL1,$PPGLL2,$PPGL3, ...
$ECGLL,706.1420,N,838.4390,E,1015,A
result with";": $ECGLL;$PPGLL1;$PPGLL2;$PPGL3, ...
$PPGLL;4706.1420;N;00838.4390;E;141015;A

where lays the problem?
Thanks for ideas or fix
Maybe a stupid question, how is configured your o.s. regarding decimal??

is your with decimal "," or decimal "."?

make a double check and just in case exchange the system to decimal "."
I have had several problems until I realized it and exchange my systems to decimal "." instead ","
because this is a problem with the separators and also in ".CSV" files.
__________________
Corsair

Roses don't bloom on the sailor's grave
Corsair63 is offline   Reply With Quote
Old 30-08-2024, 02:15   #435
Registered User
 
sv.KUJIRA.ch's Avatar

Join Date: Jan 2021
Location: Guaymas MX
Boat: #stratimer #endurance44_03
Posts: 5
Re: New Plugin NmeaConvertor

Quote:
Originally Posted by bdbcat View Post
RD...


Got this sorted out. The NMEAConverter code did not know what to do with 3 digit input values, like might be seen in your SOG, or indeed in any circular angle variable (0-360).
Soon to be fixed by PR to Rick's production repo, should find its way into production catalog soon thereafter.


If you would like to pre-test by importing the Windows tarball, here it is:


https://dl.cloudsmith.io/public/open...48-MSVC.tar.gz


Dave



the answer still lays here (Quote #391)
with windows11, ocpn5.10 and nmeaconverter_pi-1.3.4.0 all works.
with nmeaconverter_pi-1.3.5.0 they limited the fieldlength to 3digits,
but for nmea0183 we need 4digs for lat., 5digs for lng. and 6digits for time.
so it needs adjustment in nmeaconverter_pi.cpp around line 471.
cheers Felix
sv.KUJIRA.ch 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 144 27-09-2024 06:38
New IAC Fleetcode Plugin for OpenCPN CBorchardt OpenCPN 77 23-04-2019 06:40
New Plugin Development on Linux globalkeith OpenCPN 5 03-05-2012 08:16
New History Plugin for OpenCPN seandepagnier OpenCPN 11 04-10-2010 15:11

Advertise Here


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


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2025, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.