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 10-02-2019, 07:01   #1
Registered User

Join Date: May 2012
Posts: 1,226
UKTides_pi using the UKHO API

UKHO have published an API which allows the downloading of HW/LW times/heights for up to 7 days in the future. Over 600 UK locations are included.

There are already a number of websites which offer this data but this new plugin keeps everything within OpenCPN, which may help route planning.

At the moment the installer is only for OpenCPN 5.0:

https://github.com/Rasbats/UKTides_pi/releases/tag/v0.1

Get the beta for OpenCPN 5.0 here:
http://www.cruisersforum.com/forums/...ts-213737.html

I found that wxCurl gave problems with HTTP GET and moved to curl/curlcpp. CMakeLists.txt would need editing for Linux work, but this is beyond me!

Although the present plugin duplicates data available elsewhere I hope that any future enhancements of the API will offer more functionality.

Mike
Rasbats is offline   Reply With Quote
Old 10-02-2019, 07:18   #2
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,234
Re: UKTides_pi using the UKHO API

Mike...
What exactly were the problems you saw? The chartdownloader plugin is using HTTP GET to download all the charts and we have never heard about it being problematic. I would definitely prefer all the plugins using the centralised HTTP support provided by the OpenCPN core over million copies of cURL all over the place...

Pavel
nohal is offline   Reply With Quote
Old 10-02-2019, 07:29   #3
Registered User

Join Date: May 2012
Posts: 1,226
Re: UKTides_pi using the UKHO API

Pavel ...

Probably my lack of skill! I will have look at ChartDownloader and see if it helps.

Mike
Rasbats is offline   Reply With Quote
Old 10-02-2019, 09:23   #4
Registered User

Join Date: May 2012
Posts: 1,226
Re: UKTides_pi using the UKHO API

Pavel ...

Reminded myself what the problem was, using ofc_pi as a template.

This is the response from wxCurl:

Code:
<FeatureCollection xmlns:i="http://www.w3.org/2001/XMLSchema-instance"xmlns="http://schemas.datacontract.org/2004/07/GeoJSON.Net.Feature">
<BoundingBoxes xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/GeoJSON.Net" />
<CRS i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/GeoJSON.Net" />
</FeatureCollection>
This is the same response that comes from FireFox. But ... MS Internet Explorer does retrieve the file of tidal stations! For this reason I left wxCurl and went straight to curl/curlcpp. Could the way that the API/UKHO server is setup be the cause of this?

Simple json comes through but not when it includes a FeatureCollection.

Mike
Rasbats is offline   Reply With Quote
Old 10-02-2019, 13:38   #5
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,234
Re: UKTides_pi using the UKHO API

Mike...

This is obviously not JSON but XML, so I would kind of suspect a misconfiguration on the server side here if JSON was the actual expected answer... May I ask for the URL you are querying?

Pavel
nohal is offline   Reply With Quote
Old 11-02-2019, 08:05   #6
Registered User

Join Date: May 2012
Posts: 1,226
Re: UKTides_pi using the UKHO API

Pavel ...

I have sent you a PM.

Mike
Rasbats is offline   Reply With Quote
Old 11-02-2019, 08:08   #7
Registered User
 
Schnapsy's Avatar

Join Date: Jan 2018
Location: Dunkirk, France
Boat: ETAP 30i
Posts: 251
Images: 3
Re: UKTides_pi using the UKHO API

Hello,

I recently installed the version 4.99.1408 in parallel with version 4.88.

I then installed your UKtides plugin specifying the installation path.

However the plugin did not install naturally but created a new OpenCPN folder in which is just this plugin.
So I copied / pasted the plugin data into the original plugins folder and it works fine, thanks ...

This detail should be made clear to everyone who installed OCN 4.99 in parallel with the 4.88 version.
Attached Thumbnails
Click image for larger version

Name:	OCN4.99.jpg
Views:	81
Size:	149.3 KB
ID:	185665  
Schnapsy is offline   Reply With Quote
Old 11-02-2019, 09:05   #8
Registered User

Join Date: May 2012
Posts: 1,226
Re: UKTides_pi using the UKHO API

Thanks Schnapsy.

Yes, the installer adds "OpenCPN" onto the file path when you use the browse option. I normally use the spacebar to add a space after the basic version, which gives me a list of the OpenCPN versions that are installed. Install works correctly after that. No OpenCPN is then added after the root folder.

I think you would find the same problem with other plugins when doing a parallel installation. Logbookkonni had the same problem for me when tested.

Not sure if the installer could be adjusted for this but I will try and include a note in the manual for my plugins.


Mike
Rasbats is offline   Reply With Quote
Old 11-02-2019, 09:42   #9
bcn
Registered User

Join Date: May 2011
Location: underway whenever possible
Boat: Rangeboat 39
Posts: 4,806
Re: UKTides_pi using the UKHO API

In the case of a parallel install under Windows one has always to select the target version.
By default the programs\opencpn directory will be used.
If you have only one version it will live in this directory (if one does not force a different name).

And the way to place the cursor in the selector dropdown list when asked for the install directory and adding "space" will show all parallel installs. Works for almost(?) all plug-ins under Windows.
bcn is offline   Reply With Quote
Old 12-02-2019, 09:56   #10
Registered User

Join Date: May 2012
Posts: 1,226
Re: UKTides_pi using the UKHO API

Version 0.2 now uses OpenCPN base code for curl, via the API.
TODO: Compile with Linux.

Mike
Rasbats is offline   Reply With Quote
Old 27-12-2022, 07:37   #11
Registered User

Join Date: May 2012
Posts: 1,226
Re: UKTides_pi using the UKHO API

v2.3 for use with OpenCPN 5.7.1-beta/5.8 is now in the master catalog.

Any problems please post here.

Mike
Rasbats is offline   Reply With Quote
Old 27-12-2022, 15:16   #12
Registered User
 
Gilletarom's Avatar

Join Date: Mar 2010
Location: France
Boat: 10.50 mètres
Posts: 3,021
Re: UKTides_pi using the UKHO API

Quote:
Originally Posted by Rasbats View Post
v2.3 for use with OpenCPN 5.7.1-beta/5.8 is now in the master catalog.

Any problems please post here.

Mike
Hello Mike,

Satisfactory test for UKTide. A few items to add to the language file. See on the screenshot.
Attached Thumbnails
Click image for larger version

Name:	2022-12-28 00_12_33-OpenCPN 5.7.1+a066278.jpg
Views:	42
Size:	24.0 KB
ID:	269233  
Gilletarom is offline   Reply With Quote
Reply


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
2016 Edition UKHO For Navigation Charts (Windows) Ribbit OpenCPN 1 09-02-2016 04:53
Technical: API to query heading(s)? bushtor OpenCPN 4 03-06-2013 07:38
Plugin api coding rooiedirk OpenCPN 6 03-04-2013 08:49
UKHO's Total Tides Software Chantal Navigation 11 30-10-2011 11:15

Advertise Here


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


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.