Cruisers Forum
 


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 27-02-2011, 08:00   #1
Marine Service Provider

Join Date: Feb 2010
Posts: 279
Google Earth Plugin

I have for the last few weeks been researching a OpenCPN Google Earth Plugin. Earth plugins are already available for Oziexplorer and Fugawi and are offered a free addon as as experiment only. The Fugawi plugin 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 software engineer. My background is in software documentation so I hope someone will take this forward and i can document as text and online help

refs GoogleEarthAirlines - web plugin for GoogleEarth

VB and C++ GE Plugin



Delphi GE Plugin


I am away for 2 weeks from 1st march with limited email access only

regards

Richard Fairman
r.fairman is offline   Reply With Quote
Old 27-02-2011, 08:41   #2
Registered User
 
sinbad7's Avatar

Join Date: Sep 2003
Location: Ubatuba,SP,Brazil (Ex Norway)
Boat: (Ex) Alu. 60' yacht-"Eight Bells"
Posts: 2,731
Images: 57
Send a message via Skype™ to sinbad7
Re: Google Earth Plugin

r.fairman..

Perhaps you did'nt see the thread I started earlier titled: OpenCPN / Google Earth Combination

I have Fugawi Marine ENC 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
Attached Thumbnails
Click image for larger version

Name:	Screenshot_02 Feb. 27 13.44.jpg
Views:	1410
Size:	283.1 KB
ID:	24270  
__________________
"And all I ask is a tall ship and a star to steer her by."
sinbad7 is offline   Reply With Quote
Old 27-02-2011, 09:35   #3
Registered User
 
sinbad7's Avatar

Join Date: Sep 2003
Location: Ubatuba,SP,Brazil (Ex Norway)
Boat: (Ex) Alu. 60' yacht-"Eight Bells"
Posts: 2,731
Images: 57
Send a message via Skype™ to sinbad7
Re: Google Earth Plugin

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
Attached Thumbnails
Click image for larger version

Name:	Screenshot_03 Feb. 27 13.55.jpg
Views:	1021
Size:	345.0 KB
ID:	24272  
__________________
"And all I ask is a tall ship and a star to steer her by."
sinbad7 is offline   Reply With Quote
Old 27-02-2011, 16:47   #4
Registered User

Join Date: Feb 2011
Location: Virginia
Boat: Shopping for a 30-ish cat
Posts: 418
Re: Google Earth Plugin

This capability interests me as well. Would it be possible to put a KML link as an overlay in OpenCPN?
prof_mariner is offline   Reply With Quote
Old 08-03-2011, 19:56   #5
Registered User
 
manimaul's Avatar

Join Date: Feb 2008
Location: Seattle, WA
Posts: 416
Re: Google Earth Plugin

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

Will
__________________
Marine Navigation for Android:
https://mxmariner.com
manimaul is offline   Reply With Quote
Old 09-03-2011, 05:21   #6
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,208
Re: Google Earth Plugin

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.

Pavel
Attached Thumbnails
Click image for larger version

Name:	GEPlugin.jpg
Views:	1139
Size:	307.8 KB
ID:	24840  
nohal is offline   Reply With Quote
Old 09-03-2011, 10:29   #7
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,401
Re: Google Earth Plugin

Pavel....


Nice work so far.

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.

Thanks so far
Dave
bdbcat is online now   Reply With Quote
Old 09-03-2011, 11:13   #8
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,208
Re: Google Earth Plugin

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.

Cheers

Pavel
nohal is offline   Reply With Quote
Old 10-03-2011, 11:13   #9
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,208
Re: Google Earth Plugin

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...

Pavel
Attached Thumbnails
Click image for larger version

Name:	GEPlugin.jpg
Views:	1133
Size:	438.0 KB
ID:	24889  
nohal is offline   Reply With Quote
Old 10-03-2011, 11:23   #10
Registered User
 
idpnd's Avatar

Join Date: Sep 2007
Location: Almería, ES
Boat: Chiquita 46 - Libertalia
Posts: 1,558
Re: Google Earth Plugin

Google are still "working on" GE API support under linux..

http://code.google.com/p/earth-api-s.../detail?id=117
__________________
sv Libertalia
idpnd is offline   Reply With Quote
Old 10-03-2011, 11:43   #11
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,208
Re: Google Earth Plugin

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.

Pavel
nohal is offline   Reply With Quote
Old 10-03-2011, 11:53   #12
Registered User
 
idpnd's Avatar

Join Date: Sep 2007
Location: Almería, ES
Boat: Chiquita 46 - Libertalia
Posts: 1,558
Re: Google Earth Plugin

Thanks for the info Pavel! I suppose the matrix mariner gps splitter will have to do for us linux types
__________________
sv Libertalia
idpnd is offline   Reply With Quote
Old 11-03-2011, 08:00   #13
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,208
Re: Google Earth Plugin

Adventurers,
following the first OpenCPN 2.4 beta release, the Google Earth plugin, version 0.1 is ready for testing as well.

It does NOT and will not work with OpenCPN 2.3.1 as it relies on the API extensions introduced in version 2.4

Before you use it:
  • Make sure you are using Microsoft Windows. Sorry, there is no chance to get this running on any normal operating system
  • Download OpenCPN, version 2.4.0310 beta from Download OpenCPN | Official OpenCPN Homepage and install it
  • 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.

Good luck

Pavel
Attached Thumbnails
Click image for larger version

Name:	ge_plugin.jpg
Views:	1245
Size:	431.1 KB
ID:	24913  
Attached Files
File Type: doc gecomapi_pi.doc (73.5 KB, 1222 views)
nohal is offline   Reply With Quote
Old 11-03-2011, 12:09   #14
Registered User
 
sinbad7's Avatar

Join Date: Sep 2003
Location: Ubatuba,SP,Brazil (Ex Norway)
Boat: (Ex) Alu. 60' yacht-"Eight Bells"
Posts: 2,731
Images: 57
Send a message via Skype™ to sinbad7
Re: Google Earth Plugin

Pavel..

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
Attached Thumbnails
Click image for larger version

Name:	Screenshot_01 Mar. 11 16.58.jpg
Views:	882
Size:	265.8 KB
ID:	24931  
__________________
"And all I ask is a tall ship and a star to steer her by."
sinbad7 is offline   Reply With Quote
Old 11-03-2011, 14:35   #15
Registered User
 
sinbad7's Avatar

Join Date: Sep 2003
Location: Ubatuba,SP,Brazil (Ex Norway)
Boat: (Ex) Alu. 60' yacht-"Eight Bells"
Posts: 2,731
Images: 57
Send a message via Skype™ to sinbad7
Re: Google Earth Plugin

Pavel..

Wish list # 4. Could you make the mouse wheel zoom active also in GE?

I would prefer,as a default, that the GE Plug-in was disabled upon closing OpenCPN.

Great job....

Tore
__________________
"And all I ask is a tall ship and a star to steer her by."
sinbad7 is offline   Reply With Quote
Reply

Tags
google earth


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
Google Earth ? phiggins Navigation 53 31-03-2012 20:39
Editing in Google Earth sinbad7 OpenCPN 5 16-02-2011 15:10
Google Earth beau Navigation 1 24-07-2010 02:10
Turkey Blocks Google Earth & Google Maps MarkJ Europe & Mediterranean 7 04-07-2010 12:30

Advertise Here


All times are GMT -7. The time now is 07:15.


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.