Cruisers Forum
 

Go Back   Cruisers & Sailing Forums > Seamanship, Navigation & Boat Handling > OpenCPN
Cruiser Wiki Click Here to Login
Register Vendors FAQ Community Calendar Today's Posts Log in

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 07-11-2009, 00:59   #91
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Psyches:
Quote:
If someone chooses to, they might ask MapTech for the actual format doc, rather than inferring from the test doc. The test doc says MapTech will give the format doc out upon request. However, I imagine that would accelerate any intellectual rights issue confrontation
I think you are spot on in your last sentence above.
It is a very bad idea for someone involved in this project to have access to Maptechs official documentation, because then we cannot claim a "pure" reverse engineering environment. This could lead to all kind of unwanted complications.
The subset of the BSB3 standards that is available through the present version of libbsb has shown itself to be "good enough" for our purpose.
The future lies in an new open file-format, not in catching up with old formats left over by commercial developments.

Thomas
cagney is offline   Reply With Quote
Old 08-11-2009, 04:56   #92
Obsfucator, Second Class
 
dacust's Avatar

Join Date: Feb 2008
Location: Southeast USA.
Boat: 1982 Sea Ray SRV360
Posts: 1,745
I am using MapCal for the first time! Kinda funny, me writing mc2bsbh but never using it.

I have some topo maps of Indonesia, 5000x4nnn.

It hung trying to do them as PNG, so I tried BMP. Worked great. Got a working map.

So, now I want to go back and fine tune it, or do another one. It won't work. It pauses a while, comes up with the Chart Info screen, I fill it in and click OK, nothing. Not frozen, no CPU usage, just no map shows.

I had renamed the CHARTCAL.DIR to the chart name. Just for the heck of it, I tried naming it back and I tried opening the first one I did, it said something like "Image size have changed, calibrations may not be accurate". The chart size was filled in (Upper, Left, etc), but no map displayed.

Any ideas?

-dan
dacust is offline   Reply With Quote
Old 08-11-2009, 05:54   #93
Registered User

Join Date: Sep 2009
Location: Rome
Posts: 320
Quote:
Originally Posted by dacust View Post
I am using MapCal for the first time! Kinda funny, me writing mc2bsbh but never using it.

I have some topo maps of Indonesia, 5000x4nnn.

It hung trying to do them as PNG, so I tried BMP. Worked great. Got a working map.

So, now I want to go back and fine tune it, or do another one. It won't work. It pauses a while, comes up with the Chart Info screen, I fill it in and click OK, nothing. Not frozen, no CPU usage, just no map shows.

I had renamed the CHARTCAL.DIR to the chart name. Just for the heck of it, I tried naming it back and I tried opening the first one I did, it said something like "Image size have changed, calibrations may not be accurate". The chart size was filled in (Upper, Left, etc), but no map displayed.

Any ideas?

-dan
Hi dan. No, no idea. If you don't change images, filenames, etc. It normally works : you reload the image file and it finds the info in CHARTCAL.DIR (that is the reason it puts the filename in chartcal.dir). If you want, send me the source map and the chartcal.dir. I can try to check.

Dan, I've few more ideas for mc2bsbh but i'm still thinkng the best solution. Anyway this one shold be fine:

if any longitude (reference and/or borders) is grater than 180.0 then writes the longitude number in the header as longitude-360

this would help in calibrating maps that cross 180° longitude.

Ciao, Marco.
GPS-Marco is offline   Reply With Quote
Old 08-11-2009, 06:35   #94
Obsfucator, Second Class
 
dacust's Avatar

Join Date: Feb 2008
Location: Southeast USA.
Boat: 1982 Sea Ray SRV360
Posts: 1,745
Quote:
Originally Posted by GPS-Marco View Post
Hi dan. No, no idea. If you don't change images, filenames, etc. It normally works : you reload the image file and it finds the info in CHARTCAL.DIR (that is the reason it puts the filename in chartcal.dir). If you want, send me the source map and the chartcal.dir. I can try to check.

Dan, I've few more ideas for mc2bsbh but i'm still thinkng the best solution. Anyway this one shold be fine:

if any longitude (reference and/or borders) is grater than 180.0 then writes the longitude number in the header as longitude-360

this would help in calibrating maps that cross 180° longitude.

Ciao, Marco.
OK, I'll add the -360 idea.

Since the open format discussion is advancing slowly, I have come back to working on mc2bsbh. Working on batch mode right now. That's partly why I started playing with MapCal, to create a batch to work from. And to play with some charts.

At some point, I'll put the problem files up on my website so you can check them out. I think I may have screwed it up by renaming the first CHARTCAL.DIR, and trying to start another one. Then when it didn't work, naming it back. It seems to have gotten confused. I think it must store what charts it has somewhere else. And then it looks like it may check the size or change date on the CHARTCAL.dir and decides someone has been messing with it. Just guessing.

Worst case, I may just reload SeaClear.

-dan
dacust is offline   Reply With Quote
Old 08-11-2009, 11:23   #95
Obsfucator, Second Class
 
dacust's Avatar

Join Date: Feb 2008
Location: Southeast USA.
Boat: 1982 Sea Ray SRV360
Posts: 1,745
MapCal issues

Here are the Files and description of the issue I am having in MapCal.

I started with .jpgs
Converted jpg-png
MapCal would load the png but not display it.
Converted jpg-bmp
MapCal liked that better.
I calibrated a chart and saved it.
Created the kap with mc2bsbh from the CHARTCAL.DIR and then tif2bsb (after jpg-gif-tif conversion).
Opened it in OpenCPN - Looked good

Tried another one. This time I used tons of REF points to do it right.
Opened CHARTCAL.DIR and saved it under another name, with the first chart stripped out.

The created chart looked great, but the PLY was all messed up (the chart straddles the equator), so I hand edited the .hdr file. Now it is right.

Tried another one.
It pauses for a while loading the chart, then shows the "Chart Information" window. I fill it in. The window goes away, but the chart window stays blank. All buttons, etc. work, so the program is not frozen. No CPU being used. When I then exit, it warns me that I have not saved the calibration.

More details at the link above, but I have deleted the CHARTCAL.DIR, removed and re-installed SeaClear, etc.

If I put the renamed-edited version of CHARTCAL.DIR with the second chart back, it will open that one. But the un-edited version of the first one does not work. That one warns that the image size may have changed. Then when loaded, says the calibration may contain errors. Then, blank screen.

-dan
dacust is offline   Reply With Quote
Old 08-11-2009, 14:44   #96
Registered User

Join Date: Sep 2009
Location: Rome
Posts: 320
Quote:
Originally Posted by dacust View Post
Here are the Files and description of the issue I am having in MapCal.
...
-dan
Dan, key.mph has C36 point wrong (120° S latitude...). This has messed up the PLY points. Please correct C36 and then replace the PLYs with following:

Code:
BC=4
B1=15,95
B2=-15,95
B3=-15,130
B4=15,130
If you are not sure of projection, use "unknown" and save calibration. Much better border lines...

Note that I've converted map to 16 colours. Much smaller file and almost no degradation.

Ciao, Marco.

Click image for larger version

Name:	key-ocpn.jpg
Views:	253
Size:	96.4 KB
ID:	10972
GPS-Marco is offline   Reply With Quote
Old 08-11-2009, 16:10   #97
Obsfucator, Second Class
 
dacust's Avatar

Join Date: Feb 2008
Location: Southeast USA.
Boat: 1982 Sea Ray SRV360
Posts: 1,745
Quote:
Originally Posted by GPS-Marco View Post
Dan, key.mph has C36 point wrong (120° S latitude...). This has messed up the PLY points. Please correct C36 and then replace the PLYs with following:

Code:
BC=4
B1=15,95
B2=-15,95
B3=-15,130
B4=15,130
If you are not sure of projection, use "unknown" and save calibration. Much better border lines...

Note that I've converted map to 16 colours. Much smaller file and almost no degradation.

Ciao, Marco.

Attachment 10972
Marco,

Thanks. But that doesn't explain why THAT file opens in MapCal just fine, but nothing else will for me.

Oh, and I think I fixed the PLYs by hand last time I did it, because it displays correct for me, now.

I have gone to doing them by hand. Not that much more difficult for those charts, since they have + marks at the intersections. I just do a row of 7 points, then copy the group 4 more times, then just adjust the numbers and then double check them in Gimp for the exact pixles.

-dan
dacust is offline   Reply With Quote
Old 08-11-2009, 16:19   #98
Obsfucator, Second Class
 
dacust's Avatar

Join Date: Feb 2008
Location: Southeast USA.
Boat: 1982 Sea Ray SRV360
Posts: 1,745
Multi-Chart version of mc2bsb ready for testing!

mc2bsbh now supports multiple charts in CHARTCAL.DIR

I just received a surprise in the e-mail. Someone re-wrote mc2bsb completely. Less source, slightly smaller exe. All the functionality and switches, command line arguments, etc. are the same. Except that it is now supposed to handle multiple chart calibrations in a single CHARTCAL.DIR file.

Since MapCal is not working on my computer, I have not tested it. But the code looks reasonable as far as a newbie like me can read it.

mc2bsbh 0.0.2

-dan
dacust is offline   Reply With Quote
Old 09-11-2009, 05:39   #99
Obsfucator, Second Class
 
dacust's Avatar

Join Date: Feb 2008
Location: Southeast USA.
Boat: 1982 Sea Ray SRV360
Posts: 1,745
Thanks to Henrik Jessen for the re-write.

Now, could someone help us write some documentation? My webpage looks as awful as my code did.

FYI: The delayed credit is because I don't credit things received in private e-mails until I ask for permission. I have received stuff in e-mails where they give their name, but have a screen name from somewhere they want to use. Or sometimes they wish to remain anonymous. So I asked, and Henrik said use his name.

-dan
dacust is offline   Reply With Quote
Old 09-11-2009, 07:28   #100
Obsfucator, Second Class
 
dacust's Avatar

Join Date: Feb 2008
Location: Southeast USA.
Boat: 1982 Sea Ray SRV360
Posts: 1,745
Updated code

Update 10/09/2009:
Some changes made:
1) now it compiles on BCC32 (check for g++)
2) scales > 1000000 is not translated in SC=1e6
3) if longitude > 180, it writes long-360
4) rouded DU value (dot per inch is an integer)
5) corrected bug: DTM is DS * 60 (not just DS)
6) lat and long are written with a right number of decimals (>=6).

Thanks, Marco!

-dan
dacust is offline   Reply With Quote
Old 09-11-2009, 19:46   #101
Obsfucator, Second Class
 
dacust's Avatar

Join Date: Feb 2008
Location: Southeast USA.
Boat: 1982 Sea Ray SRV360
Posts: 1,745
I updated the page. Looks a little better.

The flow diagram was done with Dia, an open source diagramming tool. It sucks. The diagram, that is. The tool is pretty good according to a guy at work, but I can't seem to do much with it. I'll probably redo it in Visio if I get a spare moment at work tomorrow. I also can't believe Dia can't export to a .gif. But maybe the gif format copyrighted or patented? The png is pretty small, though.

-dan
dacust is offline   Reply With Quote
Old 10-11-2009, 01:06   #102
Registered User

Join Date: Sep 2009
Location: Rome
Posts: 320
Quote:
Originally Posted by dacust View Post
I updated the page. Looks a little better.

The flow diagram was done with Dia, an open source diagramming tool. It sucks. The diagram, that is. The tool is pretty good according to a guy at work, but I can't seem to do much with it. I'll probably redo it in Visio if I get a spare moment at work tomorrow. I also can't believe Dia can't export to a .gif. But maybe the gif format copyrighted or patented? The png is pretty small, though.

-dan
Dan and all, I asked some days ago if someone can check if MapCal can work under Wine (in linux). Is there some linux user that can have a look to this issue?

Ciao, Marco.
GPS-Marco is offline   Reply With Quote
Old 10-11-2009, 09:57   #103
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Marco

So far I have only tested MapCal as described in my post about converting a WCI file to a kap file. I had no problem then.
Hopefully later in the week I'll georeference a NZ tif and report back.
All this was on linux Kubuntu 9.04. Now painlessly upgraded to 9.10.

Thomas
cagney is offline   Reply With Quote
Old 10-11-2009, 16:06   #104
Registered User

Join Date: Sep 2009
Location: Rome
Posts: 320
KapGen.cmd

I've posted a tool for map conversion. please have a look to #277

Note that I use a new version of mc2bsbh that I'll send in few seconds to Dan for web publication.

New features are:
1) corrected a bug with header longer than 40 lines
2) corrected a bug with empty parameters in CHARTCAL.DIR
3) added a preprocessor of the MapCal comment field
4) a new switch -s MAPNAME to generate a single header from multiple CHARTCAL.DIR
5) removed obsolete switch -ced (see point 3)

Number 3) is powerful: you can now add a comment in the CHARTCAL.DIR that are commands for mc2bsbh.exe!

For example if CHARTCAL.DIR contains a comment like this one:
Code:
.....
ATS=0
LATN=0
DU=1
PC=0
CR=BSBHDR CED/SE=2005,RE=43,ED=2009
   BSBHDR KNP/SD=MEAN LOW WATER SPRINGS,PP=-23
   MD5SUM 5dd9bd1a3bb72e2f69424a444b086671
   GETMAP http://charts.linz.govt.nz/tifs/nz21.tif
well, the two lines beginning with BSBHDR will be processed by mc2bsbh (the other comment lines will be just added to the BSB header as comments)

First command is: add a line to the BSB header equal to CED/SE=2005,RE=43,ED=2009
Second one is: superseed the default values for KNP/SD and KNP/PP with the specified values.

I think this is great. You can now put BSB chart data that MapCal does not handle in the CHATCAL.DIR as comments!

And more is coming (look at MD5SUM and GETMAP...). Please download KapGen (#277) for a better idea.

Ciao, Marco.
GPS-Marco is offline   Reply With Quote
Old 10-11-2009, 17:35   #105
Obsfucator, Second Class
 
dacust's Avatar

Join Date: Feb 2008
Location: Southeast USA.
Boat: 1982 Sea Ray SRV360
Posts: 1,745
Very, very nice, Marco! It is up there.

I will probably update the documentation tonight sometime. For now I just put a warning that the documentation does not match the doc.

BTW: Since more than one person is involved, please contact me before changing anything. Just say you want to check the code out for modification. And, no, there has been no mixup. The timing has been perfect. I just don't want to see anyone put in a lot of effort that may have to be redone to merge two versions together.

-dan
dacust is offline   Reply With Quote
Reply

Tags
bsb


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
Bahamas Explorer Charts in BSB Format? geoffschultz Navigation 29 16-05-2015 10:21
Free (and Legal) BSB Charts from Maptech! exposure Navigation 15 31-07-2013 11:51
Sales Agreements - Template Anyone? cyberkitty Dollars & Cents 3 11-02-2010 14:49
OpenCPN with BSB v4 selkie Navigation 4 03-08-2009 11:32
Survey Template bbhflts Construction, Maintenance & Refit 3 23-06-2009 22:42

Advertise Here


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


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.