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-02-2022, 13:52   #16
Registered User

Join Date: Jul 2018
Location: SF Bay Area
Boat: Other people's boats
Posts: 1,108
Re: Navigational Warning Msgs from NGA.mil

I would be very happy to see something similar for the local notices to mariners. My practice with those is to do similar to what I believe svonadym has in mind, e.g. adding a note to the chart whenever applicable. Attached are two examples, one a point, the other a point and range. (Where it to include a number of coordinates I'd use them to mark out a polygon.)


There is a daily LNM update described and linked to from here: https://www.navcen.uscg.gov/?pageNam...ailyDiscrepXML

It only includes data from sections II and III unfortunately; I also update my charts to reflect the entries in sections I and VII.
Attached Thumbnails
Click image for larger version

Name:	LNM-example.jpg
Views:	46
Size:	52.6 KB
ID:	252606   Click image for larger version

Name:	LNM-example-2.jpg
Views:	50
Size:	51.3 KB
ID:	252610  

requiem is offline   Reply With Quote
Old 07-02-2022, 14:59   #17
Registered User
 
Antipole's Avatar

Join Date: Oct 2019
Location: Emsworth, UK
Boat: Alubat Ovni 395
Posts: 292
Re: Navigational Warning Msgs from NGA.mil

Quote:
Originally Posted by svonadym View Post
Perhaps the amount of work exceeds the usability, but plotting these points with a mention of the warning number, type (e.g., "hazardous operations") and cancel date would be ideal.

Is it easier to access and open the compressed message, then translate the formatted text, or to parse the plain text after being pasted to a TXT file or UI? Is this endeavor too much hassle for the benefit?
Suggest you post here a text file containing several examples (6?) so we can see the pattern of them. No promises but we could have a look.
Antipole is offline   Reply With Quote
Old 07-02-2022, 17:54   #18
Registered User
 
SeanPatrick's Avatar

Join Date: Dec 2012
Location: Norfolk, VA USA
Posts: 667
Re: Navigational Warning Msgs from NGA.mil

FWIW, I was able to get the points into OpenCPN in a matter of a minute or two without much fuss. I used the link provided by Nohal in post #3, but I could just as easily have used the text below.

Quote:
Originally Posted by svonadym View Post
32-36N 118-20W, 32-12N 119-18W,
32-22N 119-28W, 32-32N 119-18W,
33-02N 118-38W.
The process I use goes something like this:
  1. Copy and paste the coordinates into Excel.
  2. Convert from DMS to decimal degrees (one can use formulas to make this step "automatic").
  3. Ensure the columns have "headers" (labels at the top of the column indicating what they are, i.e.: Name, Lat., Lon.)
  4. Save as CSV.
  5. Use GPSBabel to convert to GPX waypoints.
  6. Import into OpenCPN.
  7. Connect the dots. (Haven't figured out how to make GPSBabel do this in a way that makes sense yet.)
See attached screenshots (click to enlarge). Maybe not the most elegant solution, but it works and - as I said - is relatively painless. Beats entering them all manually, anyway.

Cheers!

Click image for larger version

Name:	Screenshot (96).jpg
Views:	48
Size:	212.0 KB
ID:	252623

Click image for larger version

Name:	Screenshot (97).jpg
Views:	47
Size:	277.5 KB
ID:	252624
__________________
If you have any questions about celestial navigation, ask me!
Celestial Navigation Spreadsheet
NavList Celestial Navigation Forum
SeanPatrick is offline   Reply With Quote
Old 07-02-2022, 18:37   #19
Registered User

Join Date: Jul 2018
Location: SF Bay Area
Boat: Other people's boats
Posts: 1,108
Re: Navigational Warning Msgs from NGA.mil

My instinct with this is to use the Draw plugin to annotate the zones. It appears to accept CSV (at least with some tweaking), which means you can omit the GPSBabel step.

ref: https://opencpn-manuals.github.io/ma...0.1/index.html

Example using your coordinates:
Code:
'c','type(B)','name','boundary_type','visible(t/f)','line rgb-colour','rgb-fill-colour'
'B','Obscure Warning','Exclusion','t','rgb(0,255,0)','rgb(255,0,0)'
'c','type(BP)','name',lat,lon,'boundary_type','visible','rings-visible(t/f)','rings-number','rings-step','rings-units(N/K)','rings-colour'
'BP','first',32.6,-118.3333333
'BP','second',32.2,-119.3
'BP','third',32.36666667,-119.4666667
'BP','fourth',32.53333333,-119.3
'BP','fifth',33.03333333,-118.6333333
'/B'
requiem is offline   Reply With Quote
Old 08-02-2022, 17:11   #20
Registered User
 
svonadym's Avatar

Join Date: Jan 2019
Location: Pacific Northwest
Boat: Cape Dory 25D
Posts: 46
Re: Navigational Warning Msgs from NGA.mil

Quote:
Originally Posted by Antipole View Post
Suggest you post here a text file containing several examples (6?) so we can see the pattern of them. No promises but we could have a look.
I much appreciate any additional thoughts on the matter.

Here's a PDF with 11 examples received over the past month or two. Text file uploads are limited to 1KB and my original was 5KB, therefore the PDF. Hopefully it's not too much of an inconvenience.
Attached Files
File Type: pdf Nav Warning Examples.pdf (68.8 KB, 30 views)
svonadym is offline   Reply With Quote
Old 10-02-2022, 03:57   #21
Registered User
 
Antipole's Avatar

Join Date: Oct 2019
Location: Emsworth, UK
Boat: Alubat Ovni 395
Posts: 292
Utility to add NGA objects

Having examined the sample messages you posted, I conclude that the free form makes it too hard to automate completely.

So I have created a script for the JavaScript plugin that presents a form into which you can paste the relevant information.

As as an example
Quote:
050613Z FEB 22
NAVAREA XII 68/22(18).
EASTERN NORTH PACIFIC.
CALIFORNIA.
1. HAZARDOUS OPERATIONS 101430Z TO 110130Z AND
111430Z TO 112100Z FEB IN AREA BOUND BY
32-36N 118-20W, 32-12N 119-18W,
32-22N 119-28W, 32-32N 119-18W,
33-02N 118-38W.
2. CANCEL THIS MSG 112200Z FEB 22.
You would enter this in the form thus:



On selecting enter the script checks that the position coordinates and expiry data (if any) are in the correct format. It then creates an object in OpenCPN.

If only one position is provided, it creates a waypoint and incorporates the description and expiry date in the description field.

If more than one position is provided, it creates a closed route with the positions as routepoints. The plugin is unable to access a route's description field, so it stashes the description in the From attribute and the expiry in the To field.

In both cases, the name is prefixed with the tag NGA:

Expiries

When the script starts up, it first checks for previously created tagged objects and examines their expiry date.

If they have expired, it presents the option to delete them.

Using the utility
I have put this script in the shared scripts library. To use it, download the script and store it somewhere. Then load it into the scripts pane of the JavaScript plugin and run it.

The script assumes the positions and expiry date are as formatted in NGA notices. If you want to use it with other formats, it would need tweaking.

Enjoy
Attached Thumbnails
Click image for larger version

Name:	NGAScreenshot.png
Views:	187
Size:	93.1 KB
ID:	252727  
Antipole is offline   Reply With Quote
Old 10-02-2022, 10:09   #22
Registered User
 
svonadym's Avatar

Join Date: Jan 2019
Location: Pacific Northwest
Boat: Cape Dory 25D
Posts: 46
Re: Navigational Warning Msgs from NGA.mil

Thank you for all your effort, Antipole. The script seems to work very nicely for me. There are a couple tweaks I was hoping to make, but I don't know enough to do it:


1. Any attempt to paste multiple lines of text into the Description field fails. It only pastes the first line.


2. For waypoints, I'd like to display the Name by default. (I presume this is managed through OCPNaddSingleWaypoint().

Can I make a simple change to the script for these?
Thanks again
svonadym is offline   Reply With Quote
Old 10-02-2022, 23:23   #23
Registered User
 
Antipole's Avatar

Join Date: Oct 2019
Location: Emsworth, UK
Boat: Alubat Ovni 395
Posts: 292
Re: Navigational Warning Msgs from NGA.mil

Quote:
Originally Posted by svonadym View Post
1. Any attempt to paste multiple lines of text into the Description field fails. It only pastes the first line.

2. For waypoints, I'd like to display the Name by default. (I presume this is managed through OCPNaddSingleWaypoint().
1. Fixed - I had mis-capitalised multiLine in the field specification.

2. A sensible choice. You need to add isNameVisible:true to the waypoint attributes, as described in the user guide.

I have made both changes to the NGA.js script. It is updated in the library. Re-download it from here.
Antipole is offline   Reply With Quote
Old 11-02-2022, 13:03   #24
Registered User
 
svonadym's Avatar

Join Date: Jan 2019
Location: Pacific Northwest
Boat: Cape Dory 25D
Posts: 46
Re: Navigational Warning Msgs from NGA.mil

Terrific! Thank you.
svonadym is offline   Reply With Quote
Old 04-03-2022, 13:58   #25
Registered User

Join Date: Mar 2012
Location: Florida
Boat: DeFever 41
Posts: 79
Re: Navigational Warning Msgs from NGA.mil

I cannot seem to get the NGA info in any format other than dd-mm-ssN dd-mm-ssW here on the east coast. Is there any easy way to convert to the dd-mmN dd-mmW format? or would it be possible to modify the j-script to accommodate the dd-mm-ssN dd-mm-ssW format?

Here's an example of what I get using two different options at the NGA site:
28-35-55N 080-35-07W, 28-36-00N 080-32-00W,
28-35-00N 080-24-00W, 28-22-00N 080-00-00W,
28-19-00N 080-02-00W, 28-30-33N 080-33-04W, 28-32-11N 080-33-45W

Thanks for any suggestions!
__________________
MV Sanderling - DeFever 41 has been sold
Blog: mvsanderling.net/blog
Sanderling.hopto.org
BobMc is offline   Reply With Quote
Old 05-03-2022, 03:16   #26
Registered User
 
Antipole's Avatar

Join Date: Oct 2019
Location: Emsworth, UK
Boat: Alubat Ovni 395
Posts: 292
Re: Navigational Warning Msgs from NGA.mil

Quote:
Originally Posted by BobMc View Post
I cannot seem to get the NGA info in any format other than dd-mm-ssN dd-mm-ssW here on the east coast. Is there any easy way to convert to the dd-mmN dd-mmW format? or would it be possible to modify the j-script to accommodate the dd-mm-ssN dd-mm-ssW format?
Dead easy actually. This is all handled in the formDegs sub-function, which splits the string at the '-'. JavaScript really is a delight for this sort of thing.

I have updated the script in the library to handle both with or without seconds. You need re-download it, of course.
Antipole is offline   Reply With Quote
Old 05-03-2022, 05:19   #27
Registered User

Join Date: Mar 2012
Location: Florida
Boat: DeFever 41
Posts: 79
Re: Navigational Warning Msgs from NGA.mil

It work perfectly, now, with the change you made. Thank you for your help!
__________________
MV Sanderling - DeFever 41 has been sold
Blog: mvsanderling.net/blog
Sanderling.hopto.org
BobMc is offline   Reply With Quote
Reply

Tags
navigation


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
Canada Navigational Warning App Kelkara Navigation 1 27-02-2021 16:25
Charts II: NGA - 2700 Charts cagney OpenCPN 1292 23-12-2013 08:46
new navigational warning light Naxos beneteau-500 Europe & Mediterranean 0 28-11-2013 01:15
Navigational warning Jim Thomsen Challenges 7 25-10-2008 04:34
NGA weekly piracy reports available Hud3 Health, Safety & Related Gear 2 15-07-2008 11:08

Advertise Here


All times are GMT -7. The time now is 16:21.


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.