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 26-01-2015, 14:26   #46
Marine Service Provider

Join Date: Dec 2014
Posts: 46
Re: GoodAnchorage.com Plugin – Alpha Release

Dirk,

I tried to reproduce the crash but so far no luck. My guess is that the anchorage that caused the blow-up is this one:

Caño Tiritao | Good Anchorage

As you can see, the title contains 'ñ', which our API's encode as '\u00f1'. So far I was able to load it from both Windows and Linux systems (see attached).

My guess, is that somehow one of the libraries on your system (wxJSON?) is not prepared to deal with UTF encoding.
Attached Thumbnails
Click image for larger version

Name:	i18n.png
Views:	144
Size:	49.3 KB
ID:	96099  
Skipper Web is offline   Reply With Quote
Old 26-01-2015, 15:06   #47
Registered User
 
LeaseOnLife's Avatar

Join Date: Apr 2008
Location: out cruising again, currently in Fiji
Boat: Sailboat
Posts: 1,466
Re: GoodAnchorage.com Plugin – Alpha Release

Quote:
Originally Posted by Skipper Web View Post
Dirk,

I tried to reproduce the crash but so far no luck. My guess is that the anchorage that caused the blow-up is this one:

Caño Tiritao | Good Anchorage

As you can see, the title contains 'ñ', which our API's encode as '\u00f1'. So far I was able to load it from both Windows and Linux systems (see attached).

My guess, is that somehow one of the libraries on your system (wxJSON?) is not prepared to deal with UTF encoding.

Yeah, my windows laptop doesn't have this problem either. My linux setup is basd on ubuntu-server (for raid support during install) and KDE on top of it.

I have no idea how I would start debugging missing UTF support in the libraries. Could the cmake/make throw a flag to help these cases?

Thanks

Dirk
LeaseOnLife is offline   Reply With Quote
Old 26-01-2015, 16:32   #48
Marine Service Provider

Join Date: Dec 2014
Posts: 46
Re: GoodAnchorage.com Plugin – Alpha Release

Dirk,

I'm far from being an expert on library debugging. That being said, based on wxJSON documentation, it does different things depending on whether the library is build in Unicode or ANSI modes. It looks to me that one way to find out may be to see what this returns (from inside "goodanchorage_pi" directory):

$ grep jsonreader build/CMakeFiles/goodanchorage_pi.dir/depend.make | tail -1

Mine returns:

CMakeFiles/goodanchorage_pi.dir/src/wxJSON/jsonreader.cpp.o: /usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-release-2.8/wx/setup.h

Any chance on your system that's not Unicode?
Skipper Web is offline   Reply With Quote
Old 26-01-2015, 16:39   #49
Registered User
 
LeaseOnLife's Avatar

Join Date: Apr 2008
Location: out cruising again, currently in Fiji
Boat: Sailboat
Posts: 1,466
Re: GoodAnchorage.com Plugin – Alpha Release

Quote:
Originally Posted by Skipper Web View Post
Dirk,

I'm far from being an expert on library debugging. That being said, based on wxJSON documentation, it does different things depending on whether the library is build in Unicode or ANSI modes. It looks to me that one way to find out may be to see what this returns (from inside "goodanchorage_pi" directory):

$ grep jsonreader build/CMakeFiles/goodanchorage_pi.dir/depend.make | tail -1

Mine returns:

CMakeFiles/goodanchorage_pi.dir/src/wxJSON/jsonreader.cpp.o: /usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-release-2.8/wx/setup.h

Any chance on your system that's not Unicode?
Thanks for helping!

$ grep jsonreader build/CMakeFiles/goodanchorage_pi.dir/depend.make | tail -1
returns here:
CMakeFiles/goodanchorage_pi.dir/src/wxJSON/jsonreader.cpp.o: /usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0/wx/setup.h
LeaseOnLife is offline   Reply With Quote
Old 26-01-2015, 17:32   #50
Marine Service Provider

Join Date: Dec 2014
Posts: 46
Re: GoodAnchorage.com Plugin – Alpha Release

Dirk,

I added a minor change to the code that *might* help. Really, no promises. Do you mind doing the pull / build / run one more time please? Thanks!
Skipper Web is offline   Reply With Quote
Old 26-01-2015, 18:15   #51
Marine Service Provider

Join Date: Dec 2014
Posts: 46
Re: GoodAnchorage.com Plugin – Alpha Release

All bugs reported in this thread are now being tracked here:

https://github.com/goodanchorage/goo...rage_pi/issues
Skipper Web is offline   Reply With Quote
Old 27-01-2015, 08:17   #52
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: GoodAnchorage.com Plugin – Alpha Release

OpenCPN Beta File Thingie rguser rgpass
Recompiled to commit d280c39

Go to 4.0 Win PI Folder

goodanchorage_pi-0.2-b-d280c39-win32

Have loaded and run it and it works. Have not tested extensively.
Have Registered on the site, and created a Goodanchorage Icon and edited it.
The icon appears upon double click when the Goodanchorage Icon is active and I have connected to the internet.
rgleason is offline   Reply With Quote
Old 30-01-2015, 14:02   #53
Marine Service Provider

Join Date: Dec 2014
Posts: 46
Re: GoodAnchorage.com Plugin – Alpha Release

Several users have complained that GA plugin doesn't show up in Options -> Plugin. The plugin was complied against OpenCPN version 4.0.

If you absolutely must have a version that supports 3.2.2 please let me know.
Skipper Web is offline   Reply With Quote
Old 31-01-2015, 12:48   #54
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: GoodAnchorage.com Plugin – Alpha Release

Please note that I compiled against an opencpn v4.0 version of opencpn.lib from that because the plugin api is listed as 1.12 i believe. I can recompile for win in several days.

Sent from my SCH-I545 using Cruisers Sailing Forum mobile app
rgleason is offline   Reply With Quote
Old 31-01-2015, 17:17   #55
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: GoodAnchorage.com Plugin – Alpha Release

So I finally got to using this plugin, it works well.

The thing I don't understand is, if I double click and load a lot of anchorage waypoints, then disable good anchorage (from toolbar) then enable again, the waypoints are gone. This is ok, but when I double click to load them again, it has to download them again?? This isn't much good for offline use.

Also, I would like the option to set the radius, and to ignore anchorages or comments posted by certain users (blacklist)
seandepagnier is offline   Reply With Quote
Old 31-01-2015, 17:25   #56
Marine Service Provider

Join Date: Dec 2014
Posts: 46
Re: GoodAnchorage.com Plugin – Alpha Release

rgleason,

I'm trying to figure out whether there is a lot of demand for 3.2.2. My gut tells me that since the plan is to migrate to everybody to 4.0 the right thing to do is just give it some time. On the other hand, I'm new to OpenCPN world and don't know how fast such migrations occur. Perhaps let's give it another week and see if a lot of users request 3.2.2?

Thank you for your help.
Skipper Web is offline   Reply With Quote
Old 31-01-2015, 17:32   #57
Marine Service Provider

Join Date: Dec 2014
Posts: 46
Re: GoodAnchorage.com Plugin – Alpha Release

boat_alexandra,

Every anchorage that you see on the screen is also stored locally. We follow the WYSIWYG Offline strategy. ;-) If an anchorage shows up on the map its coordinates are stored locally. If you review anchorage details, then those are stored as well.

Once you switch to offline mode (automatic, the moment plugin detects absence of network), just double-click on the map. Every anchorage ever viewed will be shown.

Good point about the radius parameter. But I don't get the blacklist part. The data is the data, either it's accurate or it's not. Why would you want to ignore the facts?
Skipper Web is offline   Reply With Quote
Old 01-02-2015, 02:16   #58
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: GoodAnchorage.com Plugin – Alpha Release

Quote:
Originally Posted by Skipper Web View Post
boat_alexandra,

Every anchorage that you see on the screen is also stored locally. We follow the WYSIWYG Offline strategy. ;-) If an anchorage shows up on the map its coordinates are stored locally. If you review anchorage details, then those are stored as well.

Once you switch to offline mode (automatic, the moment plugin detects absence of network), just double-click on the map. Every anchorage ever viewed will be shown.
Great.

Is there a way I can also pull all of the details for all of the anchorages without having to manually select each one? This would be useful for later offline use.

Quote:
Good point about the radius parameter. But I don't get the blacklist part. The data is the data, either it's accurate or it's not. Why would you want to ignore the facts?
Maybe this is a feature needed on the website. Basically my idea is something like, peer review. For example, other users can vote if the data is accurate or not. If the data is voted down from one user, another user's description and information may rise above it. Finally, each user would gain an overall rating of how accurate their reviews are which would be used as an initial value for the accuracy of future posts.
seandepagnier is offline   Reply With Quote
Old 01-02-2015, 04:36   #59
Marine Service Provider

Join Date: Dec 2014
Posts: 46
Re: GoodAnchorage.com Plugin – Alpha Release

Quote:
Originally Posted by boat_alexandra View Post
Is there a way I can also pull all of the details for all of the anchorages without having to manually select each one? This would be useful for later offline use.
Not in the current release. The reason plugin and API were built this way is that we were striving for a balance between the amount of data downloaded and network utilization. But I'll gauge the level of interest on this feature for later versions.

Your data peer review suggestion is right on target. I'm not at liberty to discuss further. :-)
Skipper Web is offline   Reply With Quote
Old 02-02-2015, 04:16   #60
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: GoodAnchorage.com Plugin – Alpha Release

Quote:
Originally Posted by Skipper Web View Post
rgleason,

I'm trying to figure out whether there is a lot of demand for 3.2.2. My gut tells me that since the plan is to migrate to everybody to 4.0 the right thing to do is just give it some time. On the other hand, I'm new to OpenCPN world and don't know how fast such migrations occur. Perhaps let's give it another week and see if a lot of users request 3.2.2?

Thank you for your help.
Basically, it's up to you. Generally you should support the oldest version of OpenCPN that you can. If you need features for the plugin that are only possible in newer versions of OpenCPN you should use that one.

Quote:
Originally Posted by Skipper Web View Post
Not in the current release. The reason plugin and API were built this way is that we were striving for a balance between the amount of data downloaded and network utilization. But I'll gauge the level of interest on this feature for later versions.
The actual amount of data sent is very small. Perhaps we can invent some sort of clever compression scheme to further reduce it. With a radius of download area it would help as well, and you could certainly cap the max data transfer.
Quote:
Your data peer review suggestion is right on target. I'm not at liberty to discuss further. :-)
I'm glad it's on target, but why cannot we discuss it? Are you afraid someone will exploit your algorithm? A clever person is likely to do this anyway, but discussing it will allow us to determine an algorithm that cannot be exploited.


Further testing of the plugin I have some issues:

If I am not connected to the internet and I click on the toolbar goodanchorage icon, opencpn gets forever stuck on goodanchorage_pi.cpp:393. It needs to give up after so long, but also this routine should really really be done in a background thread, and the toolbar icon changed to indicate it is connecting to the server.

When I am connected to the internet, but disconnect the plugin detects and switches to offline mode. Perhaps the toolbar icon should change to reflect this. Again, I believe all the network transfer routines should take place in a background thread.

A preferences dialog would be very useful for setting radius, (and in the future many possible settings, like filtering unverified reviews etc...)

If OpenCPN crashes, or shuts down abnormally (power failure etc...), the good anchorage waypoints are not removed, and still appear without the good anchorage plugin at the next run. Perhaps, the plugin can remove previous good anchorage waypoints at startup? This is maybe not a plugin bug, but we need to rethink the issue.

Are you going to support adding waypoints through opencpn? This would be nice, but I really think all it needs is to open a browser and automatically paste the lat/lon coordinates.

What about tracks? Do you have any desire to share tracks or strictly anchorages?


If you have any questions at all about how to implement anything please ask. I am very familiar with how to accomplish these things, and am willing to implement some of them if you prefer.
seandepagnier is offline   Reply With Quote
Reply

Tags
anchor, lease, plug


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
Need Alpha Autopilot Motor Fisher34 Marine Electronics 6 24-08-2006 10:01
RF Noise from Mastervolt Alpha Pro BachAndByte Electrical: Batteries, Generators & Solar 4 21-08-2004 04:33

Advertise Here


All times are GMT -7. The time now is 21:40.


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.