Cruisers Forum
 

Go Back   Cruisers & Sailing Forums > Seamanship, Navigation & Boat Handling > OpenCPN
Cruiser Wiki Click Here to Login
Register Vendors FAQ Community Calendar Today's Posts Log in

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 13-12-2017, 10:12   #31
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,808
Images: 2
Re: Can't get rid of Polar Failed Error

Stelian

Quote:
I believe the current behaviour is perfectly fine, except for the polars. When a user choose a polar, because he might later want to customize it, he needs to have write access to the file. I think the plugin should automatically copy the polar from the system directory inside the users directory.
That is a big except. He does indeed need write access and yes, it should automatically copy the polar from the system directory to the user directory so it can be edited and saved. bb [This is another way of doing it, which is perhaps better because only the files that have been edited reside in the user folder]

Quote:
There is also another issue, specific to your package, because you're offering a precustomized WeatherRoutingConfiguration.xml and associated files.
  1. I don't know if the Windows installer can be told to install those to the users directory. On Linux I'm sure this cannot be done.
  2. I think those files should be installed in the system directory (as of now), and the plugin itself would copy those files to the home directory on the first invocation.
Stelian: The plugin itself would copy those files to the home directory on the first invocation.

I think this would be fine, and should be the way it works because in Windows we cannot use or edit weatherroutingconfiguration.xml from the application directory, we need read/write permission and there is an error! So yes weatherroutingconfiguration.xml should be copied to "c:\programdata\opencpn\plugins\weather_routin g\". Which is what I have been saying all along!

Now about the BOAT.XML files. this is a problem because they have the same .xml as weatherroutingconfiguration.xml! Users don't get it xml files are all the same to them!
I think these files, intended for storing polar names, should be in their Own sub directory, called "Boat". These also have to be in the User file because they also have to be read/write!

If the program on first invocation could do all that and also set the proper paths for each type of file
  • weatherroutingconfiguratiion.xml -> User directory
  • boat-your-boat-name-heavy-weather.xml --> UserDir\Boat\
  • boat-your-boat-name-light weather.xml ---> UserDir\Boat\
  • polars.csv polar.txt etc ---> UserDir\Polar\

For Windows the UserDir should be c:\programdata\opencpn\plugins\weather_routing\

Then set the pathnames for
  • weatherroutingconfiguratiion.xml
  • boat
  • polars

and store in the opencpn.ini file?

That would be great.
I think the problem is the same if it uses my files or not. The program should work out of the box as much as possible.

So yes when the plugin is Activated these setup things need to happen.
Also if a user is deciding to edit a polar file, it has to be copied over to the user directory.
Also when a user creates a new boat file with a new name it has to be copied over to the user directory.
[Actually, if the paths are set right, won't this happen automatically?]

So in essence, I believe the current behavior needs to be improved, purely for user experience and simplicity.
What you've proposed would solve it. ...beautifully!
rgleason is offline   Reply With Quote
Old 13-12-2017, 11:33   #32
Registered User

Join Date: Mar 2017
Location: Brittany, France
Boat: First 30 (1976)
Posts: 324
Re: Can't get rid of Polar Failed Error

Quote:
Originally Posted by rgleason View Post
So yes weatherroutingconfiguration.xml should be copied to "c:\programdata\opencpn\plugins\weather_routin g\". Which is what I have been saying all along!
Ok, so, on the first invocation of the plugin only, if weatherroutingconfiguration.xml doesn't exist in the user directory, we will copy the one from the system directory (containing the example configurations). Right ?

And at the same moment we would copy the Boat.xml containing the example boat.

Quote:
Originally Posted by rgleason View Post
weatherroutingconfiguratiion.xml -> User directory
  • boat-your-boat-name-heavy-weather.xml --> UserDir\Boat\
  • boat-your-boat-name-light weather.xml ---> UserDir\Boat\
  • olars.csv polar.txt etc ---> UserDir\Polar\
Sure, this can be done.

Quote:
Originally Posted by rgleason View Post
Also when a user creates a new boat file with a new name it has to be copied over to the user directory.
[Actually, if the paths are set right, won't this happen automatically?]
This should happen automatically indeed.

Quote:
Originally Posted by rgleason View Post
Also if a user is deciding to edit a polar file, it has to be copied over to the user directory.
Also when a user creates a new boat file with a new name it has to be copied over to the user directory.
This is where I don't know exactly how to do it: the plugin remembers the last location where you picked (or saved) a polar. By default, now, it points to the system directory where the polars are located (138 of them, 620 kB of data).

The easy way would be to copy all of them to the UserDirectory on the first invocation, then the user will be able to choose the one he wants and edit it at will. But this would consume 620 kB in the user directory, and if the polars get updated with the newer versions of the plugin, he will not see them unless he does the copy manually.

A more intelligent way of doing it would be to allow the user to choose a polar in the system directory, and copy it to the user directory only if he wants to modify it. However, there will be a usage problem and I'm not sure exactly what would be the best way to deal with it. Imagine:
1) user clicks on "Add polar", the file selector shows the files in system directory
2) user chooses a polar, modifies it and saves it. The polar gets saved into the user directory. The "current" polar directory is now the user directory
3) user clicks again on "Add polar", because he wants to add a second one, or maybe he deletes the first and wants to add another one. The file selector will show the files from the user directory (meaning just one polar in our example) !!! He will have to navigate back to the system directory to find the full list.
4) also, having two polars with an identical name (the "system" one and the "modified user" one) might be confusing for the user.

Maybe this could be resolved with a more "intelligent" file chooser, which would not allow selecting "files" but original / modified polars instead. But this would require too much code changes I believe.
stelian is offline   Reply With Quote
Old 13-12-2017, 14:31   #33
Registered User

Join Date: Mar 2017
Location: Brittany, France
Boat: First 30 (1976)
Posts: 324
Re: Can't get rid of Polar Failed Error

Ok, I started working on this, using the simple 'copy all polars' approach for now. Almost working...

But I'm having some trouble completing the routing of the example configurations, and this might be due to bad start date/times (now they are saved in UTC, before they were in local date/time format).

Rick, can you please confirm that you're in UTC-6 ?

Also, if you could post a high resolution of https://opencpn.org/wiki/dokuwiki/li...etup-1-4hr.jpg it would be nice, because I cannot read the text on that one.
stelian is offline   Reply With Quote
Old 13-12-2017, 15:31   #34
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,808
Images: 2
Re: Can't get rid of Polar Failed Error

Yes, can boat.xml be copied into the "boat" subdirectory
and can that path be set or saved for the boat files?
Also can a polar subdir be made and the polar path set or saved for polar files? so that when when a user changes either a boat file contents or file name, or a polar file contents or name, it will be saved to the respective user directory?
rgleason is offline   Reply With Quote
Old 13-12-2017, 15:46   #35
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,808
Images: 2
Re: Can't get rid of Polar Failed Error

Your points about polar files are good.
Maybe we start at initialization or activation and copy just one designated polar file into the users "polar" directory. This could be called "polar.pol".
Then user is now setup with the correct pathname and can edit and rename and save that file to the user "polar" directory.

When the user wants to find a "new" polar from the system file, he has a separate button and function to "import", which opens the system polar dir and he scrolls and highlights a file and then hits enter or import. The file is copied from sys polar to user polar.
Then the user goes back to using the regular functions.

If this last part is too much to do, then maybe we just do the first part to get it working easily for a user.
I can the explain in the wiki how to find more polars.
rgleason is offline   Reply With Quote
Old 13-12-2017, 16:04   #36
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,808
Images: 2
Re: Can't get rid of Polar Failed Error

Simplr, Copy all polars. Great that should be fine

I had not realized that we had time issues until the girhub notice, and perhaps that is causing user troubles too!!!
I will let you know tonight in about 3 hours and post a high res version too. In Boston we are normally on UTC -5, but this was done after the Halifax race when we were in the atlantic time zone utc -4. We were on daylight savings time too, but so were you. So I have to check my computer I think. I believe I normally have the laptop on auto date and time, for the race I switched it off and manually changed to halifax time, then put it on auto date and time in halifax. Then several months later made those files, but.....
Actually the grib file which has time in it was created by Paul, by querying the noaa servers for the time span and area I wanted. Then he sent me the file. It was amazingly small in size. I do not know what time zone he was in when he made it.

I recall this was all done in the weatherrouting thread or an Irma thread so I might be able to ask him if that will help.

Sorry about the utc unknowns at this point
rgleason is offline   Reply With Quote
Old 13-12-2017, 16:06   #37
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,808
Images: 2
Re: Can't get rid of Polar Failed Error

I would have to say my computers are set on utc -5, but I dont know about the grib file time and utc when made.
rgleason is offline   Reply With Quote
Old 13-12-2017, 23:36   #38
Registered User

Join Date: Mar 2017
Location: Brittany, France
Boat: First 30 (1976)
Posts: 324
Re: Can't get rid of Polar Failed Error

Quote:
Originally Posted by rgleason View Post
I would have to say my computers are set on utc -5, but I dont know about the grib file time and utc when made.
Grib file is already in UTC. I'll try UTC-5 for the configuration file...

[EDIT] In fact, UTC-4 because of DST...
stelian is offline   Reply With Quote
Old 14-12-2017, 04:57   #39
Registered User

Join Date: Mar 2017
Location: Brittany, France
Boat: First 30 (1976)
Posts: 324
Re: Can't get rid of Polar Failed Error

Ok, here is something to test: http://popies.net/tmp/weather_routin...4sp1-win32.exe

Prior to launching the plugin:
- remove (and backup first if needed) the contents of c:\ProgramData\opencpn\plugins\weather_routing
- open grib plugin and select the grib file from c:\Program Files (x86)\OpenCPN\plugins\weather_routing_pi\data\grib-sample\Irma....grib2
- launch Weather Routing plugin
- you should be able to click on "Calculate" right away.

A few notes:
- you should have the high resolution ghhs maps or routing will be suboptimal (even fail in some cases)
- in my virtual Windows machine, the grib layer is completly opaque and will hide the routing layer. I need to close the grib dialog in order to see the route or the isochrones.
- finally, as you can see in the screencap below, some configurations fail. I think this is because of bad starting times (UTC versus local time), Rick please check those (it may be useful to setup the grib plugin to work in UTC, and same thing for weather_routing). The behaviour is the same on Linux or Windows, this is why the capture was done on Linux.

The source code has been pushed to my github, in the provide-default-config branch.
Attached Thumbnails
Click image for larger version

Name:	routes.jpg
Views:	78
Size:	300.2 KB
ID:	160514  
stelian is offline   Reply With Quote
Old 14-12-2017, 07:55   #40
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,808
Images: 2
Re: Can't get rid of Polar Failed Error

Stelian,
I am back online and downloading it now. Will advise.
- I am going to rename my opencpn.ini file and start with a fresh ini as it is simpler for me.
- I will delete or rename my c:\programdata\opencpn\plugins\weather_routing folder.

RE failures:
The last two I left failing intentionally I believe, as part of the exercise, so people understood that the time interval made a difference. See the tutorial page
https://opencpn.org/wiki/dokuwiki/do...rent_intervals

I am not sure if this is entirely clear in the Wiki, and I need to really simplify these examples and have fewer of them, however I have another setup that just uses Climatology and not hurricane Irma, which Sean would prefer, so we are doing that in the final release.

This is going to be a great improvement!

Don't know why the first two fail yet. Will advise.
rgleason is offline   Reply With Quote
Old 14-12-2017, 08:53   #41
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,808
Images: 2
Re: Can't get rid of Polar Failed Error

Cleanup Procedure:
-Rename opencpn.ini file to opencpn.ini.12-14-2017 and start with a fresh ini
-Run RemoveWeatherRoutingPlugin.exe from the Opencpn program directory.
-Found the wxrte folder c:\programfiles (x86)\opencpn\plugins\weather_routing_pi folder so renamed to old.weather_routing_pi
-Found the wxrte folder c:\programdata\opencpn\plugins\weather_routing so renamed to old.weather_routing.

Install
- Download and install Stelian's version.
- Turn on Options > Display > Advanced > Accel Graphics OpenGL
- Options > Plugins > Enable Climatology and Grib_pi.
- Using Grib_pi open the Irma grib file at c:/programfiles (x86)/opencpn/plugins/weather_routing_pi/data/gri_sample
- Options > Plugins > Enable Weather_routing_pi.
- Click in the Weather_Routing Icon which will copy files to user directories, setup pathnames and open the plugin. -Wait for completion.

Results
-
Weather_routing opens with the Configuration screen all preconfigured!
- Highlighting the first configuration and clicking on "Compute" it "Completes"!!!

Hurrah! You've done it Stelian. This will be a great help to users. Having the belief and understanding that it does work, and that they did complete a routing themselves with no complicated setup or pathnames required.
Attached Thumbnails
Click image for larger version

Name:	WxRte-1-SetGrib-Clim.jpg
Views:	73
Size:	252.1 KB
ID:	160525   Click image for larger version

Name:	WxRte-2-Enable-Open.png
Views:	72
Size:	300.7 KB
ID:	160526  

Click image for larger version

Name:	WxRte-3-Highlight-Config.jpg
Views:	74
Size:	404.0 KB
ID:	160527   Click image for larger version

Name:	WxRte-4-Compute-with-Display-Adv-Opengl-on.jpg
Views:	71
Size:	413.1 KB
ID:	160528  

rgleason is offline   Reply With Quote
Old 14-12-2017, 09:03   #42
Registered User

Join Date: Mar 2017
Location: Brittany, France
Boat: First 30 (1976)
Posts: 324
Re: Can't get rid of Polar Failed Error

Of course it works

BTW: activating opengl made the grib + route display work in virtualbox too !
stelian is offline   Reply With Quote
Old 14-12-2017, 09:38   #43
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,808
Images: 2
Re: Can't get rid of Polar Failed Error

The second configuration is highlighted and "Compute" is clicked. It computes and shows a routing (track) but stops short and fails. Why?
-The first reason is that the 7 day grib file has run out.
-The second reason is that Climatology is not working for some reason. The dropdown selection for Average, Most Likely, Cumulative, Cumulative Calms, etc is frozen.

Solution:
1. Open Climatology and make sure it is all loaded. Usually this starts automatically, but we have a new opencpn.ini and some of the Climatology settings have not been sufficiently configured to work.
2. Check the box "Last Valid if Data is Insufficient"
3. Make sure the Grib_pi dropdown box is working.
4. Try running the configuration now with "Compute".
5. Now turn off "Last Valid" and it should still "Complete"
Attached Thumbnails
Click image for larger version

Name:	WxRte-5-2ndConfig-not-complete.jpg
Views:	76
Size:	432.0 KB
ID:	160532   Click image for larger version

Name:	WxRte-6-Freeport-GB-complete.jpg
Views:	83
Size:	427.7 KB
ID:	160533  

rgleason is offline   Reply With Quote
Old 14-12-2017, 09:47   #44
Registered User

Join Date: Mar 2017
Location: Brittany, France
Boat: First 30 (1976)
Posts: 324
Re: Can't get rid of Polar Failed Error

Ok, I don't have the climatology plugin at all on my install. This is probably the reason for the two failing routes.

Now, what default routes/boats/polars do we want to push in the official distribution ?
stelian is offline   Reply With Quote
Old 14-12-2017, 09:48   #45
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,808
Images: 2
Weather_Routing_pi Freeport-GB

This screenshot is better and shows the switchover to Climatology with different colored isochrones.

By stepping through the Grib_pi from Wed Sept 6 to Tues Sept 12 using the grib step forward button and then hovering over the Round Own Ship location at that time, you will see the wind conditions in the Grib instruments data.

For this route the wind starts up reasonably, and goes up to 61mph towards the eye of the hurricane and then wanes out to 20knts and then 17 just before Climatology Wind Data takes over.

You can understand why Sean would prefer not to use these examples as it would be very poor judgement and seamanship to attempt such a routing. The skippers good judgement is always essential. -Once had a History teacher in 7th grade who took the Russian position against democracy and capitalism and taught the entire semester that way. Finally we started giving him reasons it was not so good a way to live, and in the final exam it became clear why he taught that way. It was the most effective class I had in grade school.

The square boxes on the route are sail changes, when the actual polar file has been switched. For this routing we use 3 polar files.

I've got a better shot of that routing.
Attached Thumbnails
Click image for larger version

Name:	WxRte-7-Freeport-GB-Shows-Climatology.jpg
Views:	86
Size:	427.3 KB
ID:	160534  
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
Zeus2 Not updatting but get "upgrade failed. Retry upgrade procedure" Fluenta Marine Electronics 6 22-11-2020 05:32
Can I get rid of this Thick Black Line in Vector charts? HappySeagull OpenCPN 2 22-01-2014 15:46
I Want to Get Rid of Some Cross Trimaran Brochures sww914 Classifieds Archive 0 31-05-2011 20:21
Polar View / Polar Com Digital Map Software tomj Navigation 1 17-05-2011 19:24
HELP! How to Get Rid of Gas Smell wristwister General Sailing Forum 6 29-04-2011 23:51

Advertise Here
  Vendor Spotlight
No Threads to Display.


All times are GMT -7. The time now is 22:34.


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.