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 02-07-2014, 06:23   #526
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: Weather Routing

Could you try deleting the Boat.xml file. I believe on windows it is in:
Code:
users/Public/Application Data/opencpn/plugins/weather_routing/Boat.xml
To be safe maybe delete the whole directory.

I can make the program freeze with some boat settings, but not the default one, so it is quite possible you had these settings. I will try to fix the issue.
seandepagnier is offline   Reply With Quote
Old 03-07-2014, 06:46   #527
Registered User
 
rgleason's Avatar

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

Sean, I cleared all xml files related to boat.xml and weatherrouting.xml and the plugin is working now. I had to re enter some waypoints and routes and setup the boat file a bit, but is it working and doing routing with grib and climatology in 3.3.1824.
Seems pretty fast. Will do more later.
Hope you can fix the clitch for other users, so it does not happpen.
rgleason is offline   Reply With Quote
Old 08-07-2014, 12:06   #528
Registered User
 
rgleason's Avatar

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

This plugin works like a charm now with climatology and grib. For example I've been trying to reduce calc time with some tests. Here are some things you can do to make the calc faster:
1. 24 hour interval.
2. Generate 10 degree steps Course relative to the wind.
3. Constraints Max Div Course 60 degrees, Max course angle 120, Max search 70
4. Max latitude 55
6. Can you come up with other ways of making it fast and efficient?
Attached Thumbnails
Click image for larger version

Name:	Screenshot 2014-07-08 14.57.47.png
Views:	147
Size:	214.0 KB
ID:	84653  
rgleason is offline   Reply With Quote
Old 08-07-2014, 12:29   #529
Registered User

Join Date: Dec 2011
Boat: MC-Tec, Akilaria 950
Posts: 242
Re: Weather Routing

Hi,
I pulled the latest changes from git and tried to compile under VC2010,Win7

I get an compile error in BoatDialog.cpp, starting with line 462 :
-------------------
...
3>..\src\BoatDialog.cpp(462): error C2057: expected constant expression
3>..\src\BoatDialog.cpp(462): error C2466: cannot allocate an array of constant size 0
3>..\src\BoatDialog.cpp(462): error C2133: 'vmgs' : unknown size
3>..\src\BoatDialog.cpp(463): error C2057: expected constant expression
3>..\src\BoatDialog.cpp(463): error C2466: cannot allocate an array of constant size 0
3>..\src\BoatDialog.cpp(463): error C2133: 'windspeeds' : unknown size
3>..\src\BoatDialog.cpp(505): error C2057: expected constant expression
3>..\src\BoatDialog.cpp(505): error C2466: cannot allocate an array of constant size 0
3>..\src\BoatDialog.cpp(505): error C2133: 'values' : unknown size
--------------
Looking into the source code it seems like VC2010 has a problem with
a dynamic variable declaration like

455 int mul = 5, count = mul*num_wind_speeds - 1;

and then in line 462 defining a struct SailingVMG based on count:
...
462 SailingVMG vmgs[count];
463 double windspeeds[count];
...
505 double values[count];
...

I hope that helps

Tom
tom_BigSpeedy is offline   Reply With Quote
Old 10-07-2014, 09:30   #530
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: Weather Routing

Quote:
Originally Posted by rgleason View Post
This plugin works like a charm now with climatology and grib. For example I've been trying to reduce calc time with some tests. Here are some things you can do to make the calc faster:
1. 24 hour interval.
2. Generate 10 degree steps Course relative to the wind.
3. Constraints Max Div Course 60 degrees, Max course angle 120, Max search 70
4. Max latitude 55
6. Can you come up with other ways of making it fast and efficient?
You are going to get a much bigger speedup by using newton's method not runge-kutta (it is about 4 times slower)

10 degree steps is a bit coarse.. I usually use 7 or less. The other way is to reduce max course angle down to 60 or less.. This will make it run a lot faster too, but if you do this you really have to optimize tacking on the vmg tab in the boat setup or upwind courses won't work. I explain this in the information page.

Out of curiosity, how long did it take? It should show the runtime on the statistics window.
seandepagnier is offline   Reply With Quote
Old 10-07-2014, 09:33   #531
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: Weather Routing

Quote:
Originally Posted by tom_BigSpeedy View Post
Hi,
I pulled the latest changes from git and tried to compile under VC2010,Win7

I get an compile error in BoatDialog.cpp, starting with line 462 :
-------------------
.....

3>..\src\BoatDialog.cpp(505): error C2133: 'values' : unknown size
--------------
Looking into the source code it seems like VC2010 has a problem with
a dynamic variable declaration like


I hope that helps

Tom
Yes, the problem is VC. I am in the middle of rewriting this so it will probably fix it.
seandepagnier is offline   Reply With Quote
Old 10-07-2014, 13:03   #532
Registered User
 
rgleason's Avatar

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

Sean, thanks for suggestions:
Using Newtons Method as its faster 4x
Using Climatology and Grib 8 day.
Changed to 7 degrees per your suggestion
Lizard to Newport =2 seconds
Newport to Lizard =3 seconds
=Awesome fast

- Latest git pull, has some errors. Sent to you via email.
rgleason is offline   Reply With Quote
Old 12-07-2014, 01:41   #533
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: Weather Routing

I think I fixed the visual studio specific errors now.

I have been working on the boat dialog quite a bit, so it should be better, but there is so much I can possibly do.
seandepagnier is offline   Reply With Quote
Old 12-07-2014, 01:47   #534
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: Weather Routing

Quote:
Originally Posted by rgleason View Post
Sean, thanks for suggestions:
Using Newtons Method as its faster 4x
Using Climatology and Grib 8 day.
Changed to 7 degrees per your suggestion
Lizard to Newport =2 seconds
Newport to Lizard =3 seconds
=Awesome fast

- Latest git pull, has some errors. Sent to you via email.
You can see why speed is important, if you use batch mode, and generate configurations leaving every day for a month (to find best departure time) it will take about a minute to compute all of them now. Of course with dual or quad core, you can expect much faster results.

It is possible to double or triple the speed again as well.
seandepagnier is offline   Reply With Quote
Old 13-07-2014, 04:29   #535
Registered User

Join Date: May 2014
Posts: 28
Re: Weather Routing

Hi,

A couple of weeks ago I participated in a regatta (ĹF Offshore race) with periodically a bit poor wind conditions, and on the regatta blog there was a boat that wrote this little quiz:
- Do you know the difference between grib files and burning toilet paper?
-- Err, well - no …
- Burning toilet paper actually shows you where it is blowing from…

Despite the formidable qualities of burning toilet paper I have taken on the slightly more systematic approach and I am trying to build some technical support system for the boat. I did attempt to build it on Raspberry Pi, but for various reasons I have now abandoned that. Instead I have started with Intel NUC 3815 and Win7 64bit. OpenCPN works like a charm. The grib plugin works perfectly. But when I try to compile the weather routing plugin I get all kinds of errors.

I have set up my environment according to Compiling - Windows | Official OpenCPN Homepage and downloaded sources for OpenCPN and the weather routing plugin.

The build can’t find “zlib.h”. I can see in “CMakeLists.txt” that there a couple of lines commented that has to do with that. I have tried uncommenting those lines, but get other problems. Unfortunately I am not very used to c++ and c environments.

Any ideas perhaps? Would be most appreciated..
seglar-lulle is offline   Reply With Quote
Old 13-07-2014, 10:07   #536
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: Weather Routing

Keep in mind I am not a windows user, so I periodically break the build using visual studio (I test with mingw which catches about 50% of the gcc linux vs msvc differences)

I fixed the problem just now in git, should compile for you.
seandepagnier is offline   Reply With Quote
Old 13-07-2014, 10:15   #537
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: Weather Routing

Another idea,

Try without grib selected, and use a timestep of 15 minutes not 4 hours (it's much too long for the route you are doing)

Still I have no crashes even with the wrong options.
seandepagnier is offline   Reply With Quote
Old 13-07-2014, 10:30   #538
Registered User

Join Date: May 2014
Posts: 28
Re: Weather Routing

Hi,

Tried with:

git fetch --all <- Says (delta 5). Ok?

cd build
cmake ..
cmake --build .

Still no 'zlib.h' found.
seglar-lulle is offline   Reply With Quote
Old 13-07-2014, 10:40   #539
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: Weather Routing

I don't think "git fetch" merges.

So you must then type "git merge" Alternately "git pull" will fetch and merge.
seandepagnier is offline   Reply With Quote
Old 13-07-2014, 11:14   #540
Registered User

Join Date: May 2014
Posts: 28
Re: Weather Routing

Hi,

Thanks! I am learning here...

Now it crashes on missing files for json:

1>------ Build started: Project: ZERO_CHECK, Configuration: Debug Win32 ------
1> Checking Build System
1> CMake does not need to re-run because C:/Projects/GitHub/weather_routing_pi/build/CMakeFiles/generate.stamp is up-to-date.
2>------ Build started: Project: weather_routing-i18n, Configuration: Debug Win32 ------
3>------ Build started: Project: LIB_BZIP, Configuration: Debug Win32 ------
2> weather_routing_pi-i18n: Done.
3> LIB_BZIP.vcxproj -> C:\Projects\GitHub\weather_routing_pi\build\Debug\ LIB_BZIP.lib
4>------ Build started: Project: weather_routing_pi, Configuration: Debug Win32 ------
4> Creating library C:/Projects/GitHub/weather_routing_pi/build/Debug/weather_routing_pi.lib and object C:/Projects/GitHub/weather_routing_pi/build/Debug/weather_routing_pi.exp
4>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
4>jsonval.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl wxOnAssert(wchar_t const *,int,char const *,wchar_t const *,wchar_t const *)" (__imp_?wxOnAssert@@YAXPB_WHPBD00@Z) referenced in function "public: void __thiscall wxJSONInternalArray::RemoveAt(unsigned int,unsigned int)" (?RemoveAt@wxJSONInternalArray@@QAEXII@Z)
4>jsonreader.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) void __cdecl wxOnAssert(wchar_t const *,int,char const *,wchar_t const *,wchar_t const *)" (__imp_?wxOnAssert@@YAXPB_WHPBD00@Z)
4>jsonwriter.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) void __cdecl wxOnAssert(wchar_t const *,int,char const *,wchar_t const *,wchar_t const *)" (__imp_?wxOnAssert@@YAXPB_WHPBD00@Z)
4>jsonval.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl wxLogTrace(wchar_t const *,wchar_t const *,...)" (__imp_?wxLogTrace@@YAXPB_W0ZZ) referenced in function "public: class wxJSONValue & __thiscall wxJSONValue::Item(class wxString const &)" (?Item@wxJSONValue@@QAEAAV1@ABVwxString@@@Z)
4>jsonreader.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) void __cdecl wxLogTrace(wchar_t const *,wchar_t const *,...)" (__imp_?wxLogTrace@@YAXPB_W0ZZ)
4>jsonwriter.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) void __cdecl wxLogTrace(wchar_t const *,wchar_t const *,...)" (__imp_?wxLogTrace@@YAXPB_W0ZZ)
4>C:\Projects\GitHub\weather_routing_pi\build\Debu g\weather_routing_pi.dll : fatal error LNK1120: 2 unresolved externals
========== Build: 3 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Any ideas?
seglar-lulle is offline   Reply With Quote
Reply

Tags
paracelle, weather


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
Yachts in transit - new system for weather, blogging, diving, walking tracking sail-fish Navigation 13 22-05-2016 15:57
SSB Weather info VirtualVagabond General Sailing Forum 8 15-01-2016 08:40
Optimum SSB/satphone combo setup tulsag Marine Electronics 33 30-04-2012 07:19
MaxSea Weather Routing svrevelations Weather | Gear, Reports and Resources 12 10-10-2011 01:08
Sea Myths and Sayings Mariners The Sailor's Confessional 5 29-09-2011 13:51

Advertise Here


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


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.