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 04-06-2018, 15:25   #1
Registered User

Join Date: Feb 2017
Location: Southern California
Posts: 109
Making track lines for marine closures

I downloaded a GPX file of some existing marine closures which are shown as track lines on my charts like this:

Click image for larger version

Name:	1.JPG
Views:	125
Size:	110.8 KB
ID:	171088


I need to add some additional closures such as this. How can I go about entering them as tracks, just as the other ones are?


Click image for larger version

Name:	2.JPG
Views:	89
Size:	134.2 KB
ID:	171089


I see that I can enter waypoints and convert that into a route, but i'd rather have them as tracks so they show the same as the others.


I tried exporting the GPX and editing it, but the numbers for the tracks are in a different format than what is being used within ocpn. Why are they the same as what is being used for waypoints?



<name>Anacapa Island</name>
<extensions>
<opencpn:guid>20900000-8991-4b82-a32d-8b73454effff</opencpn:guid>
<opencpn:viz>1</opencpn:viz>
<opencpn:style width="3" />
<gpxx:TrackExtension>
<gpxxisplayColor>Red</gpxxisplayColor>
</gpxx:TrackExtension>
</extensions>
<trkseg>
<trkpt lat="34.064961746" lon="-119.409999987">
<time>2017-03-13T00:58:01Z</time>
</trkpt>
<trkpt lat="34.064962668" lon="-119.409999987">
<time>2017-03-13T00:58:01Z</time>
</trkpt>
<trkpt lat="34.064847920" lon="-119.409326501">
<time>2017-03-13T00:58:01Z</time>
</trkpt>
<trkpt lat="34.064660836" lon="-119.408300389">
<time>2017-03-13T00:58:01Z</time>
</trkpt>
J805 is offline   Reply With Quote
Old 04-06-2018, 16:24   #2
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,211
Re: Making track lines for marine closures

Quote:
I see that I can enter waypoints and convert that into a route, but i'd rather have them as tracks so they show the same as the others.
You do not need to create waypoints to create a route. It is pretty simple to modify a GPX file in a decent text editor and convert route to track (replace "rtept" with "trkpt", wrap all trkpt tags in a trkseg tag, replace "rte" with "trk", remove the unnecessary extensions, done)
Quote:
I tried exporting the GPX and editing it, but the numbers for the tracks are in a different format than what is being used within ocpn.
What do you mean? In GPX, all the "numbers" (if you mean latitudes and longitudes) are decimal degrees. Always. They do not necessarily always use the same number of decimal places but that is no problem, unless you care about milimeter precision.
Quote:
Why are they the same as what is being used for waypoints?
What do you mean?

Quote:
<name>Anacapa Island</name>
<extensions>
<opencpn:guid>20900000-8991-4b82-a32d-8b73454effff</opencpn:guid>
<opencpn:viz>1</opencpn:viz>
<opencpn:style width="3" />
<gpxx:TrackExtension>
<gpxxisplayColor>Red</gpxxisplayColor>
</gpxx:TrackExtension>
</extensions>
<trkseg>
<trkpt lat="34.064961746" lon="-119.409999987">
<time>2017-03-13T00:58:01Z</time>
</trkpt>
<trkpt lat="34.064962668" lon="-119.409999987">
<time>2017-03-13T00:58:01Z</time>
</trkpt>
<trkpt lat="34.064847920" lon="-119.409326501">
<time>2017-03-13T00:58:01Z</time>
</trkpt>
<trkpt lat="34.064660836" lon="-119.408300389">
<time>2017-03-13T00:58:01Z</time>
</trkpt>
This is incomplete, and as such invalid GPX that we of course can't handle.

A complete minimal track in GPX will look like this:
Code:
  <trk>
    <name>Not needed, but we like to have one</name>
    <trkseg>
      <trkpt lat="37.809265000" lon="-122.448863333"></trkpt>
      <trkpt lat="37.809055000" lon="-122.448531667"></trkpt>
      <trkpt lat="37.808903333" lon="-122.448125000"></trkpt>
      <trkpt lat="37.808575000" lon="-122.447461667"></trkpt>
    </trkseg>
  </trk>
nohal is offline   Reply With Quote
Old 04-06-2018, 17:10   #3
Registered User

Join Date: Feb 2017
Location: Southern California
Posts: 109
Re: Making track lines for marine closures

Thanks, this makes more sense now. But how do I convert a standard ocpn waypoint format to decimal for the GPX file?



Is there a conversion tool somewhere to turn 33 59.300 to 33.988333333
J805 is offline   Reply With Quote
Old 04-06-2018, 17:19   #4
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,402
Re: Making track lines for marine closures

J805...

"Is there a conversion tool somewhere to turn 33 59.300 to 33.988333333 "

Manual calculator.

59.300 / 60 = .988333333

Dave
bdbcat is online now   Reply With Quote
Old 04-06-2018, 17:19   #5
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,211
Re: Making track lines for marine closures

Quote:
Originally Posted by J805 View Post
Thanks, this makes more sense now. But how do I convert a standard ocpn waypoint format to decimal for the GPX file?



Is there a conversion tool somewhere to turn 33 59.300 to 33.988333333
Either switch OpenCPN to use decimal degree format (Toolbox->Display->Units) or learn to do the conversion from degrees and minutes to degrees, which is trivial math
Code:
DD MM.MMM => DD+(MM.MMM/60)
nohal is offline   Reply With Quote
Old 04-06-2018, 17:28   #6
Registered User

Join Date: Feb 2017
Location: Southern California
Posts: 109
Re: Making track lines for marine closures

Ahhh, got it now. Thank you guys for the help, much appreciated.



Sorry, i'm newbie to all this.
J805 is offline   Reply With Quote
Reply

Tags
marine


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
Making sense of raymarine, making a system. northoceanbeach Marine Electronics 13 21-08-2015 14:01
Track lines Ivanm OpenCPN 5 09-02-2015 05:38

Advertise Here


All times are GMT -7. The time now is 13:59.


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.