Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 10-08-2018, 14:54   #1
Registered User

Join Date: Aug 2018
Location: Stockholm, Sweden
Boat: Smuggler 24
Posts: 6
I did a thing: "Auto-routing" from existing routes

I don't know if I've done something totally unnecessary, but:

I wanted to create several routes to different places in the Stockhholm archipelago, where the routes often start out with the exact same route for the first 5 nm (Leave harbor, cross first large open water, enter a narrower channel, etc.).

When creating routes in OpenCPN I couldn't find how to make a 'complete route' from common 'route parts'.

I don't know if what I did is 'wrong' but I created one complete route from A->B, then created 'branches' out from this route to other places (lets say C and D).

To be able to export to gps (or just activate) a single route from A via E to D, I created a utility program that reads navobj.xml and builds 'auto routes' that take waypoints from all manually created routes, and builds new routes.

Route parts are only 'connected' if they re-use the exact same waypoint in multiple routes.

The auto-routes are configured by creating a placeholder route in OpenCPN named e.g. "A, E, D (auto)" with 2 dummy points (coordinates not important).

This route is then updated by my utility (after closing OpenCPN).

Then just start OpenCPN again and the auto route is there.

The utility is written in C# (.Net Core) and:
  1. Builds a graph of all routes in OpenCPN. The routes in the graph 'connect' when using the same waypoint.
  2. For each 'auto route' to update: Find the shortest path (weighted by distance) that visits all waypoints in the order specified in the routes name.
  3. Update the auto-route with the shortest path and overwrite navobj.xml with this data.
Is this something anyone but me is interested in? Maybe the feature could be converted to OpenCPN (C/C++) even though the C# .exe is kind of generic for all gpx route files now.

...or was this feature already in OpenCPN
__________________

TeknikFrik is offline   Reply With Quote
Old 12-08-2018, 02:42   #2
Registered User

Join Date: Jan 2013
Location: Seward, AK
Boat: Rawson 30 PH
Posts: 144
Re: I did a thing: "Auto-routing" from existing routes

That would be nice for auto pilot also, set the route for the well traveled part, then add branches for each trip. Not that I have built my auto pilot yet...


Sent from my iGloo.
__________________

joel383 is offline   Reply With Quote
Old 13-08-2018, 03:57   #3
Registered User

Join Date: Sep 2012
Location: Baikal
Posts: 390
Re: I did a thing: "Auto-routing" from existing routes

It is very necessary to check the route for danger when planning
Baikal is offline   Reply With Quote
Old 13-08-2018, 04:15   #4
Registered User

Join Date: Aug 2018
Location: Stockholm, Sweden
Boat: Smuggler 24
Posts: 6
Re: I did a thing: "Auto-routing" from existing routes

Quote:
Originally Posted by Baikal View Post
It is very necessary to check the route for danger when planning
The "auto" routing only uses existing routes made manually in OpenCpn. Combining parts of different routes together should not be dangerous.
TeknikFrik is offline   Reply With Quote
Old 13-08-2018, 05:40   #5
Registered User

Join Date: Sep 2012
Location: Baikal
Posts: 390
Re: I did a thing: "Auto-routing" from existing routes

Is it possible to realize fully automatic route routing according to the map data and ship parameters?
Baikal is offline   Reply With Quote
Old 13-08-2018, 06:06   #6
Registered User

Join Date: Aug 2018
Location: Stockholm, Sweden
Boat: Smuggler 24
Posts: 6
Re: I did a thing: "Auto-routing" from existing routes

Quote:
Originally Posted by Baikal View Post
Is it possible to realize fully automatic route routing according to the map data and ship parameters?
Not with this code, it needs existing routes.
TeknikFrik is offline   Reply With Quote
Old 17-08-2018, 05:28   #7
Registered User

Join Date: Aug 2018
Location: Stockholm, Sweden
Boat: Smuggler 24
Posts: 6
Re: I did a thing: "Auto-routing" from existing routes

There's now code and a built binary for dotnet core at


https://github.com/awabom/autoroute/...er/binarybuild


You need dotnet core framework (client version) installed and just run


dotnet AutoRoute.dll <path to navobj.xml>


(after unzipping into a directory)



Note: Don't blame me if the xml file is corrupted
__________________

TeknikFrik is offline   Reply With Quote
Reply

Tags
route

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Existing Waypoint tolerance in Routing sailingjazz OpenCPN 0 29-11-2016 01:22
Name One Thing You Love and One Thing You Hate About Cruising ty.gregory The Sailor's Confessional 54 20-03-2015 11:10
Insert existing waypoint into existing route? Beausoleil OpenCPN 16 17-06-2012 06:49
A REALLY Stupid Thing Done While Doing a Stupid Thing Dick Pluta The Sailor's Confessional 31 28-04-2010 18:00



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 00:52.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.