The Navigatrix has been updated. The new website can be found at navigatrix.net.




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: [solved] Change / replace tide files

Joined: 29 Jul 2011, 16:32
Posts: 50
Hello all,
How can I replace, change the tide files (harmonic and harmonic.idx) located in tcdata on OpenCPN.
In Windows, it is easy to find this directory, but in Ubuntu and Navigatrix...

Fair winds,
Philippe from France


Top
   
 
 Post subject: Re: Change / replace tide files

Joined: 04 Nov 2010, 20:51
Posts: 1062
If you read /usr/share/opencpn/tcdata/README.harmonics


It says:
Code:
The tide and current harmonic data contained herein are derived from the corresponding XTIDE harmonic data.
The file data have been tweaked to work nicely in the US, especially fixing current direction reporting.
We have also added additional global tide stations, and corrected calculation/display units where sensible.
A generic XTIDE harmonic file set will be functional, but less useful than the harmonic data packaged with OpenCPN.


Opencpn puts the harmonic data here:
Code:
/usr/share/opencpn/tcdata/HARMONIC
/usr/share/opencpn/tcdata/HARMONIC.IDX


I believe they are referring to "generic" as "free" and the "tweaked" as "nonfree" in the xtide field...but that is just a guess because I don't know what they did to the datasets

They are located:

Code:
/usr/share/xtide/harmonics-dwf-20100529-free.tcd
/usr/share/xtide/harmonics-dwf-20100529-nonfree.tcd
/usr/share/xtide/harmonics-dwf-20101230-free.tcd
/usr/share/xtide/harmonics-dwf-20101230-nonfree.tcd
/usr/share/xtide/harmonics-initial.tcd


I think the windows Opencpn harmoics and the linux Opencpn harmonics are the same.

I also think the xtide "non-free" is also the same as the opencpn data, allbeit with some feet changed to meters and/or some duplicate data removed......I'll run a differential later to compare if curiosity gets the better of me.

You can find files by searching the database. First make sure the database is current (sudo updatedb); then search for whatever (locatewhatever)

Knock yourself out.


Top
   
 
 Post subject: Re: Change / replace tide files

Joined: 04 Nov 2010, 20:51
Posts: 1062
Phil,

I was taking a quick look at the tidal harmonic files that are available...for the most part because they sorta suck for tidal prediction in the South Pacific.

I don't think you're going to find much better (if you do, tell me).

I'm going some 'quiet time' to have an un-interrupted look at the database and compare it to real world observations and official predictions....but in the meantime I don't think weget much better than http://www.flaterco.com/xtide/; which is used in (at least 2) of the tide calculators in Navigatrix (3 if you count Opencpn).

...and it appears that most everyone in the non-proprietary market use this dataset.


Top
   
 
 Post subject: Re: Change / replace tide files

Joined: 29 Jul 2011, 16:32
Posts: 50
Hello Moe,
Thanks for those information.
In /usr/share/ there is NO "opencpn" directory but there is an "xtide" directory...
In my OpenCPN Windows 7 version, I use Harmonic files, not xtide. How can I use harmonic files? Should I install some packet?
Thanks,
Phil
Edit :
Hum...
I've found opencpn directory and "harmonic" files. But I'm not sure Opencpn use it.


Top
   
 
 Post subject: Re: Change / replace tide files

Joined: 04 Nov 2010, 20:51
Posts: 1062
Phil, sorry for the confusion about the location. Opencpn tide harmonics are in fact located at /usr/local/share/opencpn/tcdata.

When I said opencpn uses the same data as xtide. It's not the same file, but the names and numbers in those files.

...and this isn't 100% correct either. They are divergent data sets with additions, deletions, modifications. It is much like English (or any other language). British english, American english, Australian english are different and yet the same.

Go to /usr/local/share/opencpn/tcdata and look at the files with a regular text editor (gedit or leafpad). It's a strange combination of fascinatingly interesting and frightfully dull.

/usr/local/share/opencpn/tcdata/harmonic.idx:
Code:
# Note: This file is automatically generated by Tide2idx version 2.1 (2002-02-06)
# and distributed as part of the free WXTide32 program located at http://WXTide32.com
# Please do not modify this file unless you know EXACTLY what you're doing!


Opencpn gets its data set from WXTide32. WXTide gets its dataset from XTide.

You can also see the changes that have been made to the data over time.

I don't have a copy of OpenCPN Windows version, but Navigatrix does have the Windows version of WXTide32 (/home/$USER/.wine/drive_c/Program Files/WXTide32)

....it's the same stuff (but maybe with an accent.)

Is there some problem that you are having...or are you just curious?

I stuck on a sample for those who are curious, but not so curious to open a file.
Code:
# 2000-07-26 (dave)
#   Changed all Nunavut sites to time zone :America/Iqaluit.
#   (Sites marked Nunavut/NWT were not changed.)
#   Changed name of 'Frobisher' to 'Iqaluit.'
#
# 2000-06-23 (dave)
#   Deleted one of the White Rock, British Columbia sets which was
#   clearly bogus, and reported as such by Baden Kudrenecky.
#
# 2000-06-20 (dave)
#   As of 1999, Sonora quit observing Daylight Savings Time.  This
#   forced the maintainers of the zoneinfo database to split off a new
#   time zone just for Sonora: :America/Hermosillo.  This change has
#   not yet propagated to the average Linux distribution.  As a
#   temporary workaround, I have changed the time zones of the four
#   Sonora locations to MST7.  This makes predictions correct right
#   now but breaks predictions for years before 2000.  When the
#   zoneinfo change has propagated to Slackware, I will update the
#   time zones in harmonics.world and add the new time zone to the
#   backwards compatability table in the XTide source code.
#
# 2000-06-18 (dave)
#   Changed "Guayamas" back to "Guaymas."  I don't know what gave
#   me the idea it was spelt "Guayamas."
#
# 2000-05-07 (dave)
#   Downgraded 13 pedigrees that were missed by the pedigree-
#   guessing heuristic.  There remain a good many -1B and -1.5B
#   pedigrees on data sets that lack explicit commentary; what
#   to do with these?
#
#   Corrected typo "Temminal Island."


Top
   
 
 Post subject: Re: Change / replace tide files

Joined: 29 Jul 2011, 16:32
Posts: 50
Hi Moe,
I'm not curious, I want to use some "French made" Tide files named harmonic as the original but build by an "amateur" and they seems to be working fine.
But I cannot choose in OpenCPN the default Tidal Calculator, and in France, tide calculation are the property of the SHOM (like US Hydrographic Service) and we have to pay to use it...

I have harmonic and harmonic.idx located in nx@nx:/usr/local/share/opencpn/tcdata but they seems to be inactive when I want to look at the tides...
:-(


Top
   
 
 Post subject: Re: Change / replace tide files

Joined: 04 Nov 2010, 20:51
Posts: 1062
Are these the harmonic files to which you refer?

http://www.hisse-et-oh.com/forums/heo-clubs/messages/1057294-harmonics-v7-fr-pour-opencpn?style=border%3A+none%3B

If they are....The easiest way:

Download the files.

Open them with gEdit as root, for example

sudo gedit /home/$USER/Download/HARMONIC /home/$USER/Download/HARMONIC.IDX


You will see something like:
Attachment:
HARMONIC.IDX (-usr-share-opencpn-tcdata) - gedit_003.png
HARMONIC.IDX (-usr-share-opencpn-tcdata) - gedit_003.png [ 64.52 KiB | Viewed 12369 times ]


Save the files as Save As
Attachment:
Menu_005.png
Menu_005.png [ 17.16 KiB | Viewed 12369 times ]

Select Character Encoding and Line Ending.

Save the appropriate file in the appropriate place...having renamed the old files before hand...just in case. (The new files are also a smaller dataset. My files are currently located at /usr/share/opencpn/tcdata (long story). Your files would be at /usr/local/share/opencpn/tcdata/
Attachment:
Save As…_006.png
Save As…_006.png [ 63.06 KiB | Viewed 12369 times ]


Voilà
Attachment:
OpenCPN_FR_Currents.png
OpenCPN_FR_Currents.png [ 11.76 KiB | Viewed 12367 times ]

Attachment:
OpenCPN _FR_Tides-Currents.png
OpenCPN _FR_Tides-Currents.png [ 58.05 KiB | Viewed 12369 times ]


Top
   
 
 Post subject: Re: Change / replace tide files

Joined: 29 Jul 2011, 16:32
Posts: 50
Hello Moe,
Back with this problem again after reinstalling Navigatrix.
I can open /usr/local/share/opencpn/tcdata and there are 3 files for harmonic, but I cannot use it or replace it because the owner is Root and I don't know how to appropriate this file as user...
Thanks for your help.
P.S: Even there are HARMONIC, HARMONIC.IDX and README.harmonics files in this folder, OpenCPN cannot open it...but only outside of France.

In Windows Seven, no problem. I have tides in France certainly because there is no protection against copy for this files.


Top
   
 
 Post subject: Re: Change / replace tide files

Joined: 04 Nov 2010, 20:51
Posts: 1062
While you can do this all from the command line, sometimes it's easier to see what's going on when you use the File Manager.

Open up the File Manager. Go to the directory of your choice. Select Tools> Open Folder as Root

You will notice there is a 'key' icon in the corner. This means you have superpowers and can really mess things up...

If your French tide files are in another directory you can open a New Window in File Manager (File> New Window) Go to the location of those files and with this you can drag and drop to the proper directory. If they have the same name as the files in the tcdata directory you must rename them before you move them.
Attachment:
root_tide.png
root_tide.png [ 77.33 KiB | Viewed 12016 times ]

After the move, rename the 'old' files rather than deleting them...because you will want them when you come to Australia where you just reverse the process.

Do this for both harmonic and harmonic.idx.

There is nothing special about the 'old' extension. It's just short and descriptive

Give that a go.


Top
   
 
 Post subject: Re: Change / replace tide files

Joined: 29 Jul 2011, 16:32
Posts: 50
A BIG Thanks, Moe,
You save one hour of my life !
:lol:
Well... Visiting Australia ? May be, but not today !
I have parents in law in this "so far" country, It will be an "occasion".
See you,
Philippe


Top
   
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 


Search for:

Credits © 2010 - 2024