Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 10-03-2016, 19:38   #751
Registered User
 
Markus451's Avatar

Join Date: Jun 2013
Location: Vancouver BC
Boat: Hunter 25 (25')
Posts: 11
Re: OpenCPN Chart Datum Error

OpenCPN does indeed have the capability to work with different datums. The documentation says so and it says the corrections are automatically applied. However, the info in the KAP file must be correct. This is the issue I'm dealing with.
__________________

__________________
Markus451 is offline   Reply With Quote
Old 10-03-2016, 19:58   #752
Senior Cruiser
 
jackdale's Avatar

Cruisers Forum Supporter

Join Date: Mar 2008
Location: Calgary, AB, Canada
Posts: 5,020
Images: 1
Re: OpenCPN General

Quote:
Originally Posted by Markus451 View Post
I've got all the RNC charts for BC and more than half are NAD27. The CHS charts now sold have the proper datum corrections, thus the datum listed in the chart legend isn't relevant, but mine don't. The issue is how can I enter the datum corrections so I don't have to lay out a grand for new charts. Unless someone is willing to share their charts.
A set of the entire current BC charts will cost you $575 plus tax.

http://www.maptown.com/ndi-digital-nautical-charts.html

That is the cost of about 26 paper charts.
__________________

__________________
ISPA Yachtmaster Ocean Instructor Evaluator
Sail Canada Advanced Cruising Instructor
IYT Yachtmaster Coastal Instructor
ASA 201, 203,204, 205, 206, 214
As I sail, I praise God, and care not. (Luke Foxe)
jackdale is offline   Reply With Quote
Old 10-03-2016, 20:12   #753
Registered User
 
Markus451's Avatar

Join Date: Jun 2013
Location: Vancouver BC
Boat: Hunter 25 (25')
Posts: 11
Re: OpenCPN General

Quote:
Originally Posted by transmitterdan View Post
Is there any message in the log file pertaining to this chart file? If it had problems decoding the chart file during database rebuild there might be a hint there as to what is wrong.

You might try to rebuild the texture cache although I don't think that should be the problem.
Now we're getting somewhere! Great idea, thanks. The logfile showed exactly what went wrong:

C:\MARINE\CHARTS\BSB_ROOT\BSB_CANADA_WEST\347302.K AP
5:43:02 PM: Chart datum {NAD27} invalid on chart C:\MARINE\CHARTS\BSB_ROOT\BSB_CANADA_WEST\347302.K AP
5:43:02 PM: Default datum (WGS84) substituted.
5:43:02 PM: Chart File RLL data corrupt on chart C:\MARINE\CHARTS\BSB_ROOT\BSB_CANADA_WEST\347302.K AP
5:43:02 PM: OpenChartFromStack...Error opening chart C:\MARINE\CHARTS\BSB_ROOT\BSB_CANADA_WEST\347302.KAP... return code 2
5:43:02 PM: chart1.cpp:SetChartThumbnail...Could not open chart

So, why would the so-called RLL data get corrupted when I just used Notepad to add the northing & easting corrections? Following OpenCPN documentation, "DTM Datum shift parameters - Datum's northing and easting in floating point seconds to go between chart datum and WGS84 (omitted or 0,0 for WGS84 charts)", I tried both "DTM/0.65,4.75" and "DTM/ 0.65, 4.75" with spaces, but neither worked. Maybe leading zeros are needed?

It also makes me wonder if the file has a checksum somewhere, so that any changes to the file invalidate the checksum?

Next question: what's 'return code 2'?

Whole new angle: the OpenCPN documentation says that different chart datums work, yet for every single NAD27 chart I've got, the logfile says, "Chart datum {NAD27} invalid on chart". Maybe the format of how GD=NAD27 is written needs a tweak of some kind, or is it just that the program is just picking up that the northing and easting corrections are missing?
__________________
Markus451 is offline   Reply With Quote
Old 10-03-2016, 20:27   #754
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 3,783
Re: OpenCPN General

Quote:
Originally Posted by Markus451 View Post
Next question: what's 'return code 2'?
Return code 2 usually means "file not found". However, there is no guarantee that code 2 applies to this file. It would appear that the file is in fact present but it failed a checksum test and was declared "corrupt". So in this case I would just ignore the code 2 message and focus on the corruption issue.
__________________
transmitterdan is online now   Reply With Quote
Old 10-03-2016, 20:41   #755
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 3,783
Re: OpenCPN General

Quote:
Originally Posted by Markus451 View Post
So, why would the so-called RLL data get corrupted when I just used Notepad to add the northing & easting corrections?
I would hazard a guess that Notepad is kind of "stupid" and it probably deleted the non-printable characters in the .KAP file. If you look carefully at the .KAP file format documentation on the OpenCPN web pages there are NUL characters in a .KAP file. Notepad probably doesn't understand these are important and it deleted them. Then the .KAP parser can't sort out the fields and gets massively confused. But I'm just guessing about all of this. If you have access to a hex file editor that would probably be much safer than using Notepad.

Or you might consider gettig up to date charts if these chart files are really old.
__________________
transmitterdan is online now   Reply With Quote
Old 11-03-2016, 19:32   #756
Registered User
 
Markus451's Avatar

Join Date: Jun 2013
Location: Vancouver BC
Boat: Hunter 25 (25')
Posts: 11
Re: OpenCPN General

Quote:
Originally Posted by jackdale View Post
A set of the entire current BC charts will cost you $575 plus tax.

NDI - Nautical Data International. Buy digital nautical chart software from Map Town.

That is the cost of about 26 paper charts.
OK, good to know. But I still prefer to gain the knowledge and fix my existing charts. It's the same as learning how to fix an engine. If you just pay to make a problem go away, you haven't learned anything. What happens if you have another problem, on a passage? That's my philosophy, anyway.
__________________
Markus451 is offline   Reply With Quote
Old 11-03-2016, 20:10   #757
Registered User
 
Markus451's Avatar

Join Date: Jun 2013
Location: Vancouver BC
Boat: Hunter 25 (25')
Posts: 11
Re: OpenCPN General

Quote:
Originally Posted by transmitterdan View Post
I would hazard a guess that Notepad is kind of "stupid" and it probably deleted the non-printable characters in the .KAP file. If you look carefully at the .KAP file format documentation on the OpenCPN web pages there are NUL characters in a .KAP file. Notepad probably doesn't understand these are important and it deleted them. Then the .KAP parser can't sort out the fields and gets massively confused. But I'm just guessing about all of this. If you have access to a hex file editor that would probably be much safer than using Notepad.

Or you might consider getting up to date charts if these chart files are really old.
Great idea about hex editor, I'll try that! The charts are from the late 90's and the rocks haven't gone anywhere, whereas sand bars shift every year, so I don't see the need to get new charts. Unless someone tells me that entire light systems and markings have been changed, or something.

Do you have any thoughts about "Whole new angle: the OpenCPN documentation says that different chart datums work, yet for every single NAD27 chart I've got, the logfile says, "Chart datum {NAD27} invalid on chart". Maybe the format of how GD=NAD27 is written needs a tweak of some kind." OpenCPN says, "Charts with an unrecognized Geodetic Chart Datum will be loaded as if they were WGS84. This may lead to unacceptable errors. The Chart Information Dialog will contain the sentence:"Warning: Chart Datum may be incorrect." , and the log will contain a note with the words "Chart datum {XXXX} invalid on chart". For practical use, it's very important that the implication of this is understood." "If the chart is not using WGS 84, but a named, recognized datum, OpenCPN will automatically add necessary corrections." So, why is "NAD27" not working as a named, recognized datum?

Answering my own question: "For a list of approved Datums see the file georef.cpp in the source code. Charts released earlier than 1990 (?) and conforming to World Geodetic System should be WGS72, unless stated otherwise. The difference between WGS 84 and WGS 72 is minor." Then, looking into the georef file, our answer is in this line:

{ "NAD27 Canada", 4, -10, 158, 187 }, // 58

Every different NAD27 region has its own name and correction. NAD27 isn't good enough. So the first thing I'm going to do is correct that on all my charts (using a hex editor!) and see if they are now accurate, or whether the specific corrections on each chart need to be used. How to determine accuracy? What you do is compare the lines of lat & long drawn by OpenCPN (needs to be turned on in settings) with the hash marks on the paper chart; they should correspond perfectly.

In conclusion, right here I've gone a long way to solving the problem--couldn't have done it without you, thanks--and I have vastly greater knowledge about RNC charts than when I started. And I will bet you that I will be able to use that knowledge in future, to help others if not myself.
__________________
Markus451 is offline   Reply With Quote
Old 11-03-2016, 20:16   #758
Registered User
 
Markus451's Avatar

Join Date: Jun 2013
Location: Vancouver BC
Boat: Hunter 25 (25')
Posts: 11
Chart Datum Basics in case anyone is interested

Natural Resources Canada has a webpage that converts NAD27 to NAD83:

NTv2

Here is a clear explanation of what it's all about, for anyone who is interested:

Map Datum
The transition to NAD83
An important change has been made in National Topographic System (NTS) maps. In 1990, Natural Resources Canada officially adopted North American Datum 1983 (NAD83) as its new geodetic reference system. As a map user, this is something you need to know, especially if you use GPS receivers, because it will modify the coordinates you will use to position yourself on the map. Geographical (latitude and longitude) and UTM (Universal Transverse Mercator) coordinate systems are positioned on the shape of the world by a "datum". The model for the shape of the world that is used is called an "ellipsoid".

What is an Ellipsoid?
As everybody knows now, the world is not flat. Actually, it is not round either: it is flattened at the poles. It resembles a three dimensional ellipse called an ellipsoid. An ellipsoid can be defined by a number of mathematical characteristics. As our knowledge of the world has increased over the centuries, we have come to know the dimensions and shape of the world more accurately. Mathematical models of the shape of the world have therefore become more and more precise, and it has become necessary to change to a more accurate model. The new, more accurate model is called Geodetic Reference System 1980 (GRS80).

What is a Datum?
A datum defines how a coordinate system is seated over the ellipsoid. The origin of the new NAD83 system is the centre of mass of the Earth, whereas the old North American Datum 1927 (NAD27) had a different origin, making it useful only in North America. GPS receivers also use the centre of mass of the Earth as their system's origin. MY NOTE: THE NAD27 ORIGIN WAS A RANCH IN KANSAS!

What does this all mean?
This means that, because of the change in ellipsoid and datum, there will be a shift in every position on the map between the old edition (using NAD27) and the new one (using the new NAD83). Also, adjoining sheets may be in different datums, causing a loss or addition of detail at the map's neatline. When a map is revised, it is automatically converted to NAD83. All of our digital products have been converted as well. So when using topo maps with adjoining sheets or with a GPS receiver, you should always check the datum note first. This note can be found on the south margin of the map and will state either "North American Datum 1927" or "North American Datum 1983". You must set your GPS receiver to the proper datum in order to be able to use a topo map directly.

How to convert NAD27 coordinates to NAD83
The Centre has added a note at the bottom of its maps enabling users to convert coordinates to and from the different datums. For users needing more precise coordinate conversions, the Geodetic Survey Division has developed a software package called the National Transformation Version 2 (NTv2) for converting coordinates between the NAD27 and NAD83 reference systems in Canada.
__________________
Markus451 is offline   Reply With Quote
Old 12-03-2016, 08:02   #759
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 3,783
Re: OpenCPN General

Markus,

There is an editor called NotePad++ that can probably edit a file with non-printable characters. It has a hex mode and a non-printable mode where you can see and edit all the characters even the ones that don't have a symbol.

Regarding old charts, I don't agree that it is safe to use 20+ year old charts. Please feel free to do as you will but it is definitely not the best idea to rely on long out of date charts.

Good luck
__________________
transmitterdan is online now   Reply With Quote
Old 14-03-2016, 19:50   #760
Registered User
 
phiggins's Avatar

Join Date: Nov 2004
Location: Toronto, Canada
Posts: 1,283
Send a message via Skype™ to phiggins
Re: OpenCPN General

One suggestion would be to input your charts to GE2KAP and align then with Goggle Earth and create a new chart. Very simple
__________________
Paul,
" One moment you are running along, the next you are no more." Dean Spanley
phiggins is offline   Reply With Quote
Old 14-03-2016, 20:06   #761
Registered User
 
Markus451's Avatar

Join Date: Jun 2013
Location: Vancouver BC
Boat: Hunter 25 (25')
Posts: 11
OpenCPN Chart Datum Correction, kap line "DTM= 0.00, 0.00"

Quote:
Originally Posted by phiggins View Post
One suggestion would be to input your charts to GE2KAP and align then with Goggle Earth and create a new chart. Very simple
Good to know it's an option but my charts list the specific northing and easting required to instantly make the chart NAD83 compliant, so that's why I'm trying to fix the correction entry in the charts.

UPDATE: After my entry from a couple days ago, I was pumped because I had tracked down the discrepancy and how to fix it. In OpenCPN, "NAD27" is not enough because it uses different corrections depending on the region. Unfortunately, putting in "NAD27 CANADA" did NOT fix the charting error.

So I moved to the DTM= 0.00, 0.00 line and entered the northing & easting corrections. For the first couple charts, it worked great.. the hash marks were very well aligned between the chart and OpenCPN's grid lines. But then for all the rest of the charts I tried correcting, nothing happened, there was no correction! I checked many times to make sure I didn't make some error with the hex editor. SO, WHAT THE HELL??? Can anyone venture a guess why OpenCPN would recognize and act on the correction line on some charts but not others???? So disappointing to think you cracked the puzzle and even have it work great, but then stop working!

UPDATE: Answering my own question.. examine the logfiles as first step!
__________________
Markus451 is offline   Reply With Quote
Old 17-03-2016, 19:44   #762
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,838
Re: OpenCPN General

Markus...

Be careful here.

If you are adjusting older NAD27 charts to some other datum by handcrafting the chart header, you must then completely ignore the printed lat/lon grid on the chart. That grid is aligned with NAD27. After the chart has been re-datumed (if that's a word), the printed grid is simply ink on paper with no navigational significance at all in the new datum.

To check your work, use a fixed point like a prominent lighthouse listed in the LightList. Drop an OCPN waypoint on the light. Look at the waypoint properties, and compare the position reported by OCPN to the known WGS84 position as listed in the LightList.

I hope this is clear. Took me a while to come to terms with the notion...

Good Luck
Dave
__________________
bdbcat is offline   Reply With Quote
Old 18-03-2016, 02:16   #763
Registered User
 
Markus451's Avatar

Join Date: Jun 2013
Location: Vancouver BC
Boat: Hunter 25 (25')
Posts: 11
Re: OpenCPN General

Quote:
Originally Posted by bdbcat View Post
Markus...

Be careful here.

If you are adjusting older NAD27 charts to some other datum by handcrafting the chart header, you must then completely ignore the printed lat/lon grid on the chart. That grid is aligned with NAD27. After the chart has been re-datumed (if that's a word), the printed grid is simply ink on paper with no navigational significance at all in the new datum.

To check your work, use a fixed point like a prominent lighthouse listed in the LightList. Drop an OCPN waypoint on the light. Look at the waypoint properties, and compare the position reported by OCPN to the known WGS84 position as listed in the LightList.

I hope this is clear. Took me a while to come to terms with the notion...

Good Luck
Dave
Thanks for your reply, Dave. I believe that you are mistaken when you say the NAD27 grid is just ink on paper even after being corrected but I really appreciate your effort to share your experience. The charts say that by making the specified northing and easting correction, they will align with NAD83 and I take the cartographers at their word.

Re your lighthouse suggestion, good idea. Thanks again.
__________________
Markus451 is offline   Reply With Quote
Old 18-03-2016, 20:59   #764
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,838
Re: OpenCPN General

Markus...

Think again about the NAD27 printed chart grid. Try it in reverse this way:

1. Plot your favorite lighthouse on paper NAD27 chart, giving lat1/lon1. Or look it up if you have an NAD27 LightList.

2. Correct the chart in OCPN to WGS84. Plot the lighthouse in OCPN, get lat2/lon2.

If (lat1/lon1 equals lat2/lon2), it must be that (NAD27 equals WGS84). But we know that this is not so. That's what the correction is all about.

So those printed NAD27 grid lines cannot be correct in WGS84.
The chart geo features may align with WGS84, but the NAD27 grid cannot.

Dave
__________________
bdbcat is offline   Reply With Quote
Old 29-03-2016, 04:41   #765
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 8,677
Re: OpenCPN General

In scanning through Tracker it appears to me that there a lot of items that could be closed. Is that correct? Is there a way for us to quickly flag which ones have been completed? - Or should we go through the logs to determine? Then check in the program itself?
__________________

__________________
rgleason is online now   Reply With Quote
Reply

Thread Tools
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
OpenCPN bdbcat OpenCPN 1343 19-09-2009 15:59
Hi - Just a Few Brief General Questions valley Meets & Greets 5 26-08-2009 12:19
OpenCPN with BSB v4 selkie Navigation 4 03-08-2009 11:32


Our Communities

Our communities encompass many different hobbies and interests, but each one is built on friendly, intelligent membership.

» More about our Communities

Automotive Communities

Our Automotive communities encompass many different makes and models. From U.S. domestics to European Saloons.

» More about our Automotive Communities

Marine Communities

Our Marine websites focus on Cruising and Sailing Vessels, including forums and the largest cruising Wiki project on the web today.

» More about our Marine Communities


Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 05:26.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.