Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 11-10-2015, 08:14   #1
Registered User

Join Date: May 2012
Posts: 405
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:	133
Size:	273.4 KB
ID:	110772  
Attached Files
File Type: pdf obabel_pi.dll.pdf (105.5 KB, 20 views)
__________________

__________________
Rasbats is offline   Reply With Quote
Old 11-10-2015, 19:30   #2
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,320
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, 04:42   #3
Registered User

Join Date: May 2012
Posts: 405
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, 19:15   #4
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,320
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, 16 views)
__________________
rgleason is offline   Reply With Quote
Old 28-10-2015, 19:51   #5
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,320
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, 05:34   #6
Registered User

Join Date: May 2012
Posts: 405
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, 21:48   #7
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,320
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, 16:26   #8
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,320
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:	88
Size:	165.2 KB
ID:	112125  
Attached Files
File Type: doc Clipboard-GPSBabel.doc (1.9 KB, 7 views)
__________________
rgleason is offline   Reply With Quote
Old 03-11-2015, 01:54   #9
Registered User

Join Date: May 2012
Posts: 405
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, 03:44   #10
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,320
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, 05:31   #11
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,320
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, 05:35   #12
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,320
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, 11:16   #13
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,320
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, 03:10   #14
Registered User

Join Date: May 2012
Posts: 405
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, 09:39   #15
Registered User
 
rgleason's Avatar

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

Great on both counts. Thanks Mike.
__________________

__________________
rgleason is offline   Reply With Quote
Reply

Tags
chartplotter, plug

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



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

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


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.