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 08-02-2018, 12:30   #1336
Registered User

Join Date: Mar 2015
Posts: 35
Re: Help / FAQ

To you All:
David Register, creator of Open CPN is awarded by Ocean Cruising Club, OCC Award. See the link:
https://oceancruisingclub.org/newsit...er-for-OpenCPN
Congratulation to David !!! fantastic work.
victor15 is offline   Reply With Quote
Old 08-02-2018, 14:10   #1337
dnu
Registered User

Join Date: Feb 2018
Posts: 3
Re: Plugin API interface form MMSI

Quote:
Originally Posted by nohal View Post
Now this is a VERY bad idea Not to mention it will break as soon as you turn off recording track of the AIS targets...
Be a little positive, I do not belive it is VERY bad :-) .. and sorry for keeping the thread alive. I should have been more explicit. It will be used to initialize a monopulse sdr radar for tracking, not use AIS as tracking. Hence, I only need the current or first position after pressing track, but it is the interfacing for this I was trying to settle (just a visual targeting platform). So It does not matter if I turn of record, as long I do not push record on new targets while tracking. Anyways, I will try out your suggestions also.

I was actually surprised that I could not find an offline tool with a sufficient API for this task :-)
dnu is offline   Reply With Quote
Old 08-02-2018, 16:04   #1338
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,212
Re: Plugin API interface form MMSI

Quote:
Originally Posted by dnu View Post
Be a little positive, I do not belive it is VERY bad :-) .. and sorry for keeping the thread alive. I should have been more explicit. It will be used to initialize a monopulse sdr radar for tracking, not use AIS as tracking. Hence, I only need the current or first position after pressing track, but it is the interfacing for this I was trying to settle (just a visual targeting platform). So It does not matter if I turn of record, as long I do not push record on new targets while tracking. Anyways, I will try out your suggestions also.

I was actually surprised that I could not find an offline tool with a sufficient API for this task :-)
Well, nobody can forbid you investing more work into a worse solution of course But believe me, you would be done faster with less code actually patching OpenCPN to send you the events you are interested in.
nohal is offline   Reply With Quote
Old 12-03-2018, 21:43   #1339
Registered User
 
Jon Hacking's Avatar

Join Date: Sep 2010
Location: Currently cruising the Philippines, just got back from PNG & Solomons
Boat: Wauquiez 45' (now 48') catamaran
Posts: 1,093
Images: 1
Send a message via Skype™ to Jon Hacking
Re: Help / FAQ

Back in my felonious youth, I didn't realize that exporting "all visible" would also export any Layers I had visible. This created a huge .GPX file, that I'm now attempting to cut into chunks by country, so I can publish them for download. So I deleted all my Routes, Tracks, & Waypoints, and Imported the errant GPX. The Routes & Tracks imported OK, but only 2 (of my 300+) waypoints imported!

OK, read the .GPX into GPX Editor v1.06.18, deleted all my Routes & Tracks, saved the (WPT Only) GPX file, & ... it STILL won't import!

The crazy part of this is that the WPTs display fine when the GPX file is in the Layers folder. Is there some fundamental difference between the importing routines in Import GPX... & Layers?!? Or (say it softly) have I found a bug?

I then renamed the WPT Only .GPX to .XML & read it into my XML editor (FrontPage). It looked OK, although I'm not an expert. Re-formatted it so I could read it better. Still looked OK. Saved it, renamed it back to .GPX, & Imported it back into OpenCPN, but it still only gets a single waypoint ("Bamboo Structures" which is not the first or the last, but is near the top).

I *think* I've attached the WPTs Only GPX file (it's mostly in Indonesia). Can somebody please:
  • Tell me what's wrong with this GPX, so I can correct my WPTs
  • Tell me why OpenCPN reads it fine when it's in Layers, but won't Import it
TIA!
Attached Files
File Type: gpx 2016 Ocelot Malaysia WP Only 2.gpx (330.4 KB, 34 views)
__________________
-- Jon Hacking s/v Ocelot
Jon Hacking is offline   Reply With Quote
Old 13-03-2018, 00:39   #1340
Registered User

Join Date: Mar 2016
Posts: 19
Re: Help / FAQ

Those are not Waypoints or Tracks.

They are Userobjects and a gps tool does not know what the tag <opencpn> is.

However, your file looks like this:
Quote:
<wpt lat="3.712103333" lon="100.848673333">
<time>2015-11-04T18:27:44Z</time>
<name>House on pilings!</name>
<sym>boarding</sym>
<type>WPT</type>
<extensions>
<opencpn:guid>3da40000-618e-4d50-aa7f-d6392e8a0000</opencpn:guid>
<opencpn:viz_name>1</opencpn:viz_name>
<opencpn:arrival_radius>0.050</opencpn:arrival_radius>
<opencpn:waypoint_range_rings visible="false" number="-1" step="-1" units="-1" colour="#FFFFFF"/>
</extensions>
</wpt>
but a gpx track should look like this:

Quote:
<trkpt lat="56.943568" lon="18.309860">
<ele>0.000000</ele>
<time>2017-08-08T09:02:30Z</time>
</trkpt>
I guess you see a minor differnce

But you are lucky, just write a small script, which reads your file and write a real gpx file. All info should be there: Time, lat, lon. You can cut out the elevation or set it just to 0.
Or do it with notepad and find&replace. Well, all between <extensions>..</extensions> has to be deleted aswell - no idea if e.g. Notepad+ can do that? As said - if I were you, I simply would write a small php or shell script..
kutt is offline   Reply With Quote
Old 13-03-2018, 04:34   #1341
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,212
Re: Help / FAQ

Quote:
Originally Posted by Jon Hacking View Post
Back in my felonious youth, I didn't realize that exporting "all visible" would also export any Layers I had visible. This created a huge .GPX file, that I'm now attempting to cut into chunks by country, so I can publish them for download. So I deleted all my Routes, Tracks, & Waypoints, and Imported the errant GPX. The Routes & Tracks imported OK, but only 2 (of my 300+) waypoints imported!

OK, read the .GPX into GPX Editor v1.06.18, deleted all my Routes & Tracks, saved the (WPT Only) GPX file, & ... it STILL won't import!

The crazy part of this is that the WPTs display fine when the GPX file is in the Layers folder. Is there some fundamental difference between the importing routines in Import GPX... & Layers?!? Or (say it softly) have I found a bug?

I then renamed the WPT Only .GPX to .XML & read it into my XML editor (FrontPage). It looked OK, although I'm not an expert. Re-formatted it so I could read it better. Still looked OK. Saved it, renamed it back to .GPX, & Imported it back into OpenCPN, but it still only gets a single waypoint ("Bamboo Structures" which is not the first or the last, but is near the top).

I *think* I've attached the WPTs Only GPX file (it's mostly in Indonesia). Can somebody please:
  • Tell me what's wrong with this GPX, so I can correct my WPTs
  • Tell me why OpenCPN reads it fine when it's in Layers, but won't Import it
TIA!
Jon...
AFAICT there is absolutely nothing wrong with this file.
So, try to tell us what is wrong with your installation making the file look not be OK while it is.
Same waypoints loaded as layer already or something like that?



Pavel
Attached Thumbnails
Click image for larger version

Name:	Screen Shot 2018-03-13 at 08.32.20.jpg
Views:	443
Size:	404.7 KB
ID:	166153  
nohal is offline   Reply With Quote
Old 13-03-2018, 09:07   #1342
Registered User
 
Jon Hacking's Avatar

Join Date: Sep 2010
Location: Currently cruising the Philippines, just got back from PNG & Solomons
Boat: Wauquiez 45' (now 48') catamaran
Posts: 1,093
Images: 1
Send a message via Skype™ to Jon Hacking
Re: Help / FAQ

Quote:
Originally Posted by nohal View Post
Jon...AFAICT there is absolutely nothing wrong with this file. So, try to tell us what is wrong with your installation making the file look not be OK while it is. Same waypoints loaded as layer already or something like that?
Pavel
Thanks for looking at this for me Pavel. Are you saying that waypoints that are in a Layer will not import?!?

Yes, I had the original file (with all 300 tracks, several Routes, & 300+ WPTs) in the Layers folder, but not visible, so I could check things quickly. I had no idea that Layer objects would affect my ability to Import...

Installation is fairly new, 4.8.0 upgraded to 4.8.2, new Acer Aspire 5 (core i5) laptop running Win10 Home (1709), GeForce MX150 (but OpenGL NOT enabled, per Paul Higgins), 8GB, 240G SSD, 2TB spinning, 1920x1080...

Hmmm... OK, Renamed the Layers folder to something else, restarted OpenCPN, & now everything (seems to) import OK (but I can't count them easily).

So ... WPTs (only?) that are in Layers, even if they're hidden, won't import? But Tracks & Routes don't seem to be affected by this. Is this By Design? Seems strange. Why treat them differently?

Also, while you're here, is there any way to get those WPTs to display more nicely? I used to be able to get ~16 to display on a standard screen in the Route & Mark Manager, much like the Tracks or Routes. Now I only get 3 WPTs displaying on a screen, with a bunch of wasted white-space around them (OK, I'm a screen real-estate freak).

Thanks again for the hint!
__________________
-- Jon Hacking s/v Ocelot
Jon Hacking is offline   Reply With Quote
Old 14-03-2018, 18:12   #1343
Registered User

Join Date: Jun 2010
Location: St. Petersburg, Florida
Boat: Gemini 3200
Posts: 983
Re: Help / FAQ

I've never used layers in OpenCPN but my understanding is their purpose is to provide a "protected" space for objects you want displayed on charts. Thus, it makes sense that if you try to import a waypoint which already exists in a layer it won't be imported. The programs knows the objects are the same because they have the same guid.

Fabbian
fgd3 is offline   Reply With Quote
Old 14-03-2018, 19:08   #1344
Registered User
 
Jon Hacking's Avatar

Join Date: Sep 2010
Location: Currently cruising the Philippines, just got back from PNG & Solomons
Boat: Wauquiez 45' (now 48') catamaran
Posts: 1,093
Images: 1
Send a message via Skype™ to Jon Hacking
Re: Help / FAQ

Quote:
Originally Posted by fgd3 View Post
I've never used layers in OpenCPN but ... The programs knows the objects are the same because they have the same guid. Fabbian
Fabbian, Layers are pretty cool. I'm surprised OpenCPN doesn't do a better job with them, like putting the Layers folder in a more accessible place (like: Documents\OpenCPN\Layers on Windows), or even just creating the Layers folder for you. Since C:\ProgramData is a Hidden folder, most users don't even know how to get to C:\ProgramData\opencpn to create the Layers folder, much less put files into it. It's one of the (few) areas where MaxSea is still better (IMHO) but at least OpenCPN now has the concept of layers, which it didn't for a long time.

We publish our tracks (& waypoints, which are mostly chart annotations) on our website for other cruisers to download. I warn folks not to "Import" the .gpx files, but to put them in the Layers folder instead. This lets the user turn the displayed info on/off easily (to minimize screen clutter) & also prevents my .gpx files from polluting their own accumulated tracks, routes, & waypoints.

When I dug into my problem (above) I noticed the guids on the waypoints, but it still strikes me as strange that OpenCPN refuses to import waypoints *that are not being displayed* in a (hidden) Layer. How many users know this? I've used OpenCPN for years & never knew. How many users thought they'd imported a complete .gpx file & never even knew that some waypoints were left out? It would be helpful if OpenCPN popped up a dialog box (or something) saying something like "XXX waypoints were not imported because they're already in a layer".
__________________
-- Jon Hacking s/v Ocelot
Jon Hacking is offline   Reply With Quote
Old 15-03-2018, 05:08   #1345
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,637
Images: 2
Re: Help / FAQ

Here is what we have about layers in the wiki
Can improvements/clarifications be made?

Also FAQ about saving many waypoints to a layer
rgleason is offline   Reply With Quote
Old 15-03-2018, 08:03   #1346
Registered User
 
Jon Hacking's Avatar

Join Date: Sep 2010
Location: Currently cruising the Philippines, just got back from PNG & Solomons
Boat: Wauquiez 45' (now 48') catamaran
Posts: 1,093
Images: 1
Send a message via Skype™ to Jon Hacking
Re: Help / FAQ

Quote:
Originally Posted by rgleason View Post
Here is what we have about layers in the wiki
Can improvements/clarifications be made?
Also FAQ about saving many waypoints to a layer
Thanks for this. Improvements can ALWAYS be made

But seriously, can you show me where it says anything at all about waypoints not being imported if they're already in a Layer, even a hidden layer? I read through much of the Route & Mark Manager, and couldn't find anything about this at all, but maybe I missed something.
__________________
-- Jon Hacking s/v Ocelot
Jon Hacking is offline   Reply With Quote
Old 15-03-2018, 16:20   #1347
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,637
Images: 2
Re: Help / FAQ

John and Fabbian, if you two could come up with a few paragraphs about this, we can get them in the manual. This is somewhat new territory to me.
rgleason is offline   Reply With Quote
Old 15-03-2018, 18:15   #1348
Registered User
 
Jon Hacking's Avatar

Join Date: Sep 2010
Location: Currently cruising the Philippines, just got back from PNG & Solomons
Boat: Wauquiez 45' (now 48') catamaran
Posts: 1,093
Images: 1
Send a message via Skype™ to Jon Hacking
Re: Help / FAQ

Quote:
Originally Posted by rgleason View Post
John and Fabbian, if you two could come up with a few paragraphs about this, we can get them in the manual. This is somewhat new territory to me.
Rick, it would be helpful if I knew what the code was supposed to do. Is there a design doc or something that covers importing waypoints? Otherwise, I'm sort of guessing, as I certainly didn't know about this behavior. Since Fabbian doesn't do Layers, he probably doesn't know about this interaction either.

Pavel, you implied that you knew about the restrictions & interactions between Layers & importing waypoints. Is there a doc that explains how it's supposed to work? Or, if you know, can you write something up so Rick & I can incorporate it into the Wiki?

Thanks!
__________________
-- Jon Hacking s/v Ocelot
Jon Hacking is offline   Reply With Quote
Old 15-03-2018, 18:53   #1349
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,637
Images: 2
Re: Help / FAQ

Dear Jon,

You ask good questions.

The only document might be the Commit List, search it for "layers" then read the code. Or search the code for Layers and read the code.

For guys like you and I, it might be easier to take he Beta Test & Black Box approach:
1. Determine and document what actually happens.
2. Figure out what should happen and explain why.
3. Determine if these changes can be made by the programmers.

It appears you've already done a good part of this. Best.
rgleason is offline   Reply With Quote
Old 15-03-2018, 23:43   #1350
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,212
Re: Help / FAQ

There seriously is no design document describing that identical waypoints that already exist are discarded during import. They are discarded during import.

Pavel
nohal 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


Advertise Here


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


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.