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 31-10-2013, 10:56   #1
Registered User

Join Date: May 2012
Posts: 1,245
DR Plugin - splitting up GPX route files

To assist route planning I wanted to make a route file that showed DR positions at user specified intervals. This is the result.

SaltyPaws work with the SAR plugin provided a template.

Install the plugin in the usual way. (Remove .pdf from the file and unzip )

The DR plugin uses a GPX route file that you have saved as input. Using the speed and time required between DR positions it creates a new route file. You can name the new file in the text box.

Using the routes manager you can calculate times at each of the DR positions, which could help predict crossing of traffic lanes, change of watch etc etc.

The windows version will follow shortly.

Source at https://github.com/Rasbats/DR_pi

Mike
Attached Files
File Type: pdf libDR_pi.so.7z.pdf (151.5 KB, 94 views)
Rasbats is online now   Reply With Quote
Old 31-10-2013, 11:04   #2
Registered User

Join Date: May 2012
Posts: 1,245
Re: DR Plugin - splitting up GPX route files

Here is the Windows version - tested on Win7. Does not want to play on WinXP at the moment.

(Remove the .pdf extension)

Mike
Attached Files
File Type: pdf DR_pi.dll.pdf (136.5 KB, 93 views)
Rasbats is online now   Reply With Quote
Old 31-10-2013, 11:24   #3
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Re: DR Plugin - splitting up GPX route files

The file "bitmaps.h" is missing in the src directory.
cagney is offline   Reply With Quote
Old 31-10-2013, 12:18   #4
Registered User

Join Date: May 2012
Posts: 1,245
Re: DR Plugin - splitting up GPX route files

Thanks.

Bitmaps.cpp (and Bitmaps.h) are not needed.

I am not used to working with git.

While I work out how to update the repository please edit CMakeLists.txt and delete the Bitmaps.cpp/Bitmaps.h line. And you can delete Bitmaps.cpp from the src folder.

Mike
Rasbats is online now   Reply With Quote
Old 31-10-2013, 13:16   #5
Registered User

Join Date: May 2012
Posts: 1,245
Re: DR Plugin - splitting up GPX route files

The git repository has been emptied while I work out how to use it!!!!

Mike
Rasbats is online now   Reply With Quote
Old 01-11-2013, 01:17   #6
Registered User

Join Date: May 2012
Posts: 1,245
Re: DR Plugin - splitting up GPX route files

Github is fixed, I hope!

Source code at https://github.com/Rasbats/DR_pi.

Now to work out why the DR_pi on WinXP is not working!

Mike
Rasbats is online now   Reply With Quote
Old 01-11-2013, 03:39   #7
Registered User

Join Date: Feb 2010
Posts: 619
Re: DR Plugin - splitting up GPX route files

Quote:
Originally Posted by Rasbats View Post
To assist route planning I wanted to make a route file that showed DR positions at user specified intervals.
This is certainly a very much needed function and a great beginning!

Similar function can be acheived now using track-to-route in the Route Manager. For now it still seems maybe a little simpler...

To draw a track, use "Move boat here" to start of the planned leg, "Track On", then "Move boat here" to the end of the leg. The resulting track can be converted to route. Conversion assumes fixed speed taken from the last used Route Properties "Plan Speed" field and waypoints are dropped at some intervals that depend on trackpoint interval setting ( but I forgot how I programmed it exactly , since I never used anything but the default 4 hours).

The drawback is that this cannot be done during actual tracking when underway, so your plugin can help in this situation (but a route-to-track function might still be simpler to use - less fiddling with files).

I am sure this plugin will grow to a comprehensive planning tool...
Attached Thumbnails
Click image for larger version

Name:	split_route.jpg
Views:	272
Size:	32.8 KB
ID:	69655  
PjotrC is offline   Reply With Quote
Old 01-11-2013, 03:57   #8
Registered User

Join Date: May 2012
Posts: 1,245
Re: DR Plugin - splitting up GPX route files

WinXP problem solved, I hope.

The last DR_pi.dll was compiled against OpenCPN 3.3.910.

DR_pi has now been compiled against the stable release 3.2.2 using WinXP and this version works fine with both WinXP and Win7, with OpenCPN 3.2.2 and 3.3.910.

The plugin is attached. Please remove the .pdf extension.

Mike
Attached Files
File Type: pdf DR_pi.dll.pdf (135.0 KB, 80 views)
Rasbats is online now   Reply With Quote
Old 01-11-2013, 08:36   #9
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,571
Re: DR Plugin - splitting up GPX route files

Rasbats...

Re compiling PlugIns:

Unless you need some API function that is not present in 3.2.2, then compiling against 3.2.2 should produce a PlugIn that works for 3.3.x.

If it does not, that represents a bug, and we need to know about it...

Thanks
Dave
bdbcat is offline   Reply With Quote
Old 02-11-2013, 06:14   #10
Registered User
 
AISEAG's Avatar

Join Date: May 2012
Location: Dahouet (Brittany)
Boat: BENETEAU
Posts: 492
Re: DR Plugin - splitting up GPX route files

Hello,

A project has been open on Tracker/Flyspray.

OpenCPN::Tracker pi - DR Beta: Tasklist


Do not hesitate to :
- enter the features you want to be implemented
- declare the bugs
- Vote for the most wanted features
- ...


Serge
AISEAG is offline   Reply With Quote
Old 05-11-2013, 10:37   #11
Registered User

Join Date: May 2012
Posts: 1,245
Re: DR Plugin - splitting up GPX route files

Working with the main OpenCPN at the moment to investigate whether a DR function could be incorporated into RouteManager.

In a new function written into Navutil.cpp I have the following:

quote:
if (routepointN[i] == (int) 1) { //wxMessageBox(_T("ere"),_T("ere")); //} // Routepoint

newPoint = new RoutePoint();
newPoint->m_bIsolatedMark = false;
newPoint->m_IconName = _T("diamond");
newPoint->m_bIsVisible = true;
newPoint->m_bShowName = false;
newPoint->m_bKeepXRoute = false;

newPoint->m_lat = latN[i];
newPoint->m_lon = lonN[i];

newRoute->AddPoint( newPoint );
pSelect->AddSelectableRoutePoint( newPoint->m_lat, newPoint->m_lon, newPoint );
pConfig->AddNewWayPoint( newPoint, -1 );
pWayPointMan->m_pWayPointList->Append( newPoint );
}
else{
newPoint = new RoutePoint();
newPoint->m_bIsolatedMark = false;
newPoint->m_IconName = _T("circle");
newPoint->m_bIsVisible = true;
newPoint->m_bShowName = false;
newPoint->m_bKeepXRoute = false;

newPoint->m_lat = latN[i];
newPoint->m_lon = lonN[i];

newRoute->AddPoint( newPoint );
pSelect->AddSelectableRoutePoint( newPoint->m_lat, newPoint->m_lon, newPoint );
pConfig->AddNewWayPoint( newPoint, -1 );
pWayPointMan->m_pWayPointList->Append( newPoint );
}
unquote:

But ... it always produces the waypoint symbol "circle" for the RoutePoints. For the original RoutePoints I want to use a "diamond" and for the new DR positions a "circle".

Can anybody advise where I am going wrong?

Many thanks.
Mike
Rasbats is online now   Reply With Quote
Old 05-11-2013, 12:31   #12
Registered User

Join Date: May 2012
Posts: 1,245
Re: DR Plugin - splitting up GPX route files

Sorry, I found the answer - ReloadIcon()

Mike
Rasbats is online now   Reply With Quote
Old 06-11-2013, 00:27   #13
Registered User

Join Date: Feb 2010
Posts: 619
Re: DR Plugin - splitting up GPX route files

Rasbats,

While you are at it, would it be possible to consider producing a Track with the same waypoints as the Route you are building? Just plain, default track, "empty" waypoint marks, etc... ? Perhaps an option - output route or track.

This would be very useful for drawing annotations on charts - route is easier to draw, but then one needs to get rid of the waypoint marks and arrows.

Thanks,

Piotr
PjotrC is offline   Reply With Quote
Old 06-11-2013, 02:23   #14
Registered User
 
AISEAG's Avatar

Join Date: May 2012
Location: Dahouet (Brittany)
Boat: BENETEAU
Posts: 492
Re: DR Plugin - splitting up GPX route files

Quote:
Originally Posted by PjotrC View Post
Rasbats,

... would it be possible to consider producing a Track with the same waypoints as the Route you are building?....
Piotr
Piotr,

The project "Pi- DR" has been open into Tracker/Flyspray to allow users to put all their requests (new features, buggs...) concerning this pluging.

Do not hesitate to use it.

Thanks

Serge
AISEAG is offline   Reply With Quote
Old 06-11-2013, 03:25   #15
Registered User

Join Date: Feb 2010
Posts: 619
Re: DR Plugin - splitting up GPX route files

Serge,

pi* would refer to a plugin, which I think is a bit heavy for this simple task...

The recent discussion refers to the "main OpenCPN" Route Manager, and may be quite interesting...



P.
PjotrC is offline   Reply With Quote
Reply

Tags
plug, 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


Advertise Here


All times are GMT -7. The time now is 10:51.


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.