Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 24-03-2013, 10:45   #1
Registered User

Join Date: Mar 2011
Posts: 39
Little toolbar mod

Hello,

Little modification for opencpn toolbar. I added time which is from ship position to mouse in minutes.

Modification:

In file chcanv.cpp (2 positions):
find
s.Printf( wxString("%03d° ", wxConvUTF8 ), (int)brg );
s << FormatDistanceAdaptive( dist );
After add:
if (gSog>0) {
s << wxString::Format(_T(" %1.0f "), dist/gSog*60 ) << _("Min."); }

In file chart1.cpp:
find:
s.Printf( wxString("%03d° ", wxConvUTF8 ), (int) brg );
s << cc1->FormatDistanceAdaptive( dist );
After add:
if (gSog>0) {
s << wxString::Format(_T(" %1.0f "), dist/gSog*60 ) << _("Min."); }

http://img138.imageshack.us/img138/650/modxm.png

Best wishes
__________________

__________________
useris is offline   Reply With Quote
Old 25-03-2013, 03:37   #2
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 1,968
Re: Little toolbar mod

useris..
That's a nice "good to have".
I'm not that advanced C++ coder but this is something to eventually get going with that. Not less to handle the build sequences.
Thanks/ Håkan
__________________

__________________
Hakan is offline   Reply With Quote
Old 25-03-2013, 10:52   #3
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,250
Re: Little toolbar mod

The modification is of very limited use. It works on the assumption that your boat can keep the same speed in any direction at all times. This is not true for sailing yachts, and not really true for powerboats either. To do this right, you need a polar diagram for your boat and a wind/wave/current grib file and is is more a thing for the new weather-routing plugin.

Thomas
__________________
cagney is offline   Reply With Quote
Old 26-03-2013, 09:41   #4
Registered User

Join Date: Mar 2011
Posts: 39
Re: Little toolbar mod

Yes, you are right. It is calculate for speed on that moment, does not calculate time on circulation, on weather and so on. It is just as simple calculator: distance / speed = time
__________________
useris is offline   Reply With Quote
Old 26-03-2013, 10:22   #5
Long Range Cruiser
 
MarkJ's Avatar

Cruisers Forum Supporter

Join Date: Dec 2007
Location: Australian living on "Sea Life" currently in England.
Boat: Beneteau 393 "Sea Life"
Posts: 12,828
Images: 25
Re: Little toolbar mod

That's great!
I can't wait to get back to the boat to try it!
I can edit in Notepad?
__________________
Notes on a Circumnavigation.
OurLifeAtSea.com

Somalia Pirates and our Convoy
MarkJ is offline   Reply With Quote
Old 26-03-2013, 10:28   #6
Registered User

Join Date: Mar 2011
Posts: 39
Re: Little toolbar mod

Yes, you can edit with notepad, but you will need compile OpenCPN as described in Compiling - Windows | Official OpenCPN Homepage (for windows)

Quote:
Originally Posted by MarkJ View Post
That's great!
I can't wait to get back to the boat to try it!
I can edit in Notepad?
__________________
useris is offline   Reply With Quote
Old 26-03-2013, 14:37   #7
Long Range Cruiser
 
MarkJ's Avatar

Cruisers Forum Supporter

Join Date: Dec 2007
Location: Australian living on "Sea Life" currently in England.
Boat: Beneteau 393 "Sea Life"
Posts: 12,828
Images: 25
Re: Little toolbar mod

Quote:
Originally Posted by useris View Post
Yes, you can edit with notepad, but you will need compile OpenCPN as described in
Ugggg!

No I need brains to be able to do that.

I want your AIS mod too.
__________________
Notes on a Circumnavigation.
OurLifeAtSea.com

Somalia Pirates and our Convoy
MarkJ is offline   Reply With Quote
Old 27-03-2013, 01:18   #8
Registered User

Join Date: Mar 2011
Posts: 39
Re: Little toolbar mod

I do it on the linux (Ubuntu 12), if you use ubuntu i can share. Or need who could compile it on windows. Or i will try to do it on windows in weekends

Quote:
Originally Posted by MarkJ View Post
Ugggg!

No I need brains to be able to do that.

I want your AIS mod too.
__________________
useris is offline   Reply With Quote
Old 27-03-2013, 11:54   #9
Long Range Cruiser
 
MarkJ's Avatar

Cruisers Forum Supporter

Join Date: Dec 2007
Location: Australian living on "Sea Life" currently in England.
Boat: Beneteau 393 "Sea Life"
Posts: 12,828
Images: 25
Re: Little toolbar mod

Quote:
Originally Posted by useris View Post
Or i will try to do it on windows in weekends
No, I don't want to put you to that extra work.
I think the mod is so good it will be included in the next version.


Mark
__________________
Notes on a Circumnavigation.
OurLifeAtSea.com

Somalia Pirates and our Convoy
MarkJ is offline   Reply With Quote
Old 27-03-2013, 13:26   #10
Registered User

Join Date: Mar 2011
Posts: 39
Re: Little toolbar mod

Actually, i need also compile opencpn for windows, because at work we use windows. But i have some problem with compile program. it is so stupid it is much simpler on ubuntu just edit and compile. so i will try to compile because i made more mods like timer for MOB, position calculation from some points and so on , but i do not know the result

Andrius

Quote:
Originally Posted by MarkJ View Post
No, I don't want to put you to that extra work.
I think the mod is so good it will be included in the next version.


Mark
__________________
useris is offline   Reply With Quote
Old 29-03-2013, 16:16   #11
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 1,968
Re: Little toolbar mod

Andrius...
You've inspired me to make some coding using your patch, many thanks. See post #965. Runs nicely in the not so stupid Win32.
Håkan
__________________
Hakan is offline   Reply With Quote
Old 30-03-2013, 01:14   #12
Registered User

Join Date: Mar 2011
Posts: 39
Re: Little toolbar mod

Thank's, i think it will be usefull. Win32 is not stupid, it is stupid errors which do not alllow me compile program
Also can you make patch with AIS (like Little AIS mod)

Thank's

Quote:
Originally Posted by Hakan View Post
Andrius...
You've inspired me to make some coding using your patch, many thanks. See post #965. Runs nicely in the not so stupid Win32.
Håkan
__________________
useris is offline   Reply With Quote
Old 01-04-2013, 15:09   #13
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 1,968
Re: Little toolbar mod

useris
AIS little mod done in Win32. See that thread
Håkan
__________________

__________________
Hakan is offline   Reply With Quote
Reply

Thread Tools
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




Copyright 2002- Social Knowledge, LLC All Rights Reserved.

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


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.