Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 07-02-2020, 02:14   #1
Registered User

Join Date: Dec 2019
Posts: 22
dynamic Ocpn_Draw boundary

Hi All,


I have attached a screenshot, where I have created 3 boundary zones around my ownship. I want these boundaries dynamically move along with my ownship in real time.


I have not tested this in real time.



Anyone has a solution for this problem?
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2020-02-06 18-52-06.jpg
Views:	58
Size:	350.5 KB
ID:	208270  
__________________

priyanka is offline   Reply With Quote
Old 07-02-2020, 05:24   #2
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 13,774
Re: dynamic Ocpn_Draw boundary

Look in the manual I believe it explains how to achieve this.
__________________

rgleason is offline   Reply With Quote
Old 07-02-2020, 06:02   #3
Registered User

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

Hi rgleason,


I couldn't find anything in the manual. My idea is to move the boundaries as well when the boat moves. There is a Move Boundary option when we right click on the boundary.

But I don't know how to connect this with the GPS location of the boat.
priyanka is offline   Reply With Quote
Old 07-02-2020, 06:17   #4
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 13,774
Re: dynamic Ocpn_Draw boundary

Try Guard Zone
https://opencpn.org/wiki/dokuwiki/do...#guard_zone_gz


also
https://opencpn.org/wiki/dokuwiki/do...g_interactions


If you want something else enter it into flyspray as a feature request under ocpn_draw. Jon miight consider it.
rgleason is offline   Reply With Quote
Old 07-02-2020, 06:29   #5
Registered User

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

Hi rgleason,


I actually need an rounded rectangle for my project.


Thats why I dont go for GaurdZone.
priyanka is offline   Reply With Quote
Old 07-02-2020, 09:12   #6
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 13,774
Re: dynamic Ocpn_Draw boundary

Ok, its opensource and you can fork the repository, or make a feature request in tracker. See the main website page for the link to tracker
rgleason is offline   Reply With Quote
Old 08-02-2020, 12:48   #7
Registered User

Join Date: Feb 2016
Posts: 114
Re: dynamic Ocpn_Draw boundary

Just curious: what are you trying to do with the zones?
teppokurki is offline   Reply With Quote
Old 09-02-2020, 00:48   #8
Registered User

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

Hi

I need to do a project, where zones are for collision detection.
The boat uses inland watering, so I dont need circular zones.
I think in this case I need to replace GZ with corresponding rounded rectangles.
I am really still stuck in that area.

There is a createGZ function in ocpndraw, and I am a beginner, really dont know how to modify this function.

May I know who all are expert in this area in our forum, so that I can get some suggestions.?
priyanka is offline   Reply With Quote
Old 09-02-2020, 02:44   #9
Registered User

Join Date: Feb 2016
Posts: 114
Re: dynamic Ocpn_Draw boundary

Just drawing them on the map wonít do much for detection - are you planning computational detection as well?

Much depends on your programming skills, but a web map with own and other vesselsí data as Signal K would be a much more compact environment for a project. Youíd have a much wider googlable resource base with something like Leaflet.
teppokurki is offline   Reply With Quote
Old 09-02-2020, 05:58   #10
Registered User

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

Hi,

I need to use OpenCPN for this project.
Shall we link Leaflet with OpenCPN.
I also need to do some computational detection, but for now just fire alarm when an object enter in the GZ.
I have contacted one Jon, but didnot get any reply. May be he is not the same person you were talking about.
Could you give me his fullname, so that I can send a private message.
priyanka is offline   Reply With Quote
Old 09-02-2020, 10:27   #11
Registered User
 
Franziska's Avatar

Join Date: Mar 2011
Location: Panschwitz, Germany
Boat: Woods Mira 35 Catamaran
Posts: 1,533
Re: dynamic Ocpn_Draw boundary

Little fun aside, looks like the OP is from SpaceX or the next Elon Musk :-)
See the icon used. Lol.
Franziska is offline   Reply With Quote
Old 09-02-2020, 18:42   #12
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 13,774
Re: dynamic Ocpn_Draw boundary

Quote:
Originally Posted by teppokurki View Post
Just drawing them on the map wonít do much for detection - are you planning computational detection as well?

Yes, but Guard Zones can become an alarm in Watchdog!
All he needs is a new type of guard zone, the code is all there except changing the shape of the guard zone and calculations for inside or outside.


I understand the shape is to be more suitable for inland. Would you mind explaining exactly why this would be more useful?


Also what parameters should be user variables for the shape? Width and Length? Position of boat within the shape? Best to be specific.



Jon will respond I am sure.
rgleason is offline   Reply With Quote
Old 09-02-2020, 19:41   #13
Registered User

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

Guard Zones are designed to be boundaries that move with the boat. They are based on circles as they equivalent to what can be done with radar. Until now there has not been a request such as this.


Both Boundaries and Guard Zones work with the Watchdog plugin to allow alarms to be set and triggered (your 'screenshot' shows this). It may be possible to add functionality to Boundaries to move them with the boat, but then comes the issue of where within (or outside) the boundary does the boat exist? This would require another 'point' which allow the boundary to move/rotate with the boat (much like a guard zone does). The next question is how to set accurately the boat offset from a known boundary point and the angle which is required. It may be that a new type of guard zone is required to change the shape from annular to rectangular (do you really need rounded corners?).


This will all take a bit of thinking about as well as defining to help make what you want. If you take a fork of my repository you could try this out yourself to see how to make it work. It would also allow you to play around a bit to help clarify your thinking.


Could you not just use multiple guard zones defining the three levels of boundary? This would take building 12 guard zones to give an approximation of what you are doing, but.....
jongough is offline   Reply With Quote
Old 10-02-2020, 00:34   #14
Registered User

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

I want a rounded rectangle as I am dealing with in land watering.

Can't we access the created boundary and its points via program.
We name boundaries and way points in each boundaries.

If we could use these references inside the program, then things could be more easier. From GPS data we can collect the position of boat and rotation orientations and apply the same to boundaries.
The size of these rounded rectangles actually dynamically be set according to the size of the boat.
This is just an idea.

Is it possible , what do you think?
priyanka is offline   Reply With Quote
Old 10-02-2020, 20:30   #15
Registered User

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

There is an API that can be used to interact with OD called ODAPI, it is available as a binary interface or a JSON interface. The developers manual gives you some information:
https://opencpn.org/wiki/dokuwiki/do...cpn_draw_odapi
There is an example plugin that makes use of the API. This is available in git and is called testplugin_pi. This can be found here:
https://github.com/jongough/testplugin_pi


I think that an extension of the standard boundary may be able to do what you want. The boundaries would still have points at the turning point of the boundary, but it could be drawn with arcs between the straight lines and the API to look check it could use the outine' drawn (I think) to check if something is inside or outside the boundary. A new 'create' function would be needed to allow true rectangles and location of the 'moving point' within the boundary, or a new page in the boundary properties to allow the setting of exact line lengths, directions and location of the 'centre' which could move and rotate the boundary.


Just some thoughts
__________________

jongough 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 22:15.


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.