Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 21-05-2018, 01:11   #1
Registered User

Join Date: May 2013
Location: NSW, Australia
Boat: Richter 42
Posts: 933
ODraw 1.5 beta

Hi,
I have just put up the source code, no executables, for the beta testing of OD 1.5. This is a work in progress and will change, possibly radically, over time as the requirements are refined and the new functionality is put to use.


Currently there are two new working ODAPI's:
  • CreateBoundaryPoint
  • CreateTextPoint
There is a CSV import capability that lets you create Boundaries and Boundary Points.


There is the start of the JSON messaging to do the same work that the ODAPI does, but loosely coupled.


The JSON messaging is for occasional use, i.e creating a few points or boundaries. The ODAPI is for heavy use, i.e. creating hundreds/thousands of points and boundaries.


The CSV import is to make it easier (?) to define boundaries and then implement them. The export/import gpx file process should be used for moving OD objects between systems.


Currently I am investigating being able to import Excel spreadsheets, but that is not ready for use.


As this is a beta other changes can be made to suite different needs, BUT I would like them tracked in FlySpray so that I don't lose information about what people want.


To help in understanding and testing I have created another plugin, testplugin_pi, with the source being here: https://github.com/jongough/testplugin_pi . This plugin is purely for testing purposes and currently allows the two new API's to be tested and walked through. There is the start of a test process for JSON messages (not OD specific), but it needs work to make it usable.


Regards
Jon
__________________

jongough is offline   Reply With Quote
Old 21-05-2018, 07:48   #2
Registered User
 
Gilletarom's Avatar

Join Date: Mar 2010
Location: France
Boat: 10.50 mètres
Posts: 2,540
Re: ODraw 1.5 beta

Quote:
Originally Posted by jongough View Post
Hi,
I have just put up the source code, no executables,...

Jon

J'attendrai, le jour et la nuit, j'attendrai l'arrivée !


(D'après une chanson célèbre dans mon pays).
__________________

Gilletarom is offline   Reply With Quote
Old 22-05-2018, 19:47   #3
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 11,551
Re: ODraw 1.5 beta

Gille Try this link for the beta.


I haven't found the file that we can use to test the import. Does anyone know where it is?


I used the attached, first exporting the boundary as a gpx, then importing it. Seems to work fine.
Need to try different things still.
Attached Files
File Type: doc boundary2-paths.gpx.doc (10.6 KB, 7 views)
rgleason is online now   Reply With Quote
Old 23-05-2018, 14:51   #4
Registered User

Join Date: May 2013
Location: NSW, Australia
Boat: Richter 42
Posts: 933
Re: ODraw 1.5 beta

Hi,
I have attached a very simple csv file (remove the txt suffix) showing the import of a boundary. Hope this helps.


Jon
Attached Files
File Type: txt test-boundary-import.csv.txt (598 Bytes, 11 views)
jongough is offline   Reply With Quote
Old 23-05-2018, 17:32   #5
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 11,551
Re: ODraw 1.5 beta

It loaded using Ocpn_draw Layers Tab > Import gpx > drop down filetype to csv then select the csv file.

Opencpn crashed when I tried Paths Tab > Import gpx > drop down filetype to CSV then select the csv file.

The csv file selected was: test-boundary-import.csv


The other way that works is Pick Temporary Layer and select the csv file.


I am using ocpn_draw_pi-1.5.7-win32-BETA
with Opencpn v4.8.4 for Windows.
Attached Thumbnails
Click image for larger version

Name:	Screenshot (105).jpg
Views:	42
Size:	368.0 KB
ID:	170386  
rgleason is online now   Reply With Quote
Old 23-05-2018, 17:43   #6
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 11,551
Re: ODraw 1.5 beta

The csv is actually two boundaries.


Have not figured out how to export it.


Thanks for the file!


Were we supposed to do this?
Opencpn crashed when I tried Paths Tab > Import gpx > drop down filetype to CSV then select the csv file.
Attached Thumbnails
Click image for larger version

Name:	Screenshot (106).jpg
Views:	33
Size:	277.5 KB
ID:	170388  
rgleason is online now   Reply With Quote
Old 24-05-2018, 00:07   #7
Registered User

Join Date: May 2013
Location: NSW, Australia
Boat: Richter 42
Posts: 933
Re: ODraw 1.5 beta

Hi,
OD 1.5.10 imports directly as well as into a layer., the initial implementation only worked into layers, but this was an oversight on my behalf (most of it was there, just it didn't handle a NULL layer).



GPX is supposed to be for export/import normally, but CSV is to allow users to use a spreadsheet to build boundaries and boundary points and get them into OD. Is there a real need to generate a CSV for export?


Jon
jongough is offline   Reply With Quote
Old 24-05-2018, 07:33   #8
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 11,551
Re: ODraw 1.5 beta

I am not really the one to answer this question Jon. Perhaps let's see what users find they need and then add it!

Regarding trying to Paste Lat/Long into EBL Properties,

I had some other thoughts. When an EBL is set to Move with the boat and/or maintain a set angle from the boat centerline, then the Lat/Long field should be greyed out, such that a paste cannot be done. Also when a paste is allowed or permitted the Lat/Long field should be greyed or something so that it cannot be pasted to. I also believe that Copy and Copy Lat/Long should always be permitted. Is that clear enough?

Quote:
Originally Posted by jongough View Post
Hi,
OD 1.5.10 imports directly as well as into a layer., the initial implementation only worked into layers, but this was an oversight on my behalf (most of it was there, just it didn't handle a NULL layer).



GPX is supposed to be for export/import normally, but CSV is to allow users to use a spreadsheet to build boundaries and boundary points and get them into OD. Is there a real need to generate a CSV for export?


Jon
rgleason is online now   Reply With Quote
Old 24-05-2018, 12:21   #9
Registered User

Join Date: Aug 2010
Location: Oz
Boat: EX prawn trawler 14m
Posts: 107
Re: ODraw 1.5 beta

Quote:
Originally Posted by jongough View Post
Hi,
OD 1.5.10 imports directly as well as into a layer., the initial implementation only worked into layers, but this was an oversight on my behalf (most of it was there, just it didn't handle a NULL layer).



GPX is supposed to be for export/import normally, but CSV is to allow users to use a spreadsheet to build boundaries and boundary points and get them into OD. Is there a real need to generate a CSV for export?


Jon
Jon
.csv Import only required, my vote.
.gpx export is fine.
.csv or .xls of no consequence either.
As is .csv is fine.
As usual job well done and thanks yet again for your efforts.
Redog
redog is offline   Reply With Quote
Old 28-05-2018, 15:00   #10
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 11,551
Re: ODraw 1.5 beta

For windows verson 1.5.14 try here
rgleason is online now   Reply With Quote
Old 28-05-2018, 23:14   #11
Registered User

Join Date: May 2013
Location: NSW, Australia
Boat: Richter 42
Posts: 933
Re: ODraw 1.5 beta

Hi,
Patch 1.5.17 now has a working 'CreateBoundary' ODAPI. To see how this works you will need the testplugin_pi patch 1.0.3 (https://github.com/jongough/testplugin_pi). It also has the latest translations for OD 1.4.71 (have not generated the pot file for OD 1.5 yet as the display text is still changing).



OD 1.5 now supports:
  • ODAPI
    • Create Boundary
    • Create Boundary Point
    • Create Text Point
  • CSV import
    • Boundary
    • Boundary Point
    • Text Point
Next up will be the JSON import of Boundaries, Boundary Points and Text Points.


The testplugin_pi is not only useful for testing OD, but shows how to interact with both JSON (work in progress) and the ODAPI. The JSON part is designed to send any JSON into OCPN so will work with other plugins.



Jon
jongough is offline   Reply With Quote
Old 13-07-2018, 23:40   #12
Registered User

Join Date: May 2013
Location: NSW, Australia
Boat: Richter 42
Posts: 933
Re: ODraw 1.5 beta

Hi,
Patch 1.5.22 is available.


OD 1.5 now supports:
  • ODAPI
    • Create Boundary
    • Create Boundary Point
    • Create Text Point
  • JSON
    • Create Boundary
    • Create Boundary Point
    • Create Text Point
  • CSV import
    • Boundary
    • Boundary Point
    • Text Point
  • JSON Import
    • Boundary
    • Boundary Point
    • Text Point
Work has started on using a JSON Schema approach to validating the messages. Unfortunately most implementations are stuck on Draft 4 of the standard and Draft 6 or higher is needed to handle messages with complex structures. Also, the current implementations change the 'flavour' of the executable (on linux the ABI for ELF is 0x03, whereas OpenCPN has 0x00, an old default). With the changes occurring to the C++11 (and beyond) standards this may cause issues and I am not sure how to handle that. Part of this process is to define the schemas being used. You will now find an ODJSONSchemas.h file in the 'include' directory which is a valid schema, and will work with the online schema checkers, just not the available C++ ones.


Basic checking of the JSON is currently done (the more comprehensive checking is selected by a Cmake variable). So it is possible to crash OpenCPN if your JSON message is not well formed. That is part of the reason to try and use a validation schema.



testplugin_pi patch 1.0.8 supports all of the above. It has been reworked to make the screens more logical. It will now import and export JSON messages, it will log JSON messages over a restart so you can see in a file all the messages and responses. Just be aware that the way that messaging works you will see the 'Response' before the 'Request' as the whole messaging system is synchronous and the plugins get the messages in turn, so that is the order that the testplugin sees them.


Jon
jongough is offline   Reply With Quote
Old 08-08-2018, 06:48   #13
Registered User

Join Date: Feb 2013
Location: Germany, Bavaria
Boat: Jeanneau Sun Fizz 40'
Posts: 131
Re: ODraw 1.5 beta

Dear all, maybe I overlooked something?!? I tried to install version 1.5.22 (having OpenCPN 4.8.6 installed now) but the plugin does not show up. It can be seen in the installed programs and features, the .ini file indicates it is enabled, but it does not show up in the "plugins" tab in the tools menu and it does not show up in the tools bar .... When I install 1.4.70 then this works fine, any help / idea? Or should I just wait and work with 1.4.70??

Many thanks and best regards, Uwe
HUR450502 is offline   Reply With Quote
Old 08-08-2018, 13:53   #14
Registered User

Join Date: May 2013
Location: NSW, Australia
Boat: Richter 42
Posts: 933
Re: ODraw 1.5 beta

Hi,
If you look in the OpenVPN.log file you should see a message telling you what the problem is. One issue I know of is the version of libc6 you are using. The Ubuntu deb was created on a 18.04 system that uses version 2.27, 17.03 uses version 2.19 which will not work. The solution is to build the plugin on your system and it should work OK.

I have tested the plugin on Ubuntu, windows 10, pi 2B+ and pi 3 (I am currently using it on a pi 3). However, at the moment I cannot create new installables as I don't have access to my build environments. Sorry.

Jon
jongough is offline   Reply With Quote
Old 09-08-2018, 04:22   #15
Registered User

Join Date: Feb 2013
Location: Germany, Bavaria
Boat: Jeanneau Sun Fizz 40'
Posts: 131
Re: ODraw 1.5 beta

Hi Jon,



thanks a lot for your fast reply. As always - I forgot to mention that I was testing under Windows 10 (1803) so I have no idea, what is wrong with which library. Below you find the two log entries - first with 1.4.70 installed and then directly after with 1.5.22 installed.



I checked the directory entries and they look correct to me - I just add the two screenshots here as well.



Does this help in any way??



Thanks again, and all the best,



Uwe


Here the log entries (sorry I am using German language...):


With Plugin version 1.4.70 installed:

12:37:33: PlugInManager: Loading PlugIn: C:\Program Files (x86)\OpenCPN\plugins\nvc_pi.dll
12:37:33: C:\Program Files (x86)\OpenCPN\plugins\nvc_pi.dll
API Version detected: 105
PlugIn Version detected: 104
12:37:33: PlugInManager: Loading PlugIn: C:\Program Files (x86)\OpenCPN\plugins\ocpn_draw_pi.dll
12:37:33: ocpn_draw_pi data location: C:\Program Files (x86)\OpenCPN\plugins\ocpn_draw_pi\data\
12:37:33: C:\Program Files (x86)\OpenCPN\plugins\ocpn_draw_pi.dll
API Version detected: 113
PlugIn Version detected: 104


With Plugin version 1.5.22 installed:


12:48:35: PlugInManager: Loading PlugIn: C:\Program Files (x86)\OpenCPN\plugins\nvc_pi.dll
12:48:35: C:\Program Files (x86)\OpenCPN\plugins\nvc_pi.dll
API Version detected: 105
PlugIn Version detected: 104
12:48:35: PlugInManager: Loading PlugIn: C:\Program Files (x86)\OpenCPN\plugins\ocpn_draw_pi.dll
12:48:35: Fehler: Laden der dynamischen Bibliothek 'C:\Program Files (x86)\OpenCPN\plugins\ocpn_draw_pi.dll' gescheitert (Fehler 126: das angegebene Modul wurde nicht gefunden.)
12:48:35: PlugInManager: Cannot load library: C:\Program Files (x86)\OpenCPN\plugins\ocpn_draw_pi.dll
Attached Thumbnails
Click image for larger version

Name:	OCPN-Draw-1-4-70.JPG
Views:	19
Size:	18.1 KB
ID:	175131   Click image for larger version

Name:	OCPN-Draw-1-5-22.JPG
Views:	14
Size:	19.9 KB
ID:	175132  

__________________

HUR450502 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Beta Test / Technical bdbcat OpenCPN 2203 01-10-2018 15:11
ODraw - 1.3 beta jongough OpenCPN 105 13-06-2017 13:40
ODraw - beta 1.1 jongough OpenCPN 99 06-07-2016 01:20
Beta Marine Diesel michaelmrc Engines and Propulsion Systems 48 23-03-2016 13:44



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

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


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.