Cruisers & Sailing Forums (http://www.cruisersforum.com/forums/)
-   OpenCPN (http://www.cruisersforum.com/forums/f134/)
-   -   Can I integrate openCPN to my own software (http://www.cruisersforum.com/forums/f134/can-i-integrate-opencpn-to-my-own-software-155643.html)

logicgate 02-11-2015 19:47

Can I integrate openCPN to my own software
 
I wish to know does openCPN provide API to allow 3rd party application to use the data?

Basically I have a Google map application, and I want to display the weather data in overlays, such as tidal, sea level, pressure, etc. I read the developer manual but still don't know whether I can do this with openCPN.

Anybody can advise me? Thanks in advance.
Steven

transmitterdan 02-11-2015 20:04

Re: Can I integrate openCPN to my own software
 
There is a plug-in API where OpenCPN will run your code. Start to learn about how to build OpenCPN here: Developer Manual | Official OpenCPN Homepage

Then read about the plug-in interface here: PlugIn API | Official OpenCPN Homepage

logicgate 02-11-2015 20:20

Re: Can I integrate openCPN to my own software
 
Thanks. But my intention is not let OpenCPN run my code, i want my software can use the OpenCPN data. I am looking for something like Weather API, openweathermap does not provide tidal data but I need the tidal data. So i want to know whether OpenCPN provide API or some kind of web services so my software can use it.

Steven

Quote:

Originally Posted by transmitterdan (Post 1952499)
There is a plug-in API where OpenCPN will run your code. Start to learn about how to build OpenCPN here: Developer Manual | Official OpenCPN Homepage

Then read about the plug-in interface here: PlugIn API | Official OpenCPN Homepage


nohal 02-11-2015 22:07

Re: Can I integrate openCPN to my own software
 
Quote:

Originally Posted by logicgate (Post 1952507)
Thanks. But my intention is not let OpenCPN run my code, i want my software can use the OpenCPN data. I am looking for something like Weather API, openweathermap does not provide tidal data but I need the tidal data. So i want to know whether OpenCPN provide API or some kind of web services so my software can use it.

Steven

Steven...
No, OpenCPN is a desktop application, it provides no webservices and it has no headless mode with an API.

Pavel

Yens 03-11-2015 00:49

Re: Can I integrate openCPN to my own software
 
If it's just tidal times and height predictions for ports, you will find the code for that in OpenCPN and other projects.

If you want to predict tidal currents, you will need to look at the MyOcean IBI model.


Quote:

Originally Posted by logicgate (Post 1952507)
Thanks. But my intention is not let OpenCPN run my code, i want my software can use the OpenCPN data. I am looking for something like Weather API, openweathermap does not provide tidal data but I need the tidal data. So i want to know whether OpenCPN provide API or some kind of web services so my software can use it.

Steven


logicgate 03-11-2015 05:48

Re: Can I integrate openCPN to my own software
 
thanks Nohal and Yens, I will check MyOcean IBI model.

transmitterdan 03-11-2015 06:09

Re: Can I integrate openCPN to my own software
 
Would it be a difficult task to create a plugin that via IP connection exposed the "data" that is available to all plugins? The so-called IP plugin could listen on a range of ports for a connection. When the connection is made then the plugin could pass requests that come in via IP back and forth via the existing plugin interface.

This might be interesting for various reasons. Not least of which is improving stability of the core. If such an interface could be efficiently implemented it would mean that OpenCPN could never be crashed by a plugin using the IP plugin interface. Maybe most plugins could use this mechanism and O could get away from having so many DLLs or .so plugins hanging off the core.

Yens 03-11-2015 19:43

Re: Can I integrate openCPN to my own software
 
Quote:

Originally Posted by transmitterdan (Post 1952733)
OpenCPN could never be crashed by a plugin using the IP plugin interface

Hahaha... I've seen servers crashing from a single malformed packet.


All times are GMT -7. The time now is 17:13.

Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2020, vBulletin Solutions, Inc.


ShowCase vBulletin Plugins by Drive Thru Online, Inc.