Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 30-07-2018, 00:42   #1
Registered User

Join Date: Oct 2011
Location: Greece for now
Boat: Leopard 43
Posts: 22
Bringing old tracks forward to new version

I had to be away from our cruise for about 18 months. During that period I replaced my laptop, and loaded a new version of OpenCPN. How do I recover the irreplaceable tracks (2014-2016) and overlay them on those of the new version? I have a complete backup of my old laptop, including Program Files and Program Data, but have been unable to identify anything that looks like a tracks file. TIA for any help.
__________________

__________________
Larry Smith
S/V Pleamar & S/V Harmonia
lhsmith is offline   Reply With Quote
Old 30-07-2018, 01:25   #2
Registered User

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 5,005
Re: Bringing old tracks forward to new version

Just copy across the navobj.xml files from the old computer stored in here -
C:\ProgramData\opencpn
__________________

conachair is online now   Reply With Quote
Old 30-07-2018, 06:51   #3
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 13,936
Re: Bringing old tracks forward to new version

Suggest you use a text editor to append your old track data to the new. (Copy and paste). Search on navobject.xml or look in FAQ.
rgleason is offline   Reply With Quote
Old 30-07-2018, 14:57   #4
Registered User

Join Date: Oct 2011
Location: Greece for now
Boat: Leopard 43
Posts: 22
Re: Bringing old tracks forward to new version

Thank you, I found the appropriate files. I have tried 3 text editors -- Notepad, Wordpad, and Open Office text editor. No matter what I do, they all give me a file OpenCPN ignores and creates its own new navobj.xml. I can get it to accept either of the old files, but something gets changed when I combine the 2. So far I have appended one file to the end of the other, and have tried to segregate the info from the two files so that all routes and waypoints are described, and then tracks are listed. Any advice on how to make a master that OpenCN recognizes? (I suspect it's just a formatting problem with the text editors.)
__________________
Larry Smith
S/V Pleamar & S/V Harmonia
lhsmith is offline   Reply With Quote
Old 31-07-2018, 03:38   #5
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 13,936
Re: Bringing old tracks forward to new version

That is due to the choice for line endings I believe. Good job you are almost there.
I use notepad++ and have set it to end the lines so it is compatible with opencpn.
I suggest you try it, it is opensource and a very good tool. Unfortunately i forget the setting.
Also look very carefully at the continuity of the code when you paste in.
This is xml and there is a set of starting indicators like
(Code)
Your tracks routes waypoints
(/Code)

You must have only one master parent set.. only way i can think to express it now.

Look at the structure of a navobj file and follow that.
rgleason is offline   Reply With Quote
Old 31-07-2018, 04:08   #6
Registered User
 
Dsanduril's Avatar

Join Date: Aug 2011
Location: Petersburg, AK
Boat: Outremer 50S
Posts: 2,950
Re: Bringing old tracks forward to new version

Use Notepad++, it has the ability to deal well with large files. I haven't needed to change line endings, at least for me it figures it out when opening the file (I've never built a navobj.xml from scratch, could be you have to make adjustments to do that).

Each track should start with something like this:

Quote:
<trk>
<extensions>
<opencpn:guid>33a8c2ed-8ffd-482f-a46c-0eca0b8c73a2</opencpn:guid>
<opencpn:viz>1</opencpn:viz>
</extensions>
<trkseg>
<trkpt lat="-40.791023000" lon="172.954091667">
<time>2017-02-09T05:14:49Z</time>
</trkpt>
<trkpt lat="-40.791022833" lon="172.954154833">
<time>2017-02-09T05:16:21Z</time>
note the <trk> that's the tag that defines the beginning of each track. Each track ends with </trk>.

In all of my files tracks are the last objects stored, although I don't know if that is always the case. Anyway,
  1. Open both your old and your current navobj.xml in Notepad++
  2. Search the old file from the top down for the first <trk>
  3. Mark that location
  4. Go to the very end of the file and search upward for the last </trk> (if it is like mine it will be the next to last line in the file)
  5. Copy all the data between your first mark and the last </trk> (including both the <trk> and </trk> tags)
  6. Go to the new file and get your cursor to the very end of the file.
  7. Search upward for the last </trk> in the new file
  8. Place your cursor after the last </trk> and put in a new line ('Enter' on a Win box).
  9. Paste the stuff you copied from the old file.

If the tracks are the last thing in the file then the very end of the new file should be:

Quote:
</trk>
</gpx>
The </trk> indicates the end of the last track, then the </gpx> indicates the end of the data in the file. For it all to work right the old tracks should start with a <gpx> and end with a </gpx> and should not interrupt any of the similar pairs in the new file (hope that's clear).

Having said all of that, tracks can be memory (and disk) hogs, the more of them OpenCPN has to load the more memory it takes and it can really slow things down. Don't know about a full-size Win box, we run 'O' on a Raspberry Pi 3 and I find myself doing the opposite about once a year, I extract a year's worth of tracks and store them as a backup in case I ever want them. That greatly reduces the navobj.xml size and speeds up 'O' loading and most actions (panning, zooming, etc.).
Dsanduril is offline   Reply With Quote
Old 31-07-2018, 05:21   #7
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 13,936
Re: Bringing old tracks forward to new version

Dsanduril Thank you. That is a good description we could have in the wiki, under Edit navobject.xml perhaps? Certainly have a link in FAQ to that page. Will try to add in a couple of weeks.
rgleason is offline   Reply With Quote
Old 31-07-2018, 06:45   #8
Registered User
 
jstevens's Avatar

Join Date: May 2006
Location: On board Sarah, currently lying in Jacksonville, FL
Boat: Pearson, 424, 42', Sarah
Posts: 659
Images: 4
Re: Bringing old tracks forward to new version

Why wouldn't you just open the old navobj.xml file in an xml file editor (I use XML Notepad), save it as a gpx file, then import it into OpenCPN?

John
jstevens is offline   Reply With Quote
Old 31-07-2018, 07:14   #9
Registered User

Join Date: Oct 2011
Location: Greece for now
Boat: Leopard 43
Posts: 22
Re: Bringing old tracks forward to new version

Success! At least as far back as Barcelona, which is my bad. THANK YOU. This taught me what to be careful to save for my descendants.
Attached Thumbnails
Click image for larger version

Name:	image.jpg
Views:	27
Size:	405.0 KB
ID:	174660  
__________________

__________________
Larry Smith
S/V Pleamar & S/V Harmonia
lhsmith is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
400: Lagoon 400S2 Owners Version - where to place the forward scan sensor? CatNewBee Lagoon Catamarans 4 25-04-2018 01:48
Buy a "new" old boat or an "old" old boat?? jimp1234 General Sailing Forum 29 08-01-2016 02:12
Bringing an Old Diesel Back to Life theller Engines and Propulsion Systems 18 30-10-2014 15:27
Updated to New Version - Lost Old Tracks?? obelisk OpenCPN 20 14-03-2014 02:32
New but Old, Looking Forward to Casting Off FxdGrMind Meets & Greets 3 08-05-2010 16:29

Advertise Here


All times are GMT -7. The time now is 02:14.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2020, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.