Plugin to drive Google Earth (GE).

plugin icon
plugin view

In addition to driving a simulated vessel across the chart of OpenCPN the vessel can be displayed on Google Earth. The plugin controls the GE camera position. The autopilot can be used. A sample GPX is included. This is a route through the new locks at the southern end of the Panama Canal. The default model to drive is a panamax container ship.


Plugin Install

The plugin can be installed by updating the OpenCPN master catalog and using the EarthExplorer_pi entry.

Extra requirements

The Google Chrome Web Server extension is used to serve the KML files used by GE. Chrome is cross-platform and can be used on MacOSX, Linux and Windows.

  • Install Google Chrome (if not already installed)

  • Start Chrome

  • Dowload the webserver extension from here. Add the extension to Chrome.

  • Start the EarthExplorer plugin. Right-Click on the chart and you will find a menu option EarthExplorer Start Position. After selecting this press Start and test driving the ship and using the controls.


On first starting to drive with EarthExplorer the files to link with GE are copied to the GetpPrivateApplicationDataLocation() directory. On Windows this will be similar to C:\ProgramData\opencpn\plugins\EarthExplorer_pi. On Linux it will be like home/.opencpn/plugins/EarthExplorer_pi/data.

If not already installed download and install Google Earth Pro:

Not sure if the version available from Paul Higgins is compatible.

Setting up

Start the Chrome Web Server


After this the Chrome Browser can be shut down. It does not have to be the default browser

The webserver displays with a button to choose the default folder. Select the GetpPrivateApplicationDataLocation() directory mentioned above.


Testing the plugin will have created a placemark.kml file in the GetpPrivateApplicationDataLocation() directory along with the model file container.dae. Another file is also copied there … link.kml. This provides the network link with GE.

Make the OpenCPN connection

Select Options→Connections in OpenCPN. Add Connection. Use TCP Network Address and port 8887.


Start Google Earth

File→Open and select `placemark.kml' from the same folder as you set up in the Chrome webserver. * GE should fly to the location of your vessel. You should see the model in the centre of the GE display. * A place called model will have been added to GE Temporary Places.

File→Open and select link.kml. This will add a place Earth Explorer to Temporary Places. One of the contents of this place is model.


Note Using File→Open may cause Google Earth to freeze. If this happens you may need to open the files by using Windows Explorer. Navigate to the ProgramData/opencpn/plugins/EarthExplorer_pi directory and open the file with GE.


If there have been problems you may be asked to use the GE repair tool.


Select Clear disk cache:


After adding placemark.kml you should see the ship on the GE screen.


And after adding link.kml:


Start driving the vessel in OpenCPN. You should see the model moving across the screen.


If you can still see the model that was dropped when you opened placemark.kml you can de-select and delete that place, as it is no longer needed.


Select the `3D Buildings' layer in GE if you want to see models. For instance these include the bridges at the southern end of the Panama Canal.

Press the plugin Camera if you want to zoom in or pan/tilt the display in GE.

Using OpenCPN Options→Ship the `Ship icon type' can be changed to `real scale vector'. A panamax container ship has length 292m, beam 30m. GPS is approx 270m from the bow and midships.

Closing Google Earth

Important. Do not save the temporary places when you close GE. You need to repeat the startup procedure listed above when you open GE again.

Enjoy your toy

Many bugs remain. Pleae PM me if you see anything that needs fixing.

If you have other GPX files for interesting pilotages or other ship models please PM me.