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 11-10-2015, 07:14   #1
Registered User

Join Date: May 2012
Posts: 1,199
oBabel plugin - Exporting KML/GPX to Chartplotters

There remains the problem of exporting GPX waypoints and routes to my Garmin GPSMAP 4010 chartplotter directly from OpenCPN. The main program code is pretty complicated and I was unable to modify this.

Taking another path I played with GPSBabel and the many options available. This program can be run from a command line.

The oBabel plugin is a front end for the GPSBabel executable - gpsbabel.exe.

To use the plugin you need to have installed GPSBabel on your pc. Using the plugin for the first time you have to locate the program .exe.

There are two main sources for exporting to the chartplotter: KML from OpenCPN (right-click on a waypoint or route), or a GPX created by OpenCPN or another program.

Using KML a right-click on the clipboard of the plugin will transfer that data to the clipboard, which can then be sent to the plotter.

The route produced from KML will be named after the waypoints in the KML.

Choosing oGPX displays a file dialog for choosing the GPX you have exported from OpenCPN. The route name is the same as the one made in route properties in OpenCPN.

The Windows compiled plugin oBabel_pi.dll is attached. This works with both O3.2.2 and O4.0.0 (Win). The plotter needs to be connected before OpenCPN is started, so that the comport is detected. If using Windows 8.1 some Prolific USB/Serial converters will not work (Mine!).

Source code is here: https://github.com/Rasbats/oBabel

I tried to make a standalone installer for the plugin without success. Help is needed! And also for Linux compilations. Not sure if the comport will be detected with Linux.

Only tested with Windows and the Garmin GPSMAP 4010. It would be easy to add other makes of plotter. Users of the GPSBabel program alongside OpenCPN could assist by describing the options needed.

This plugin was made to avoid the need to leave OpenCPN and use another transfer program, like EasyGPS.

I have tried to remove redundant code from other work but some may remain. Help in de-cluttering would be appreciated.
Attached Thumbnails
Click image for larger version

Name:	oBabel.jpg
Views:	302
Size:	273.4 KB
ID:	110772  
Attached Files
File Type: pdf obabel_pi.dll.pdf (105.5 KB, 78 views)
Rasbats is offline   Reply With Quote
Old 11-10-2015, 18:30   #2
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,627
Images: 2
Re: oBabel plugin - Exporting KML/GPX to Chartplotters

Very nice Mike. I'll give it a try. I found myself thinking of Pavel's Launcher program but it appears you've made it quite simple to do. Thanks
rgleason is offline   Reply With Quote
Old 15-10-2015, 03:42   #3
Registered User

Join Date: May 2012
Posts: 1,199
Re: oBabel plugin - Exporting KML/GPX to Chartplotters

Tested with another USB-Serial converter - the Startech.com ICUSB2321F.

On Win 8.1 and O 4.0.0 oBabel works fine with this cable.

Mike
Rasbats is offline   Reply With Quote
Old 28-10-2015, 18:15   #4
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,627
Images: 2
Re: oBabel plugin - Exporting KML/GPX to Chartplotters

Mike, what am I missing here?
I get three errors, have tried it standalone and tried to compile it under opencpn.
got similar errors.
Attached Files
File Type: doc oBabel-error.doc (1,021 Bytes, 66 views)
rgleason is offline   Reply With Quote
Old 28-10-2015, 18:51   #5
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,627
Images: 2
Re: oBabel plugin - Exporting KML/GPX to Chartplotters

I also have tried DR_pi and would like to compile that.
However it seems like a plugin compiled with O v4.1.1022 now needs a cmake_install.make file. So it appears it would not compile with v4.1.1022 at the moment.

If I try to compile standalone

C:\Users\Rick\Documents\GitHub\o-plugin\mr-DR_pi\build>cmake --build . --config release
Microsoft (R) Build Engine version 12.0.31101.0
[Microsoft .NET Framework, version 4.0.30319.34209]
Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB1009: Project file does not exist.
Switch: ALL_BUILD.vcxproj

Thanks Mike.
rgleason is offline   Reply With Quote
Old 29-10-2015, 04:34   #6
Registered User

Join Date: May 2012
Posts: 1,199
Re: oBabel plugin - Exporting KML/GPX to Chartplotters

Rick ...

Thanks for looking at this one.

Using the work that Pavel did for otcurrent_pi as a template I have updated GitHub. Fixed a couple of problems. Using the solution file created I can make the dll.

It will not build the package successfully as it builds a multibyte character version, not unicode. How do you make the package use the unicode character set and the appropriate wxwidgets 2.8U dlls?

DR_pi was a long time ago and I have not tried to build this on OpenCPN 4.1. I will give it a go.

Mike
Rasbats is offline   Reply With Quote
Old 30-10-2015, 20:48   #7
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,627
Images: 2
Re: oBabel plugin - Exporting KML/GPX to Chartplotters

Dear Mike,

I have update with git, and then managed to cmake successfully and then actually was able to run the cpack packager. This was all using wxWidgets 3.0.2 , I found that compilation with both wxWidget 2.8 and 3.0.2 is almost an impossibility, because MSVS and maybe cmake always gets messed up with pathnames, even if you jut have the wxWidgets environment paths that you want in there!

It seems to me that we had to very specifically select the NSIS package that does UNICODE,... would that be the problem? Maybe a quick read of the Opencpn developer manual under NSIS might confirm that is the problem?

Compiling - Windows | Official OpenCPN Homepage
'This means if you also want to use the ANSI NSIS version you first have to change the value of "HKEY_LOCAL_MACHINE\SOFTWARE\NSIS" registry key according to the installation path of the respective version you want to use.'

Maybe this is the issue?

I have not tried installing it yet. --It is getting late. Nite.

Great work! Thanks.
rgleason is offline   Reply With Quote
Old 02-11-2015, 15:26   #8
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,627
Images: 2
Re: oBabel plugin - Exporting KML/GPX to Chartplotters

This plugin by Mike Rasbats is intended to help ease conversion of waypoints and routes to other devices.

Installed oBabel Opencpn Beta File Thingie rguser rgpass
and GPS Babel GPSBabel: convert, upload, download data from GPS and Map programs
1. oBabel, entered path to gpsbabel.exe
2. oBabel, selected nmea checked waypoints and route
3. OpenCPN, right clicked on a route and picked Copy to KML, selected Standard KML.
4. Pasted the KML into the oBabel clipboard.
5. Hit Clipboard > GPSBabel.
6. A window popped up with the obscure temporary path to a new file.
similar to C:\Users\Rick\AppData\Local\Temp
7. Used Notebook++ to open it. It was kml code from clipboard.

I think this is working but I have not got conversions working and have not played with it enough. I am sure Mike will have some pointers for process. I hope someone willl work with this a little to advise Mike, I don't believe I will be able to work on it for a week.

See attached please.
Attached Thumbnails
Click image for larger version

Name:	oBabel-Clipboard-to-GPSbabel.png
Views:	258
Size:	165.2 KB
ID:	112125  
Attached Files
File Type: doc Clipboard-GPSBabel.doc (1.9 KB, 69 views)
rgleason is offline   Reply With Quote
Old 03-11-2015, 00:54   #9
Registered User

Join Date: May 2012
Posts: 1,199
Re: oBabel plugin - Exporting KML/GPX to Chartplotters

We need someone else with a NMEA 0183 connection from OpenCPN to their chartplotter to test this.

The info on the screenshot is the text that starts and uses GPSBabel in command-line mode.

Mike
Rasbats is offline   Reply With Quote
Old 03-11-2015, 02:44   #10
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,627
Images: 2
Re: oBabel plugin - Exporting KML/GPX to Chartplotters

Perhaps later this winter I should get a boxed B&G running and try it, along with the radar (really should do it) but it would so much better if someone with things already setup gave this a good test now! Thanks.
rgleason is offline   Reply With Quote
Old 03-11-2015, 04:31   #11
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,627
Images: 2
Re: oBabel plugin - Exporting KML/GPX to Chartplotters

Mike I added oBabel to the Tracker projects under plugins.
Do you want to be the admin?
rgleason is offline   Reply With Quote
Old 03-11-2015, 04:35   #12
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,627
Images: 2
Re: oBabel plugin - Exporting KML/GPX to Chartplotters

Can someone compile this plugin as standalone for version 4.0? It should work. I don't have that setup.
rgleason is offline   Reply With Quote
Old 06-11-2015, 10:16   #13
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,627
Images: 2
Re: oBabel plugin - Exporting KML/GPX to Chartplotters

I just thought of something. Can I compile using opencpn.lib from v4.0 or v3.2 yet using vs2013 and wxWidgets 3.0.2 and will the result run under opencpn 4.0? -- nope probably not. I would have to load and configure wxWigets 2.8 wouldn't I?
rgleason is offline   Reply With Quote
Old 07-11-2015, 02:10   #14
Registered User

Join Date: May 2012
Posts: 1,199
Re: oBabel plugin - Exporting KML/GPX to Chartplotters

I will take Admin for oBabel.

Intend compiling for O 4.0 in the next day or two.

Mike
Rasbats is offline   Reply With Quote
Old 07-11-2015, 08:39   #15
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,627
Images: 2
Re: oBabel plugin - Exporting KML/GPX to Chartplotters

Great on both counts. Thanks Mike.
rgleason is offline   Reply With Quote
Reply

Tags
chartplotter, 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
DR Plugin - splitting up GPX route files Rasbats OpenCPN 30 09-02-2019 11:42
KML Overlay Plugin SethDart OpenCPN 151 08-02-2015 06:55
OpenCPN / export KML COOGOR OpenCPN 4 25-09-2014 05:59
Rookie questions - boundary circles; exporting options; GPX files fredgmeyer OpenCPN 5 23-05-2014 22:22
KML 2.2 super-overlays (pyramidical overlays) Rasbats OpenCPN 0 07-08-2012 11:07

Advertise Here


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


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.