Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 14-02-2020, 04:33   #16
Registered User

Join Date: Dec 2019
Posts: 22
Re: dynamic Ocpn_Draw boundary

Hi jongough,


Let me ask you one thing, there is a Move Boundary option on the boundary on right mouse click.



May I know how did you program this, where is the code for this option?
Which function is been called for this function?


I think if we can apply the MoveBoundary function as the boat moves with regards to GPS data.


Could you give me suggestion on these idea?
__________________

priyanka is offline   Reply With Quote
Old 14-02-2020, 13:47   #17
Registered User

Join Date: May 2013
Location: NSW, Australia
Boat: Richter 42
Posts: 967
Re: dynamic Ocpn_Draw boundary

The move boundary is to allow users to drag the boundary to a new spot. It does this by using increments in Lat and Lon created by the movement of the mouse and applying this change to all points that make up the boundary. If you look in Boundary.cpp you will find the MoveAllPoints function that does this.


The MoveAllPoints function is called from ocpn_draw_pi.cpp in the MouseEventHook function and the 'event.Dragging' area. There is no API way to get to this function.


What I think you want to do is more complicated than this as you are also going to rotate the boundary so that it stays aligned with the heading. This is part of what the Guard Zones do. So I think it would have to be another object type that allows for the correct drawing and movement of the boundary. It may be that a new subtype of Boundary is needed to add these new functions.
__________________

jongough is offline   Reply With Quote
Old Yesterday, 03:47   #18
Registered User

Join Date: Dec 2019
Posts: 22
Re: dynamic Ocpn_Draw boundary

Is there any possible way to replace the shape of Guardzone from circle to atleast a rectangle by just modifying the function, bool ocpn_draw_pi::CreateGZLeftClick( wxMouseEvent &event )?


The only thing matter is the shape of the boundary right? the other functionalities are same.

ie Draw the boundary using Mouse events with respect to the center of the boat.
As an initial step I would like to implement at least a rectangle boundary moving with the boat.

If you have any idea regarding this, please let me know.
priyanka is offline   Reply With Quote
Old Yesterday, 04:02   #19
Registered User

Join Date: Dec 2019
Posts: 22
Re: dynamic Ocpn_Draw boundary

Is there any possible way to replace the shape of Guardzone from circle to atleast a rectangle by just modifying the function, bool ocpn_draw_pi::CreateGZLeftClick( wxMouseEvent &event )?


The only thing matter is the shape of the boundary right? the other functionalities are same.

ie Draw the boundary using Mouse events with respect to the center of the boat.
As an initial step I would like to implement at least a rectangle boundary moving with the boat.

If you have any idea regarding this, please let me know.
__________________

priyanka is offline   Reply With Quote
Reply

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
Needed: Ocpn_draw boundaries for the Caribbean Islands rgleason OpenCPN 1 03-05-2018 16:32
Ocpn-Draw and Boundary rgleason OpenCPN 1386 29-11-2016 13:51
Rookie questions - boundary circles; exporting options; GPX files fredgmeyer OpenCPN 5 23-05-2014 22:22
Buoys out in Boundary Bay, BC Carogan Liveaboard's Forum 0 27-08-2012 06:41
For Sale: Cascade Designs Seal Line Boundary 70 Dry Bag thesparrow Classifieds Archive 0 14-03-2011 15:27

Advertise Here


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


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.