Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 15-06-2013, 02:18   #16
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,247
Re: Plugin Polar

Quote:
Originally Posted by konni View Post
Hi Rick,

the source is now on Github and a compiled version with installer on
Sourcefourge (Win).

i still dont know why the dlg doesn't appear at your computer, but maybe
with this version it works.

i installed NavMonPC and connected it to OCPN with the polar. The data
are displayed.

best regards,
konni

Konni

There is a problem with the code, building on 64 bits Ubuntu
Code:
...../OpenCPN/plugins/polar_pi/src/nmea0183/sentence.cpp:258:83: error: cannot pass objects of non-trivially-copyable type ‘class wxString’ through ‘...’
Thomas
__________________

__________________
cagney is offline   Reply With Quote
Old 15-06-2013, 08:11   #17
Registered User

Join Date: Sep 2011
Posts: 205
Re: Plugin Polar

Quote:
Originally Posted by rgleason View Post
Konni
Not much luck git in MSVC Windows and Linux
Sorry.
Hi Rick,

thank's a lot for the detailed crash-report.
now i found out what happened.
all tests i have made with a installed logbook-plugin and that's the reason
why it didn't crash.
the polar looks for sails-strings in the logbook-ini-section(OCPN.ini) and fills an array with the items.
but without it's not created and bang....

i'll fix this ASAP and post it here.

best regards,
konni
__________________

__________________
konni is offline   Reply With Quote
Old 15-06-2013, 15:00   #18
bcn
Registered User

Join Date: May 2011
Location: underway whenever possible
Boat: Rangeboat 39
Posts: 2,758
Re: Plugin Polar

Quote:
Originally Posted by konni View Post
Hi rgleason,


if i'm able to do do it, i convert OCPN to QT. That's at the moment my main-goal.
If I get you right that is quite a bummer!
QT instead of Wx?

I would be curious to hear more.

bcn
__________________
bcn is online now   Reply With Quote
Old 15-06-2013, 16:14   #19
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,356
Re: Plugin Polar

I think this was a long time ago. I was new to OpenCPN, still am, and trying to understand what wx and qt were, because I also was using qtvlm which is also a great program for virtual and real routing. I barely recall konni's comment.
__________________
rgleason is offline   Reply With Quote
Old 15-06-2013, 16:29   #20
Registered User

Join Date: Sep 2011
Posts: 205
Re: Plugin Polar

Hi Rick, bcn and Cagney

i fixed the compile error on linux (thank's Cagney) and corrected the bug, when logbook_pi isn't installed (thanks's Rick.

the files are on Github and compiled (win only) on Sourceforge.

to bcn:
i had a lot of trouble to adjust the logbook to wxWidgets 2.9.4
i thought i could do it in 1-2 days but it in the end it were weeks.
you can imagine, that's not fun.
QT or Wx ? It's may a question like: what car is the best?

Opencpn is a big prg. now, running great on Wx.
it needs a lot of time and knowlege to convert it, maybe i fail. at the moment nothing is done.

best regards,
konni
__________________
konni is offline   Reply With Quote
Old 16-06-2013, 16:30   #21
Registered User

Join Date: Sep 2011
Posts: 205
Re: Plugin Polar

0.5 is up on Github and compiled on Sourcefourge (Win only).

fixed the sash in the splitterwindow and the load-routine.
add "Max. only" to the windchoice which displays the best results
from all windforces.

best regards,
konni
__________________
konni is offline   Reply With Quote
Old 16-06-2013, 17:47   #22
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,356
Re: Plugin Polar

Konni,

I tried git pull and then compile. Got break, Attached is Output for Windows.

Code:
KernelBase.dll!760c3219()     
     [Frames below may be incorrect and/or missing, no symbols loaded for KernelBase.dll]    
>    wxbase28ud_vc_custom.dll!wxTrap()  Line 678    C++
     wxbase28ud_vc_custom.dll!DoShowAssertDialog(const wxString & msg)  Line 753    C++
     wxbase28ud_vc_custom.dll!wxAppTraitsBase::ShowAssertDialog(const wxString & msgOriginal)  Line 557 + 0x9 bytes    C++
     wxmsw28ud_core_vc_custom.dll!wxGUIAppTraitsBase::ShowAssertDialog(const wxString & msg)  Line 635    C++
     wxbase28ud_vc_custom.dll!ShowAssertDialog(const wchar_t * szFile, int nLine, const wchar_t * szFunc, const wchar_t * szCond, const wchar_t * szMsg, wxAppTraits * traits)  Line 836 + 0x11 bytes    C++
     wxbase28ud_vc_custom.dll!wxAppConsole::OnAssertFailure(const wchar_t * file, int line, const wchar_t * func, const wchar_t * cond, const wchar_t * msg)  Line 445 + 0x22 bytes    C++
     wxbase28ud_vc_custom.dll!wxOnAssert(const wchar_t * szFile, int nLine, const char * szFunc, const wchar_t * szCond, const wchar_t * szMsg)  Line 713    C++
     wxbase28ud_vc_custom.dll!wxArrayString::Item(unsigned int nIndex)  Line 154 + 0x2b bytes    C++
     polar_pi.dll!0f62a552()     
     polar_pi.dll!0f62a29f()     
     polar_pi.dll!0f6205b6()     
     polar_pi.dll!0f61e59f()     
     polar_pi.dll!0f65e9cb()     
     polar_pi.dll!0f616719()     
     polar_pi.dll!0f65d369()     
     opencpn.exe!MyFrame::OnToolLeftClick(wxCommandEvent & event)  Line 3576 + 0x24 bytes    C++
     wxbase28ud_vc_custom.dll!wxAppConsole::HandleEvent(wxEvtHandler * handler, void (wxEvent &)* func, wxEvent & event)  Line 323    C++
     wxbase28ud_vc_custom.dll!wxEvtHandler::ProcessEventIfMatches(const wxEventTableEntryBase & entry, wxEvtHandler * handler, wxEvent & event)  Line 1241    C++
     wxbase28ud_vc_custom.dll!wxEventHashTable::HandleEvent(wxEvent & event, wxEvtHandler * self)  Line 907 + 0x1c bytes    C++
     wxbase28ud_vc_custom.dll!wxEvtHandler::ProcessEvent(wxEvent & event)  Line 1301 + 0x1c bytes    C++
     wxbase28ud_vc_custom.dll!wxEvtHandler::ProcessEvent(wxEvent & event)  Line 1308 + 0x1c bytes    C++
     wxmsw28ud_core_vc_custom.dll!wxWindowBase::TryParent(wxEvent & event)  Line 2661 + 0x1c bytes    C++
     wxbase28ud_vc_custom.dll!wxEvtHandler::ProcessEvent(wxEvent & event)  Line 1315    C++
     wxbase28ud_vc_custom.dll!wxEvtHandler::ProcessPendingEvents()  Line 1197    C++
     wxbase28ud_vc_custom.dll!wxAppConsole::ProcessPendingEvents()  Line 296    C++
     wxmsw28ud_core_vc_custom.dll!wxIdleWakeUpModule::MsgHookProc(int nCode, unsigned int wParam, long lParam)  Line 6845    C++
     user32.dll!75fc6381()     
     user32.dll!75fb80a9()     
     user32.dll!75fb8ba1()     
     ntdll.dll!76f2010a()     
     user32.dll!75fb78d7()     
     user32.dll!75fb790d()     
     wxmsw28ud_core_vc_custom.dll!GetMessage(tagMSG * lpMsg, HWND__ * hWnd, unsigned int wMsgFilterMin, unsigned int wMsgFilterMax)  Line 309    C++
     wxmsw28ud_core_vc_custom.dll!wxEventLoop::Dispatch()  Line 225 + 0xf bytes    C++
     wxmsw28ud_core_vc_custom.dll!wxEventLoopManual::Run()  Line 115 + 0xd bytes    C++
     wxmsw28ud_core_vc_custom.dll!wxAppBase::MainLoop()  Line 312 + 0x15 bytes    C++
     wxmsw28ud_core_vc_custom.dll!wxAppBase::OnRun()  Line 368    C++
     wxbase28ud_vc_custom.dll!wxEntryReal(int & argc, wchar_t * * argv)  Line 448 + 0x1b bytes    C++
     wxbase28ud_vc_custom.dll!wxEntry(int & argc, wchar_t * * argv)  Line 209 + 0xd bytes    C++
     wxmsw28ud_core_vc_custom.dll!wxEntry(HINSTANCE__ * hInstance, HINSTANCE__ * __formal, HINSTANCE__ * __formal, int nCmdShow)  Line 386 + 0xe bytes    C++
     opencpn.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, char * lpCmdLine, int nCmdShow)  Line 748 + 0x1c bytes    C++
     opencpn.exe!__tmainCRTStartup()  Line 547 + 0x2c bytes    C
     opencpn.exe!WinMainCRTStartup()  Line 371    C
     kernel32.dll!762a33aa()     
     ntdll.dll!76f49ef2()     
     ntdll.dll!76f49ec5()
Will try your canned plugin DLL next.
Rick
__________________
rgleason is offline   Reply With Quote
Old 16-06-2013, 18:02   #23
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,356
Re: Plugin Polar

Tried in 3.3.604 and it hung up.
Tried in 3.2.0 and it allowed me to click the icon, but nothing showed. I could still scroll back and forth and the screen did not freeze. but when it came to shutdown I had to use task manager.
Then tried 3.3.424 and the experience was similar.

Konni, did you try it yourself?
__________________
rgleason is offline   Reply With Quote
Old 19-06-2013, 01:47   #24
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: Masachusetts
Boat: bristol 27
Posts: 2,803
Re: Plugin Polar

Quote:
Originally Posted by cagney View Post
Konni

There is a problem with the code, building on 64 bits Ubuntu
Code:
...../OpenCPN/plugins/polar_pi/src/nmea0183/sentence.cpp:258:83: error: cannot pass objects of non-trivially-copyable type ‘class wxString’ through ‘...’
Thomas
I have this problem also.
__________________
boat_alexandra is offline   Reply With Quote
Old 20-06-2013, 08:06   #25
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,356
Re: Plugin Polar

Recent output in Linux
Code:
sentence.cpp.o
/home/rgleason/opencpn-git/plugins/polar_pi/src/nmea0183/sentence.cpp: In member function ‘virtual void SENTENCE::Finish()’:
/home/rgleason/opencpn-git/plugins/polar_pi/src/nmea0183/sentence.cpp:258:83: error: cannot pass objects of non-trivially-copyable type ‘class wxString’ through ‘...’
/home/rgleason/opencpn-git/plugins/polar_pi/src/nmea0183/sentence.cpp:258:83: error: cannot pass objects of non-trivially-copyable type ‘class wxString’ through ‘...’
make[2]: *** [plugins/polar_pi/CMakeFiles/polar_pi.dir/src/nmea0183/sentence.cpp.o] Error 1
make[1]: *** [plugins/polar_pi/CMakeFiles/polar_pi.dir/all] Error 2
make: *** [all] Error 2
rgleason@rgleason-VirtualBox:~/opencpn-git/build$
__________________
rgleason is offline   Reply With Quote
Old 20-06-2013, 15:09   #26
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,247
Re: Plugin Polar

Konni

Thanks for sorting out the Linux problem. The code, including the latest patches, now compiles with OpenCPN 3.3.604+.

Thomas
__________________
cagney is offline   Reply With Quote
Old 21-06-2013, 15:25   #27
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,356
Re: Plugin Polar

Konni, I owe you an apology for being short when the second or third try did not work. Today I found the DLL in its own plugin directory, out of place. I tried it and it opened! (I had a tough day with MSVC and Wx-Rte, trying to get things compiled. I wanted to try your plugin and was disappointed.)

Then I was able to "load" the Konni-AIS.nmea on Opencpn-Beta File thingie in Nmea directory and the file loaded quickly and presented the Polar chart. I selected "any" for wind.. Result attached.

This is pretty good. I had some trouble with the Data from Nmea selection but that is probably for a live data stream or something. It did not seem to work for me. I used Data from VDR. I don't know if you need Edit Manual because you can edit the grid anyway.

I'd like to know how I save this file as various formats qtVLM, Sean Wx-Rte and others. -Yes, just hit Save and select the type!

Also is it possible to edit the polar chart (sorry did not try that yet -- Yes, just edit in the grid.) There could be better interactivity and other improvements but this works.

Have you seen Patrick's Polauto which is a Windows program. It has extensive filters and data options which you might think about.

I like this plugin and think it has some real potential.
Attached Thumbnails
Click image for larger version

Name:	Polar-VDR-Load-Konni-AIS-txt-file.jpg
Views:	195
Size:	390.3 KB
ID:	62998  
__________________
rgleason is offline   Reply With Quote
Old 21-06-2013, 22:10   #28
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: Masachusetts
Boat: bristol 27
Posts: 2,803
Re: Plugin Polar

Is there a plan to support polars which are different on port and starboard?
__________________
boat_alexandra is offline   Reply With Quote
Old 22-06-2013, 00:15   #29
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: Masachusetts
Boat: bristol 27
Posts: 2,803
Re: Plugin Polar

konni,

What version of wxformbuilder did you use? When I regenerate the PolarGui.cpp and header they are different and I cannot make changes to the gui.

On my netbook the grid and other controls are too big to fit on the screen, so the grid needs to be placed inside a scrolled window, or else editing some cells presses the clear button by accident.

I have a patch to change the csv format so the weather routing plugin can read it. What sort of integration do you want to do with weather routing if any?
1. Make it easy to import polar plugin into the boat.
2. Take some logic out of weather routing and put into polar plugin.. like interpolation between degree steps using sailboat transform. So with only a few entrees in the table, the others can be closely guessed. Then those values might be in red or another color to indicate they are only computed, and would be replaced with real measurements as the are available.

Code:
diff --git a/src/Polar.cpp b/src/Polar.cpp
index 8701b3c..15cbe3c 100644
--- a/src/Polar.cpp
+++ b/src/Polar.cpp
@@ -963,23 +963,21 @@ void Polar::save()
     } 
     else 
     { 
-      wxString s = _T(",");       
+      wxString s = _T("TWA\\TWS");       
       for(int col = 0; col < dlg->m_gridEdit->GetCols(); col++) 
-          s <<  dlg->m_gridEdit->GetColLabelValue(col)+_T(","); 
-      s.RemoveLast(); 
+          s <<  _T(";")+dlg->m_gridEdit->GetColLabelValue(col); 
       polarFile << s << _T("\n"); 
        
       for(int row = 0; row < dlg->m_gridEdit->GetRows(); row++) 
       {  
         s = wxEmptyString; 
-        s <<  dlg->m_gridEdit->GetRowLabelValue(row) << _T(","); 
+        s <<  24+(row*8); 
         for(int col = 0; col < dlg->m_gridEdit->GetCols(); col++) 
-          s << dlg->m_gridEdit->GetCellValue(row,col) << _T(","); 
+          s << _T(";") << dlg->m_gridEdit->GetCellValue(row,col); 
          
-        s.RemoveLast(); 
         polarFile << s << _T("\n"); 
       } 
     } 
     output.Close(); 
  
     for(int sp = 0; sp < 10; sp++)
__________________
boat_alexandra is offline   Reply With Quote
Old 22-06-2013, 06:06   #30
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,356
Re: Plugin Polar

It would be awesome to have integration with Weather routing!
  1. Save and load polars to and from Wx-Rte and Polar.
  2. Have a title field and a descriptive field read and editable by both plugins. These would be for a titel, and describing sails deployed, sea state, wind type, cold, hot air, boat bottom, boat load and other conditions for the polar.
  3. I like the interpolation idea.
  4. At some point we'll need data filters of some sort I think, because the wind direction and speed vary faster than the boat can react, and the boat has weight and inertia, so it reacts more slowly than the wind, current or not, etc. There are many variables, check out what Patrick Tiersp has done with Polauto, this is a working program that has been tested extensively with nmea data and on boats. There are some ideas there and some good reports, which will be tested more this summer.
  5. Test Polauto thread, and the PC Sail thread has Polauto links and information.
  6. Polars for port and starboard would also be good.
Also I particularly like this plugin because it is integrated with Opencpn and I sure wish Sean had internet following him around, so that I could listen in on the dialogue between Konni and Sean, because I think it would result in some great new plugin features!
__________________

__________________
rgleason is offline   Reply With Quote
Reply

Thread Tools
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




Copyright 2002- Social Knowledge, LLC All Rights Reserved.

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


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.