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 04-07-2016, 08:35   #451
Registered User

Join Date: Dec 2011
Boat: MC-Tec, Akilaria 950
Posts: 242
Re: Plugin: DashBoard

Dan,

that's interesting ...
It doesn't work here with the same file ...

Name:   Aufnahme40.jpg
Views: 545
Size:  8.6 KB
Are you Unix or Windows ?

I'll check my local repository ...

Thomas
tom_BigSpeedy is offline   Reply With Quote
Old 04-07-2016, 12:10   #452
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 6,008
Re: Plugin: DashBoard

Quote:
Originally Posted by tom_BigSpeedy View Post
Dan,

that's interesting ...
It doesn't work here with the same file ...
Attachment 127349
Are you Unix or Windows ?

I'll check my local repository ...

Thomas
Thomas,

I'm sorry, my repository was not up to date. I found the cause of the problem. Will try to post a pull request or at least update my github fork later today.

Dan

Edit: This commit will fix the pitch/roll parsing bug:

https://github.com/transmitterdan/Op...fa4a93e2f00c6a
transmitterdan is offline   Reply With Quote
Old 07-08-2016, 13:44   #453
Registered User
 
LeaseOnLife's Avatar

Join Date: Apr 2008
Location: out cruising again, currently in Fiji
Boat: Sailboat
Posts: 1,466
Re: Plugin: DashBoard

On my Raspberry Pi 3 the wind history graph uses excessive CPU power. It starts all well, graphing TWD and TWS, but the more data are shown, the more CPU is used, until one CPU pegs out at 100%, used by process Xorg. Side effects are NMEA parsing seems to stop, loss of GPS position, AIS signals, etc. Turning off the dashboard restablishes normal behavior.

Above is true for openplotter on Raspian with opencpn 4.4.0, as well as self compiled OpenCPN from git today (4.5.0). Using the experimental VC4 GL and enabling opengl in OpenCPN makes no difference. I then switched to tactics_pi, which shows the same issue when displaying wind history.

Anyone else seeing this?

Dirk
LeaseOnLife is offline   Reply With Quote
Old 22-08-2016, 13:32   #454
Registered User
 
hasse_A's Avatar

Join Date: Feb 2013
Location: Tyrell Bay,Carriacou
Boat: Allegro 33
Posts: 559
Re: Plugin: DashBoard

I had a look at true wind angle and wind speed.
As I understand it you have to input this info via NMEA sentence to have the meters show them.

A lot of us don't have this info accessible.
Would it not be possible to calculate it from apparent wind speed, wind angle and boat speed ?

These are much more frequently available.

If true angle and speed are not present the dashboard could calculate the values, otherwise use the supplied NMEA data.

/Hans
hasse_A is offline   Reply With Quote
Old 22-08-2016, 14:37   #455
Registered User
 
rgleason's Avatar

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

Hasse Yes it is. I believe this request is in tracker already, if not please add it.
Alsolook at tracker plugin which can do this now.
rgleason is offline   Reply With Quote
Old 22-08-2016, 14:51   #456
Registered User
 
rgleason's Avatar

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

Whoops Tactics plugin
rgleason is offline   Reply With Quote
Old 22-08-2016, 22:03   #457
Registered User

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

Quote:
Originally Posted by hasse_A View Post
I had a look at true wind angle and wind speed..........
Would it not be possible to calculate it from apparent wind speed, wind angle and boat speed ?
............
/Hans
Hans.. While waiting for a proper code change...........
Before I got true wind from my instruments I used this patch in my "own*" branch of OCPN. (Row numbers may not be the same anymore)
Håkan
Code:
@@ -838,7 +838,32 @@ void dashboard_pi::SetNMEASentence( wxString &sentence )
                                 m_awaangle, m_awaunit);
                             SendSentenceToAllInstruments( OCPN_DBP_STC_AWS,
                                     toUsrSpeed_Plugin( m_NMEA0183.Mwv.WindSpeed * m_wSpeedFactor, g_iDashWindSpeedUnit ),
-                                    getUsrSpeedUnit_Plugin( g_iDashWindSpeedUnit ) );
+                                    getUsrSpeedUnit_Plugin(g_iDashWindSpeedUnit));
+
+                            //Calculate true wind speed and angle.
+                            if (m_NMEA0183.Rmc.SpeedOverGroundKnots < 999 || !wxIsNaN(m_NMEA0183.Vtg.SpeedKnots))
+                            {
+                                double AWSpeed = m_NMEA0183.Mwv.WindSpeed * m_wSpeedFactor / 1.94384; // In Knots, form it to m/s
+                                double SOG = m_NMEA0183.Rmc.SpeedOverGroundKnots / 1.94384; // In Knots, form it to m/s
+                                if (m_NMEA0183.Rmc.SpeedOverGroundKnots >= 999) SOG = m_NMEA0183.Vtg.SpeedKnots / 1.94384;
+                                double c_TWS = sqrt(pow(SOG, 2) + pow(AWSpeed, 2) -
+                                    2 * SOG * AWSpeed * cos(m_awaangle * 3.141592654 / 180));
+                                double c_TWS_kn = c_TWS * 1.94384; //To knots
+                                SendSentenceToAllInstruments(OCPN_DBP_STC_TWS,
+                                    toUsrSpeed_Plugin(c_TWS_kn, g_iDashWindSpeedUnit),
+                                    getUsrSpeedUnit_Plugin(g_iDashWindSpeedUnit));
+                                SendSentenceToAllInstruments(OCPN_DBP_STC_TWS2,
+                                    toUsrSpeed_Plugin(c_TWS_kn, g_iDashWindSpeedUnit),
+                                    getUsrSpeedUnit_Plugin(g_iDashWindSpeedUnit));
+
+                                double c_TWA = m_awaangle + 180 * 
+                                    acos((pow(AWSpeed, 2) + pow(c_TWS, 2) - pow(SOG, 2)) / (2 * c_TWS * AWSpeed)) /
+                                    3.141592654;
+                                if (c_TWA > 180) c_TWA = 180 - (c_TWA - 180);
+                                SendSentenceToAllInstruments(OCPN_DBP_STC_TWA,
+                                    c_TWA, m_awaunit);
+                                //int test = 1;
+                            }
                         }
                     } else if( m_NMEA0183.Mwv.Reference == _T("T") ) // Theoretical (aka True)
                     {
* - I've some dated Simrad IS15/Garmin 120 instruments requiring some tweaking to work with Dashboard.
Hakan is offline   Reply With Quote
Old 23-08-2016, 02:45   #458
Registered User
 
hasse_A's Avatar

Join Date: Feb 2013
Location: Tyrell Bay,Carriacou
Boat: Allegro 33
Posts: 559
Re: Plugin: DashBoard

Håkan......

Thanks.

Is SOG what should be taken as boat speed and not VHW (Speed through water) ?
I.e. is true wind normally referenced to the "bottom" and not the water surface ?

/Hans
hasse_A is offline   Reply With Quote
Old 23-08-2016, 05:25   #459
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 6,008
Re: Plugin: DashBoard

Quote:
Originally Posted by hasse_A View Post
Håkan......

Thanks.

Is SOG what should be taken as boat speed and not VHW (Speed through water) ?
I.e. is true wind normally referenced to the "bottom" and not the water surface ?

/Hans
You are sailing on the water and not on the ground so a purist would say speed through water (STW) should be the input to a TWS calculation. In the "real world" either SOG or STW can be used but one has to know which before making use of the resulting AWS. Polar diagrams are created assuming TWS is based on STW. If you have an accurate knot log sensor then STW would be the "right" choice.
transmitterdan is offline   Reply With Quote
Old 23-08-2016, 06:11   #460
Registered User

Join Date: Jun 2010
Location: St. Petersburg, Florida
Boat: Gemini 3200
Posts: 983
Re: Plugin: DashBoard

Quote:
Originally Posted by transmitterdan View Post
You are sailing on the water and not on the ground so a purist would say speed through water (STW) should be the input to a TWS calculation. In the "real world" either SOG or STW can be used but one has to know which before making use of the resulting AWS. Polar diagrams are created assuming TWS is based on STW. If you have an accurate knot log sensor then STW would be the "right" choice.
That's not correct. While a purist (or a pedant) might argue that because you are sailing on the water true wind should be measured at the water's surface rather than the ground it's just a semantic quibble. True wind is measured with reference to a fixed geographic location which is neither at the earth's nor the water's surface, but on the surface of an imaginary sphere which approximates the spheroid of the earth.

If you want to calculate true wind speed and direction you need apparent wind speed and direction and the boat's speed and direction relative to the earth. The correct choice would be speed over ground and course over ground. If you use speed through the water you must correct for leeway, set, and drift to get an accurate result. In essence, you must convert speed through the water to speed over ground as part of your calculation.

Fabbian
fgd3 is offline   Reply With Quote
Old 23-08-2016, 10:11   #461
Registered User
 
rgleason's Avatar

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

The full discussion of this has been occurring on both this Dashboard and the Tactics+pi threads.
Ideally Drift -current + leeway needs to be determined first. Then True wind determined. Its not simple, but Polauto allows the user to select STW or SOG when recording, this seems to be a common alternative. Of course ideally, you record without current, but leeway is always there. I am sure Thomas Rauch will have some thoughts too...
rgleason is offline   Reply With Quote
Old 23-08-2016, 10:12   #462
Registered User
 
rgleason's Avatar

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

Hakan,
I added your code to
FS#1652 : Instr Wind (true/ground) should be calculated from apparent wind & SOG/COG when Nmea not present

In hopes that it will help someone improve Dashboard.
rgleason is offline   Reply With Quote
Old 23-08-2016, 10:15   #463
Registered User
 
rgleason's Avatar

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

From FS#1652 Instr Wind
written by Rick Sonntag -which you may find interesting.
Quote:
NavMonPc will display true wind data whenever possible (it also displays apparent wind data). If true wind data (MWD, MWV, VWT) is received from the attached navsystem gear, NavMonPc displays this data. If true wind information is not available, NavMonPc attempts to calculate it from the available apparent wind data (and from vessel speed and heading). “MWD” and “MWV” NMEA sentences that contain this true wind data can be generated and sent to other programs and systems, under the control of the options on the NMEA Options, and the NMEA Routing windows.
rgleason is offline   Reply With Quote
Old 23-08-2016, 11:25   #464
Registered User

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

Hasse..
I'm aware of the discussion above but I use SOG, speed over ground, because I want to know the true wind over ground, That's what all forecasts and weather reports refer to. The apparent wind is what you are sailing with and that's what you get from the wind meter and is the result after influences from your boat speed, water current speed and leeway.
Håkan
Hakan is offline   Reply With Quote
Old 23-08-2016, 12:30   #465
Registered User
 
rgleason's Avatar

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

Hakan, I happen to prefer that, but your calcs may not account for drift - current and leeway, which is ok, but not as sophisticated as Tom's Tactics_pi. Please correct me as I have been known to be wrong.

http://opencpn.org/ocpn/Terminology

Course Over Ground (COG) - Actual course that the boat is moving along at the moment over the surface of the earth (HDG + Leeway + Current) "The actual course you are moving along at the moment relative to the fixed land, meaning actual direction you travel regardless of the course steered and temporary variations in heading around this course. Things that cause COG to differ from heading include: current, leeway, poor helmsmanship, or compass errors." Often derived from GPS.

Speed Over Ground (SOG) - The speed actually achieved which includes the effect or current set (direction) & drift (speed), wind and leeway and helmsman errrors. Same as SMG. Often derived from GPS.
rgleason is offline   Reply With Quote
Reply


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
OpenCPN PlugIn Development bdbcat OpenCPN 161 04-09-2019 12:50

Advertise Here


All times are GMT -7. The time now is 17:37.


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.