Cruisers Forum
 

Go Back   Cruisers & Sailing Forums > Seamanship, Navigation & Boat Handling > OpenCPN
Cruiser Wiki Click Here to Login
Register Vendors FAQ Community Calendar Today's Posts Log in

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 21-12-2015, 07:54   #556
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,401
Re: OpenCPN Beta test 4.1.1108 Release

Gilletarom...

re:
What difference betwen :
- Scale Less Important Targets
- Scale Less Important AIS Targets

These two strings are redundant. We will drop " Scale Less Important Targets".
But, please note that we may change the wording again, since the term "less important" is not very precise. See above discussion.

And..
2. "AISShowScaled" is an error, will not be present in Release.

Thanks
Dave
bdbcat is offline   Reply With Quote
Old 21-12-2015, 08:35   #557
Registered User
 
rooiedirk's Avatar

Join Date: Aug 2010
Location: Netherlands
Boat: Oneoff
Posts: 511
Re: OpenCPN Beta test 4.1.1108 Release

Quote:
Originally Posted by bdbcat View Post
Dirk...

1. Maybe we should say "non-critical targets"

2. I think we definitely need to be able to mask moored targets.

3. Maybe masking of moored targets should not participate in the tool cycling, but be simply an independent option.

4. What exactly is the algortihm to determine "unimportant targets" in the current code, please?

Thanks
Dave
1. I'm a non native English speaker, so you better don't ask me.
4.
Code:
            double temp_importance, So, Tcpa, Cpa, Rang, Siz = 0.; //calc the importance of target
            So = g_ScaledNumWeightSOG/12 * td->SOG; //0 - 12 knts gives 0 - g_ScaledNumWeightSOG weight
            if (So > g_ScaledNumWeightSOG) So = g_ScaledNumWeightSOG; 
                       
            if (td->bCPA_Valid){
                Cpa=g_ScaledNumWeightCPA - g_ScaledNumWeightCPA/4 * td->CPA;
                //if TCPA is positief (target is coming closer), make weight of CPA bigger
                if (td->TCPA > .0) Cpa = Cpa + Cpa * g_ScaledNumWeightTCPA/100;
                if ( Cpa < .0 ) Cpa = .0; //if CPA is > 4
            }
            else Cpa = .0;
                        Rang = g_ScaledNumWeightRange / 10 * td->Range_NM;
            if ( Rang > g_ScaledNumWeightRange ) Rang = g_ScaledNumWeightRange;
            Rang = g_ScaledNumWeightRange - Rang;
                                                   
            Siz = g_ScaledNumWeightSizeOfT/30*( td->DimA + td->DimB);
            if ( Siz > g_ScaledNumWeightSizeOfT ) Siz = g_ScaledNumWeightSizeOfT;
            temp_importance = So + Cpa + Rang + Siz;
            
            td->importance=(int)temp_importance;
            int calc_scale = 0;
            if ( td->importance  > ImportanceSwitchPoint ) calc_scale=100; else calc_scale = 50; //50% is minium scale for target
            //with one tick per second targets gan slink from 100 to g_ScaledSizeMinimal% in 25 seconds
            if ( td->importance  < ImportanceSwitchPoint ) targetscale = td->last_scale -2;
            //growing from g_ScaledSizeMinimal till 100% goes faster in 10 seconds
            if ( td->importance  > ImportanceSwitchPoint ) targetscale = td->last_scale +5; 
            if ( targetscale > 100 ) targetscale = 100;
            if ( targetscale < 50 ) targetscale = 50;//g_ScaledSizeMinimal;
            td->last_scale = targetscale;
Or for each factor a number is calculated according the weight setting in the config file, and then ale the factors are added. The scaling of the targets is then calculated and only slowly changed, to avoid an uneasy picture.
__________________
Navigation is know where you are and what to do to get where you want.
But also: Know where you don't want to be and what to do to don't get there.
rooiedirk is offline   Reply With Quote
Old 23-12-2015, 11:43   #558
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Re: OpenCPN Beta test 4.1.1108 Release

Linux data ports.
Options->Connections -> Data Port does no longer show correctly, the available
data ports, if they change in the current session.

For example on start my AIS port is /dev/ttyACM0, which is listed correctly.
If I disconnect the AIS usb cable, and then connect again, the port changes to
/dev/ttyACM1. AIS works correctly, if I manually enter this port, but /dev/ttyACM0 is still listed as a "Data Port", instead of /dev/ttyACM1.

O v4.0 worked fine.

Thomas
cagney is offline   Reply With Quote
Old 24-12-2015, 02:03   #559
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 6,008
Re: OpenCPN Beta test 4.1.1108 Release

Crash report:

Look at attached screen shot. This is using the NOAA ENC chart set. Object Query at this coordinate causes instant crash at line 5654 in s57chart.cpp.

The issue appears to be that the number of points (ntp) returned by:

Code:
 int ntp = GetLineFeaturePointArray(obj, (void **) &ptest);
is never used for anything. The for loop
Code:
                for( int ip = 1; ip < npt; ip++ ) {
at line 5652 iterates on obj->npt which is not the same value as ntp. I suspect this is a dyslexic error and the for loop should iterate on "ntp" not "npt". If I change the for loop to stop at ntp instead of npt then it never crashes so far as I have been able to test.
Attached Thumbnails
Click image for larger version

Name:	2015-12-24.png
Views:	190
Size:	177.5 KB
ID:	115533  
transmitterdan is offline   Reply With Quote
Old 24-12-2015, 03:39   #560
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 6,008
Re: OpenCPN Beta test 4.1.1108 Release

After looking over the code in
Code:
int s57chart::GetLineFeaturePointArray(S57Obj *obj, void **ret_array)
I see a memory leak. Have submitted a PR to fix the leak and stop the crash.
transmitterdan is offline   Reply With Quote
Old 24-12-2015, 04:11   #561
Registered User

Join Date: Jul 2010
Location: Hannover - Germany
Boat: Amel Sharki
Posts: 2,541
Re: OpenCPN Beta test 4.1.1108 Release

Quote:
Originally Posted by transmitterdan View Post
After looking over the code in
Code:
int s57chart::GetLineFeaturePointArray(S57Obj *obj, void **ret_array)
I see a memory leak. Have submitted a PR to fix the leak and stop the crash.
I don't see a memory leak in this function but 2 dead variables: float a and float b in the while loop.

Gerhard
CarCode is offline   Reply With Quote
Old 24-12-2015, 04:17   #562
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 6,008
Re: OpenCPN Beta test 4.1.1108 Release

Quote:
Originally Posted by CarCode View Post
I don't see a memory leak in this function but 2 dead variables: float a and float b in the while loop.

Gerhard
The variable ret_array is populated with a pointer that was created by malloc() in this function but freed nowhere. It needs to be freed in the calling function after it finishes looking at the array.
transmitterdan is offline   Reply With Quote
Old 24-12-2015, 05:24   #563
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 6,008
Re: OpenCPN Beta test 4.1.1108 Release

Quote:
Originally Posted by rooiedirk View Post
1. I'm a non native English speaker, so you better don't ask me.
Maybe the phrase you guys are looking for is "low priority targets"?
transmitterdan is offline   Reply With Quote
Old 24-12-2015, 06:34   #564
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: OpenCPN Beta test 4.1.1108 Release

I like "low priority targets". And would vote for turn off of moored to be separate action, not included in the rotation.
rgleason is offline   Reply With Quote
Old 24-12-2015, 20:28   #565
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,401
Re: OpenCPN Beta test 4.1.1108 Release

Folks...

I have made some changes to the AIS scaling logic, as follows:

1. Hiding of moored targets is completely independent of the non-critical target scaling logic. The relevant options->Ships->AIS "Suppress moored..." checkbox and the menubar checkbox are synchronized.

2. The AIS toolbar tool cycles as follows:

a. AIS show all targets (normal, default)
b. AIS Scale non-critical targets.
c. AIS Hide all targets
a. ...and back to AIS Show All targets.

3. I changed the (US) messages slightly.

4. The AIS toolbar tool shows the current state:
a. Normal
b. Suppressed, for both hidden moored targets and scaled targets.
c. Disabled, grey, all targets hidden.

5. The Options->Ships->AIS->Enabled scaled AIS targets checkbox should be considered as an "enabler" for the scaling function. If disabled, then the toolbar tool will skip the scaling option on cycling.

Short of serious disagreement or implementation errors, this will be the Release functionality for this feature in O4.2.

Code is in github now.

Thanks
Dave
bdbcat is offline   Reply With Quote
Old 24-12-2015, 20:33   #566
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,401
Re: OpenCPN Beta test 4.1.1108 Release

@devs...

Last call...
Plan on a Beta this weekend. This Beta will be Feature Freeze for O4.2

Please tidy up and finalize any outstanding Pull Requests for this Release.

Thanks
Dave

Oh, and have a very Happy and Peaceful Christmas.
bdbcat is offline   Reply With Quote
Old 24-12-2015, 23:26   #567
Registered User
 
Gilletarom's Avatar

Join Date: Mar 2010
Location: France
Boat: 10.50 mètres
Posts: 2,988
Re: OpenCPN Beta test 4.1.1108 Release

Ok Dave,

Quote:
Originally Posted by bdbcat View Post
Folks...
I have made some changes ...

3. I changed the (US) messages slightly.
..
Dave
But no change in crowdin ?
Gilletarom is offline   Reply With Quote
Old 25-12-2015, 01:37   #568
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,147
Re: OpenCPN Beta test 4.1.1108 Release

AIS scaling:
Serious or not I still would prefer the last mode of scaled/not scaled to be remembered on next OCPN start. Now it's always set to not scaled.

This feature now seems to be working very good.

Thanks
Håkan
Hakan is online now   Reply With Quote
Old 25-12-2015, 03:41   #569
Marine Service Provider

Join Date: May 2013
Location: Norway
Posts: 719
Re: OpenCPN Beta test 4.1.1108 Release

Maybe a "remember last scaled" setting ??
petter5 is offline   Reply With Quote
Old 25-12-2015, 05:36   #570
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Re: OpenCPN Beta test 4.1.1108 Release

Quote:
Originally Posted by bdbcat View Post
Folks...

I have made some changes to the AIS scaling logic, as follows:

1. Hiding of moored targets is completely independent of the non-critical target scaling logic. The relevant options->Ships->AIS "Suppress moored..." checkbox and the menubar checkbox are synchronized.

2. The AIS toolbar tool cycles as follows:

a. AIS show all targets (normal, default)
b. AIS Scale non-critical targets.
c. AIS Hide all targets
a. ...and back to AIS Show All targets.

3. I changed the (US) messages slightly.

4. The AIS toolbar tool shows the current state:
a. Normal
b. Suppressed, for both hidden moored targets and scaled targets.
c. Disabled, grey, all targets hidden.

5. The Options->Ships->AIS->Enabled scaled AIS targets checkbox should be considered as an "enabler" for the scaling function. If disabled, then the toolbar tool will skip the scaling option on cycling.

Short of serious disagreement or implementation errors, this will be the Release functionality for this feature in O4.2.

Code is in github now.

Thanks
Dave
Dave
When Options->Ships->AIS->Allow scaled AIS targets checkbox is not checked.... I get this:


2. The AIS toolbar tool cycles as follows:

a. AIS show all targets (normal, default)
b. AIS Scale non-critical targets.
(c. AIS Hide all targets) This option never shows!
a. ...and back to AIS Show All targets.

But....as scaling is not on, the button should really just toggle between
a & c if I understand you correctly.

Thomas
cagney is offline   Reply With Quote
Reply

Tags
enc, lease, opencpn


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
OpenCPN Beta test 4.1.1022 Release bdbcat OpenCPN 122 07-11-2015 01:12
OpenCPN Beta test 4.1.925 Release bdbcat OpenCPN 177 04-11-2015 08:16
OpenCPN Beta test 4.1.602 Release bdbcat OpenCPN 193 13-10-2015 08:19
OpenCPN Version 2.2 Beta Test bdbcat OpenCPN 437 15-12-2010 19:17
OpenCPN Version 2.2 Beta Test Bugs / Discussion bdbcat OpenCPN 120 26-09-2010 02:53

Advertise Here


All times are GMT -7. The time now is 04:43.


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.