Cruisers Forum
 


Reply
 
Thread Tools Search this Thread Rating: Thread Rating: 5 votes, 5.00 average. Display Modes
Old 16-02-2010, 10:32   #301
Registered User
 
Psyches's Avatar

Join Date: Apr 2008
Location: SF Bay Area
Boat: Tartan 30 - Bluegrass
Posts: 187
Send a message via Yahoo to Psyches Send a message via Skype™ to Psyches
Quote:
Originally Posted by PjotrC View Post
I will make a source patch, maybe after moving this to AIS thread and deciding on the patch sequence. I still have the unsolved open track issue. For the full source of changed files, any time.
Piotr, I'd think twice about putting anchor alarm support on AIS thread. Currently AIS thread is not started if there is no AIS feed, as on my boat. And I think that's the way it should be - it's the same for the few other threads: if they're not needed, they're not started. Besides, anchor alarm and AIS are apples & oranges, so combining this way is a bit odd at the least, brittle & hard to maintain at worst. You might look at using a wxTimer (on main thread) to do the work.

Sorry I haven't had more time to look in detail at your ideas and probs you're running into (e.g. short waypoint distances). This one caught my attention.

Mark
Psyches is offline   Reply With Quote
Old 16-02-2010, 22:56   #302
Registered User

Join Date: Feb 2010
Posts: 619
Mark,

Thanks for the advice. I am aware of all your concerns here. I was just hoping to reuse as much existing code as possible, especially since I am not familiar with wx.
Of course I am not writing production code. These are just trial implementations of potential functionality, and I think that even a throwaway prototype may bring in some useful knowledge. The anchor watch is less than 50 lines of code, excluding the dialog...
But for live operation, even in test mode, the anchor watch has to wait for the changes in geodesic calculations.

Thanks again for help.
Piotr
PjotrC is offline   Reply With Quote
Old 17-02-2010, 10:10   #303
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Quote:
Originally Posted by PjotrC View Post
Mark,
...
.....
But for live operation, even in test mode, the anchor watch has to wait for the changes in geodesic calculations.

Thanks again for help.
Piotr
Piotr, why not go ahead with your anchor watch project and write your own great circle -distance and -direction routines?
This will not be many lines of code and can always be adjusted later. Great circle calculation is the right thing to do for these very short distances involved anyway, and will work.
Just a suggestion.....

Thomas
cagney is offline   Reply With Quote
Old 17-02-2010, 11:51   #304
Registered User
 
Psyches's Avatar

Join Date: Apr 2008
Location: SF Bay Area
Boat: Tartan 30 - Bluegrass
Posts: 187
Send a message via Yahoo to Psyches Send a message via Skype™ to Psyches
Quote:
Originally Posted by PjotrC View Post
Thanks for the advice. I am aware of all your concerns here. I was just hoping to reuse as much existing code as possible, especially since I am not familiar with wx.
Of course I am not writing production code. These are just trial implementations of potential functionality, and I think that even a throwaway prototype may bring in some useful knowledge. The anchor watch is less than 50 lines of code, excluding the dialog...
But for live operation, even in test mode, the anchor watch has to wait for the changes in geodesic calculations.
Hi Piotr,

I see - well, good luck then and I look forward to it. I agree with Thomas, and hope you can work around the measuring inaccuracies; I'd hate to see that stand in the way of your progress.

If you decide to look at wxTimer for more production-integrated work into OpenCPN, I think you'll find it's pretty simple. You don't need to know much about wx for that, and I can help if you want.

For current OpenCPN uses for timers, you can look in chart1.cpp at "FrameTimer1" or "FrameTCTimer" uses. To match the existing pattern you'll see that it takes ~6 lines of code plus the actual anchor watch code itself:

chart1.h:
- a TIMER_ANCHOR_WATCH message id enum value in the existing list
- a wxTimer AnchorWatchTimer field declaration in MyFrame
- a MyFrame::OnAnchorWatchTimer() method

chart1.cpp:
- an EVT_TIMER line
- a setOwner line in MyFrame::MyFrame
- the AnchorWatchTimer.Start() and .Stop() calls to start and stop anchor watch
- the OnTimer() impl itself

Or instead, you might just put the anchor watch into the existing OnFrameTimer1 impl. This method takes care of various OpenCPN charting and monitoring activities, and anchor watch is a good fit there.

HTH,

Mark
Psyches is offline   Reply With Quote
Old 17-02-2010, 12:26   #305
Registered User

Join Date: Feb 2010
Posts: 619
Anchor watch

Mark...

I hope you will absolve me today, but I had to see (and hear) it working ...

It is not only the timer, but all the UI, which should really have the same look-and-feel. Currently it is all private to AIS. To get this working I had to break some rules, but I promise not to release this code :-).

I think acknowledging/silencing of anchor alarms should also follow the same style. Too early yet.

Thanks again for support,

Piotr

Alerting is one-at-a-time, if both are triggered, silencing one will start the second.
Currently if the boat swings back to safe position, alarm stops. Perhaps it should continue until acknowledgement.
Attached Thumbnails
Click image for larger version

Name:	anchor_alarm_visual_s.jpg
Views:	211
Size:	10.1 KB
ID:	13306  
PjotrC is offline   Reply With Quote
Old 18-02-2010, 06:38   #306
Registered User

Join Date: Feb 2010
Posts: 619
Tracks & bells simple patch

Just to clear up the backlog, I attach two very simple source patches:

1. chart1_patch2a_cpp.txt
2. patch3_trk.zip.doc

1. is to fix an error in ships' bells code (file chart1.cpp), that prevents bells from ringing if OCPN is started just before the ring time.

2. is to bring the basic track functionality to OCPN 1.3.6 as described in the post #286 of 14-02-2010 in this thread.

Patch #2a should follow patch 2, and patch 3 is independent. As far as I can see it does not conflict with the Route Manager.

Cheers,

Piotr
Attached Files
File Type: txt chart1_patch2a_cpp.txt (888 Bytes, 90 views)
File Type: doc opencpn_patch3_trk.zip.doc (5.6 KB, 73 views)
PjotrC is offline   Reply With Quote
Old 19-02-2010, 02:05   #307
Registered User

Join Date: Sep 2009
Location: Angers - France
Boat: Beneteau First 29 Ptizef
Posts: 844
Tracks & bells simple patch

Hi , Piotr

Many thanks for your work
I implemented your three patches on Window Vista. I can't test all AIS functionalities , I've no device and the boat is on his cradle , but I tested patches 3 and it's works fine . I have just some small remarks :
For tracks :
ETE/Timestamp column and dialog box width is a bit too small (see screen shot right)
Could it be possible to calculate Time Enroute based on Timestamps last point- first point and to replace planed speed by mean speed based on total distance/Time Enroute ?
For routes :
If I open opencpn with route(s) already existing or I create new route(s) , the routes properties display is OK . But if I import a route , I obtain some strange data in the ETE/Timestamp column . (see screen shot left)

best regards
Jean Pierre
Attached Thumbnails
Click image for larger version

Name:	patch3-2.jpg
Views:	252
Size:	54.9 KB
ID:	13336   Click image for larger version

Name:	patch3-1.jpg
Views:	255
Size:	63.5 KB
ID:	13337  

Ptizef is offline   Reply With Quote
Old 19-02-2010, 05:04   #308
Registered User

Join Date: Feb 2010
Posts: 619
Jean Pierre...

Thanks for trying it out.

You are right on all points. For the functionality, I did just the minimal possible step in the direction of distinguishing tracks from routes. More will have to come.

The third issue looks like a bug. I did not test much with routes. Good find.
Will look into this.

Piotr
PjotrC is offline   Reply With Quote
Old 19-02-2010, 05:09   #309
Registered User
 
idpnd's Avatar

Join Date: Sep 2007
Location: Almería, ES
Boat: Chiquita 46 - Libertalia
Posts: 1,558
How do I apply this patch please?
__________________
sv Libertalia
idpnd is offline   Reply With Quote
Old 19-02-2010, 11:19   #310
Registered User

Join Date: Feb 2010
Posts: 619
tracks patch bug fix

Jean Pierre...

I attach a source patch 3a for a single file navutil.cpp that will fix the bug you have found. Thanks again for testing and your patience.

I do not plan to polish up the dialogs, windows etc. soon, for a number of reasons:
- I am not familiar with wx.
- some of these changes are architecture decisions and I am not in position to suggest anything here. Could be done in many ways.
- I think some of the missing functionality will perhaps be included in the future in the Route(&Object Manager), or someone will do it faster&better :-)

so I am just trying out what could be done and whether it is worth doing. It is up to the development team to use some of this or not, hopefully implementing similar functions in this or another way...

I hope the routes and tracks will behave properly now.

@idpnd

Here is how to apply the source patches:

1. unpack all *_patch*_cpp.txt and *_patch*_h.txt files into the main build directory. For me it is "opencpn". The source files to be modified are in "opencpn/src" and "opencpn/include".
2. In the "opencpn" directory execute all the lines from all patch scripts, starting from opencpn_patch_bob.txt, then 2, 2a, and finally patch3_trk.txt and now 3a. For the single file patches just execute one line command "patch <oldfile> <patchfile>" . One can do it by hand, with cut-and-paste, or change the .txt files into scripts and run them in the shell.
3. Rebuild opencpn as usual from the source.

Good luck,

Piotr
Attached Files
File Type: doc navutil_patch3a_cpp.txt.doc (1.7 KB, 94 views)
PjotrC is offline   Reply With Quote
Old 19-02-2010, 14:13   #311
Registered User

Join Date: Sep 2009
Location: Angers - France
Boat: Beneteau First 29 Ptizef
Posts: 844
Hi , Piotr
with patch 3a routes dialog works fine now
thanks
Jean Pierre
Ptizef is offline   Reply With Quote
Old 25-02-2010, 00:39   #312
Registered User

Join Date: Feb 2010
Posts: 619
In a new thread "Anchor watch prototype" I posted the source as described in Forums - Post 404535">this post. It might be considered a fortified feature request

I am specifically interested in opinions as to:

1. whether the interaction and functionality proposed is sufficient and suitable
2. whether the alarm should continue until acknowledged or cease with return to normal state
3. whether more alarms/indicators are needed/planned in OpenCPN in the future

With IMO mandating alarms for ECDIS probably users will expect more automatic checks and alerts. This might lead to a need for a general alerting mechanism (AIS, anchor, depth, wind, TSS, prohibited area.. ?). Until 1.3.6 I believe the CPA/TCPA was the only alarm implemented.

Piotr

And thanks, Mark, for your help...
Attached Thumbnails
Click image for larger version

Name:	anchor_para_v9s.jpg
Views:	190
Size:	10.4 KB
ID:	13506   Click image for larger version

Name:	anchor_alarm_v9s.jpg
Views:	232
Size:	17.0 KB
ID:	13507  

PjotrC is offline   Reply With Quote
Old 27-02-2010, 11:57   #313
Registered User
 
sinbad7's Avatar

Join Date: Sep 2003
Location: Ubatuba,SP,Brazil (Ex Norway)
Boat: (Ex) Alu. 60' yacht-"Eight Bells"
Posts: 2,731
Images: 57
Send a message via Skype™ to sinbad7
While we're talking about AIS features,I'd like to also be able to see a thumbprint photo of the ship displayed in the queery box. This will of course only be active when there is an internet connection.

Here is the link to include in the queery box:

Activated by the targets MMSI number.
__________________
"And all I ask is a tall ship and a star to steer her by."
sinbad7 is offline   Reply With Quote
Old 04-03-2010, 02:22   #314
Registered User
 
idpnd's Avatar

Join Date: Sep 2007
Location: Almería, ES
Boat: Chiquita 46 - Libertalia
Posts: 1,558
I have added a new feature request and bug report.

The feature is to have continuously updating cursor position (as in under mouse pointer) which saves all the clicking around when trying to find a lat/long.

The bug report is the lack of drying heights under CMAP, cannot verify if this occurs on ENCs too. Drying areas are currently displayed in green. The drying height indicates the extent to which a certain area sticks out at the lowest possible tide. On raster/paper charts, the figure is usually underlined (the figures and green areas are just about visible on the attached chart). This can be used to determine when it is possible to travel across the area at high tide. For instance, this is necessary to reach places in some ports of the north sea.

__________________
sv Libertalia
idpnd is offline   Reply With Quote
Old 04-03-2010, 04:19   #315
Registered User

Join Date: Feb 2010
Posts: 619
Colors and segments in tracks

Quote:
Originally Posted by LeaseOnLife View Post

Additional, nice to have feature:

For every 2nd tide change the track should change color or shade (less bright). This would allow us to see the new track on top of the old track (>=12h 25.2 min old = 1/2 lunar day).
I think the above is a high priority request, not only in the context of watching the boat at anchor. Although I would not vote for such specific automation, clear distinction between currently running track and older tracks is necessary.

I would like to strengthen this request with a source patch, implementing and proposing some more features in the area of displaying tracks.

1. show running part of track in red, older tracks in default magenta, or the color of xm icon used for trackpoints
2. allow tracks to have disjoint segments (as per GPX standard definition)

To prevent any growth of user interface I would propose to handle disjoint track segments only in imported tracks. Tracks created by recording own ship positions would always consist of one segment.

The uses of (1) are obvious. The feature (2) in practice would remove for me the need for user data layer to annotate charts with changes from Notices to Mariners. Having the possibility of drawing multi-color lines and placing marks with links to additional information, I think I can easily do all the annotations needed.

Two new issues open up now:

- there might be a need for "Delete <ALL> Tracks"
- there might be a need to limit the track length - perhaps stop/restart at midnight, or at nearest 8 bells if >10000 points?

Any opinions?

Piotr

The relevant source patch patch6_col_seg appears in a separate thread, together with technical and maintenance discussion.
Attached Thumbnails
Click image for larger version

Name:	CanariasTSSs.jpg
Views:	210
Size:	16.1 KB
ID:	13661  
Attached Images
 
PjotrC 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
Yet anothr of my stupid requests Little Otter Multihull Sailboats 2 29-06-2008 23:29
Any requests for pics at Strictly Sail Oakland? Redbull addict Monohull Sailboats 0 30-03-2007 18:33
Capt.Jack requests permission to come aboard canatc1 Meets & Greets 8 10-04-2006 16:54

Advertise Here


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


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.