I have for the last few weeks been researching a OpenCPNGoogle EarthPlugin. Earth plugins are already available for Oziexplorer and Fugawi and are offered a free addon as as experiment only. The Fugawiplugin opens the GE render window in Fugawi window with GE still running as a process. GPS positions are duplicated in the GE window as well as the chart window. and any change of view in the the Fugawi window is duplicated in the GE window. Routes do not display inthe GE window but can be imported by exporing from Fugawi and importing into GE. A GE window can be captured and georeferenced for display in the chart window as can a chart from the Fugawi window to the GE window.
GE has a had a COM API for some years but it is no longer supported by Google but still works with GE 6. Google seems to be moving awy from the desktop to the Google Earth Plugin for web browers which is fine for online use but as it has no cache is useless for navigation away from an internest connection.
Luicci at GoogleEarthAilines has developed an ActiveX conttrol that will display the GE desktop render window in a form in VB and Delphi and i have used in in a C++ form. I believe the ActiveX code is GNU licensed
As a first stab at a GE plugin for OpenCPN we need
A button the open GE in a window overlaying the OpenCPN screen.
OpenCPN needs to output the gps position as a KML file networked linked to the GE window
OpenCPN need to output routes wayponts eTC to an KML file to be read by GE and diaplyed in the GE window Open CPN needs to output any change in screen view such as zoom etc as a kml file to GE so the change the GE view
OpenCPN need to be able to screen capture the current chart view and overlay it as an image in GE and adjust its transparency
Opencpn needs to be able to screen capture the current GE view, georeference it and diplay it in the chart view
Both the last two points are possible using GE2Kap
As for legals, Goole say they are happy for the Google Earth Plugin to be used in a web page under certain conditions. As for using the Com Api and embedding the Google render window in an application Google has already supplied the tools to do this so..
I am no softwareengineer. My background is in softwaredocumentation so I hope someone will take this forward and i can document as text and online help
Perhaps you did'nt see the thread I started earlier titled: OpenCPN / Google Earth Combination
I have Fugawi MarineENC with the GE plugin and hope someone with programing experience and the time will also make a plugin for OpenCPN one day.
In the meantime,use my suggestion,which easily brings up any GE display from geo locs picked out from OpenCPN's CM93 maps by just placing a waypoint and copying it's geo locs to KLM Writer. You end up with a split screen with GE in one and OpenCPN in the other. Not automatic,but easy to jump between the two screens and adjust zoom factors etc.
Tore
__________________ "And all I ask is a tall ship and a star to steer her by."
Here is another combination from Sopers Hole, Tortola where the CM93 chart is North up and GE through the KML inteface is showing the view to the East with a 45 degree viewing angle.
Tore
__________________ "And all I ask is a tall ship and a star to steer her by."
I've considered making this into a OpenCPN plugin. But for now it is not since I have other development projects I'm currently working on ... Matrix Mariner GPS
Hi GE lovers,
wanted to try whether COM still sucks as hard as it did last time I had to work with it.
It does
But on a positive note, I have a working GE 5.2 in an OpenCPN plugin window following the cursor on the map using the legacy COM API (Google Earth COM API Documentation), which is if I understood the discussions correctly the way to make GE cache the data locally.
What has to be done to make this toy worth trying for anybody:
- Make it follow the boat and not the cursor (have to have a look how to get it from the NMEA stream or extend the plugin API to send an event when the boat moves, like it does for cursor)
- Make it adjust the ge view to the zoom of the chart (GE doesn't know anything like scale, just the height of the camera over the focus point, I still don't know if I can get the scale from OpenCPN)
- Use AUI so that the window can be docked (done in dashboard, hope easy to copy)
Have to say it was the most annoying thing I was researching in the past year at least...
As I already put the effort to make it possible, I will try to finish the above points, but if there's anybody who wants to take it over, I will gladly get rid of this "pet"
Source not yet available, will post it on github as soon as it's not as broken as it is now.
Good news:
The OCPN 2.4 PlugIn API has been extended to support Pluggable chart types. This came about as a part of the BSB4 PlugIn. So, the ViewPort and scale information that you need in the GE PlugIn is now (or soon) available at the API.
There are also interfaces to ask the PlugIn to render a "chart" at a specific scale and geolocation on the screen. Sounds like just what you need.
So, don't invent any new API just yet. The 2.4 API will appear very soon now.
This actually becomes a good test of the 2.4 API. Is it rich enough to build a PlugIn for arbitrary "chart" images? If not, now is a good time to extend it as necessary.
For instance, maybe we need split screen or transparency options. All ideas considered.
Dave,
welcome back, hope you enjoyed the vacation
I was expecting something like that while reading the BSB4 post and am busy trying to understand the AUI stuff anyway, so no problem waiting a couple of days for the extended API.
We have some nice progress here...
Dave, the API extensions in the upcoming 2.4 beta are exactly what was needed
There are still quite a few glitches I have to figure out, but the GE plugin is able to start and follow the chart view if the user is not very evil at it...
idpnd,
I really don't believe that they will ever do it as even on windows the COM API is now obsolete and Google pushes the new JavaScript browser API as a way to go.
While it's not a bad idea and it meets their ChromeOS plans to conquer the world, it is useless for us as we need the data available offline and there's no cache in the browser plug-in.
If there will ever be anything that works under Linux, it will be the new version.
As far as Google Earth is concerned, I'm currently running it with the version identifying itself as 6.0.1.2032 (beta), but older ones should probably work as well.
To make the view sizing work reasonably, run Google Earth and turn of the toolbar and the sidebar in the View menu or Ctrl + Alt + T and Ctrl + Alt + B respectively
Download the attached file gecomapi_pi.doc, change the extension to .dll and place it into the plugin directory in your OpenCPN installation. If there is anyone who has any word in how this forum is running, I second Dave's note in the BSB4 thread - the file extension restrictions help very little to increase security but a lot to drive people crazy
Run OpenCPN, go to Toolbox and enable the GE plugin on the Plugins tab
After a short while the plugin icon will appear on your toolbar - be a bit patient as GE has to be started and it takes time.
Torture it according to your liking
Don't forget to report back the results
Plugin preferences:
The plugin can work in three modes of operation Follow chart viewport - in this mode the plugin tries to display the same stuff you can see on the chart. The calculation used is very basic though - the height of the camera above ground is computed as half the width of the chart viewport, assuming that one minute longitude = 1852 meters. (Thank you Mr. Pythagoras) No it is not exact and no, it is not easy to make it much better because there is no Mr. Mercator in GE...
Follow boat - Should follow the boat (untested as I'm sitting at the table and no events coming from the core)
Follow cursor - Follows your cursor on the chart
For the later two modes you can set GE view manually using the 3 sliders in the lower part of the settings dialog
The build works for me locally, but it does not mean it has to work for you. If it does not, let me know.
If you experience any problems (especially crashes of the whole OpenCPN), please try to check whether they happen also without the plugin so that we can distinguish the source of the problems better.
For those interested, the source is available at https://github.com/nohal/OpenCPN/tree/gecomapi
By the way, it is the smallest and simplest plugin we currently have, so if you want a kickstart on plugin development, this is the smallest amount of code to study.
Works great on my Vista system but I have a couple of suggestions:
1.Do not start the GE as a default when loading up OpenCPN,or let OpenCPN start first.
2.Could you start the GE screen as 50% as a default,filling ALL the screen.
(There is a blank area at the bottom presently.)
Any further personal adjustment choices could then be done later.
3. Any possibility to also display all AIS and own ship in the GE screen?
For that matter,duplicate all routes,sea marks,etc. etc.
Great beginning,GRATULATIONS!
Tore
__________________ "And all I ask is a tall ship and a star to steer her by."