|
|
21-10-2020, 05:50
|
#1
|
Registered User
Join Date: Nov 2015
Location: Ireland
Posts: 467
|
SAR aircraft not being marked as lost target
In the image below the SAR aircraft at the top right has not been detected for 19 hours, should it not have a black bar through it? AIS target timeout is set to ten minutes.
Windows 10, OpenCpn version 5.2.4.
Aedan
|
|
|
21-10-2020, 07:40
|
#2
|
Registered User
Join Date: Jul 2015
Boat: Bruce Bingham Christina 49
Posts: 3,328
|
Re: SAR aircraft not being marked as lost target
Is there any reason you would want to keep lost targets up on the screen for 1440 minutes (24 hrs)?
|
|
|
21-10-2020, 08:01
|
#3
|
Registered User
Join Date: May 2013
Location: Bermuda
Boat: Heritage West Indies 36
Posts: 1,016
|
Re: SAR aircraft not being marked as lost target
Quote:
Originally Posted by Bill O
Is there any reason you would want to keep lost targets up on the screen for 1440 minutes (24 hrs)?
|
Absolutely! If you know that it shouldn't have been lost! E.g. a fishing buoy. Or any target that should be stationery.
|
|
|
21-10-2020, 08:23
|
#4
|
Registered User
Join Date: Nov 2015
Location: Ireland
Posts: 467
|
Re: SAR aircraft not being marked as lost target
Quote:
Originally Posted by Bill O
Is there any reason you would want to keep lost targets up on the screen for 1440 minutes (24 hrs)?
|
Yes there is, it's monitoring a shore AIS receiving station and when I glance at it once a day I get an idea of what's been going on.
Any thoughts on the original issue?
|
|
|
21-10-2020, 08:48
|
#5
|
Marine Service Provider
Join Date: Mar 2008
Posts: 7,387
|
Re: SAR aircraft not being marked as lost target
AedanC...
OCPN does not treat SAR aircraft differently than any other AIS target.
I suspect that the shore AIS station is still transmitting the last known position of this target.
To test:
1. Create a VDR plugin recording of the situation as you see it now. Let it run for a few minutes, to be sure and capture everything.
2. Settings->Connection, disable whatever connection is receiving from the shore station.
3. Stop and restart OCPN.
4. Play back the recorded VDR file.
5. Is the SAR target still there? If so, it must have been transmitted from the shore station recently.
Good Luck
Dave
|
|
|
21-10-2020, 10:46
|
#6
|
Registered User
Join Date: Nov 2015
Location: Ireland
Posts: 467
|
Re: SAR aircraft not being marked as lost target
Hi Dave,
I went to try that and by the time I got there the 24 hours must have elapsed and the SAR aircraft has disappeared. It tends to visit our area every few days, I'll check it next time and come back to you.
Aedan
|
|
|
21-10-2020, 11:47
|
#7
|
Registered User
Join Date: Jan 2011
Location: France/UK
Boat: Gib'Sea 402
Posts: 546
|
Re: SAR aircraft not being marked as lost target
I'm a bit bemused. You are complaining a lost target is still shown 19hrs later when you have told OCPN to keep lost targets for 24hrs. Why? Isn't that what you have set?
|
|
|
21-10-2020, 16:24
|
#8
|
Registered User
Join Date: Jul 2015
Boat: Bruce Bingham Christina 49
Posts: 3,328
|
Re: SAR aircraft not being marked as lost target
Quote:
Originally Posted by DefinitelyMe
Absolutely! If you know that it shouldn't have been lost! E.g. a fishing buoy. Or any target that should be stationery.
|
What is being discussed are AIS targets, not stationary ones as you mention.
If I'm underway and targets are lost w/lot of other active AIS targets, I wouldn't want them up for that long to add to the clutter.
|
|
|
22-10-2020, 10:22
|
#9
|
Registered User
Join Date: Aug 2011
Location: Petersburg, AK
Boat: Outremer 50S
Posts: 4,229
|
Re: SAR aircraft not being marked as lost target
I'm not entirely familiar with the code, but it appears that SAR aircraft are treated differently. There's a flag in the code "b_SarAircraftPosnReport" that designates an AIS target as a SAR aircraft.
Then in ais.cpp there's a separate routine for drawing the SAR icon and setting the brush used for the icon. I suspect, but absolutely don't know, because I didn't follow it all the way through, that this may result in the icon not getting the "lost signal" status. Here's a snip from ais.cpp:
Code:
if( td->Class == AIS_ARPA ) {
wxPen target_pen( UBLCK, 2 );
dc.SetPen( target_pen );
dc.SetBrush( target_brush );
dc.StrokeCircle( TargetPoint.x, TargetPoint.y, 9 );
dc.StrokeCircle( TargetPoint.x, TargetPoint.y, 1 );
// Draw the inactive cross-out line
if( !td->b_active ) {
dc.SetPen( wxPen( UBLCK, 2 ) );
dc.StrokeLine( TargetPoint.x - 14, TargetPoint.y, TargetPoint.x + 14, TargetPoint.y );
dc.SetPen( wxPen( UBLCK, 1 ) );
}
} else if( td->Class == AIS_ATON ) { // Aid to Navigation
AtoN_Diamond( dc, TargetPoint.x, TargetPoint.y, 12, td );
} else if( td->Class == AIS_BASE ) { // Base Station
Base_Square( dc, wxPen( UBLCK , 2 ), TargetPoint.x, TargetPoint.y, 8 );
} else if( td->Class == AIS_SART ) { // SART Target
if( td->NavStatus == 14 ) // active
SART_Render( dc, wxPen( URED , 2 ), TargetPoint.x, TargetPoint.y, 8 );
else
SART_Render( dc, wxPen( GetGlobalColor( _T ( "UGREN" ) ), 2 ),
TargetPoint.x, TargetPoint.y, 8 );
} else if(td->b_SarAircraftPosnReport) {
int airtype = (td->MMSI % 1000)/100; // xxxyyy5zz >> helicopter
int ar = airtype == 5 ? 15 : 9; // array size
wxPoint SarIcon[15];
wxPoint SarRot[15];
if (airtype == 5) {
SarIcon[0] = wxPoint(0, 9);
SarIcon[1] = wxPoint(1, 1);
SarIcon[2] = wxPoint(2, 1);
SarIcon[3] = wxPoint(9, 8);
SarIcon[4] = wxPoint(9, 7);
SarIcon[5] = wxPoint(3, 0);
SarIcon[6] = wxPoint(3, -5);
SarIcon[7] = wxPoint(9, -12);
SarIcon[8] = wxPoint(9, -13);
SarIcon[9] = wxPoint(2, -5);
SarIcon[10] = wxPoint(1, -15);
SarIcon[11] = wxPoint(3, -16);
SarIcon[12] = wxPoint(4, -18);
SarIcon[13] = wxPoint(1, -18);
SarIcon[14] = wxPoint(0, -19);
}
else {
SarIcon[0] = wxPoint(0, 12);
SarIcon[1] = wxPoint(4, 2);
SarIcon[2] = wxPoint(16, -2);
SarIcon[3] = wxPoint(16, -8);
SarIcon[4] = wxPoint(4, -8);
SarIcon[5] = wxPoint(3, -16);
SarIcon[6] = wxPoint(10, -18);
SarIcon[7] = wxPoint(10, -22);
SarIcon[8] = wxPoint(0, -22);
}
// Draw icon as two halves
// First half
for( int i = 0; i < ar; i++ )
SarRot[i] = SarIcon[i];
transrot_pts(ar, SarRot, sin_theta, cos_theta);
wxPen tri_pen( target_brush.GetColour(), 1 );
dc.SetPen( tri_pen );
dc.SetBrush( target_brush );
int mappings[7][3] = {{0, 1, 4}, {1, 2, 3}, {1, 3, 4}, {0, 4, 5}, {0, 5, 8}, {5, 6, 7}, {5, 7, 8}};
for(int i=0; i<7; i++) {
wxPoint ais_tri_icon[3];
for(int j=0; j<3; j++)
ais_tri_icon[j] = SarRot[mappings[i][j]];
dc.StrokePolygon( 3, ais_tri_icon, TargetPoint.x, TargetPoint.y );
}
dc.SetPen( target_outline_pen );
dc.SetBrush( wxBrush( UBLCK, wxBRUSHSTYLE_TRANSPARENT ) );
dc.StrokePolygon( ar, SarRot, TargetPoint.x, TargetPoint.y );
// second half
for( int i = 0; i < ar; i++ )
SarRot[i] = wxPoint(-SarIcon[i].x, SarIcon[i].y); // mirror the icon (x -> -x)
transrot_pts(ar, SarRot, sin_theta, cos_theta);
dc.SetPen( tri_pen );
dc.SetBrush( target_brush );
for(int i=0; i<7; i++) {
wxPoint ais_tri_icon[3];
for(int j=0; j<3; j++)
ais_tri_icon[j] = SarRot[mappings[i][j]];
dc.StrokePolygon( 3, ais_tri_icon, TargetPoint.x, TargetPoint.y );
}
dc.SetPen( target_outline_pen );
dc.SetBrush( wxBrush( UBLCK, wxBRUSHSTYLE_TRANSPARENT ) );
dc.StrokePolygon(ar, SarRot, TargetPoint.x, TargetPoint.y );
So, it appears that the aircraft is not in the AIS_ARPA class and it doesn't get the "lost" stroke, that is applied to the AIS_ARPA class.
|
|
|
22-10-2020, 11:40
|
#10
|
Registered User
Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,119
|
Re: SAR aircraft not being marked as lost target
check further down
// Draw the inactive cross-out line
row ~1645
|
|
|
22-10-2020, 12:16
|
#11
|
Registered User
Join Date: Aug 2011
Location: Petersburg, AK
Boat: Outremer 50S
Posts: 4,229
|
Re: SAR aircraft not being marked as lost target
Quote:
Originally Posted by Hakan
check further down
// Draw the inactive cross-out line
row ~1645
|
I think that's part of the "else" statement that starts on 1478 and catches all the other cases after the aircraft?
|
|
|
22-10-2020, 13:20
|
#12
|
Registered User
Join Date: Aug 2011
Location: Petersburg, AK
Boat: Outremer 50S
Posts: 4,229
|
Re: SAR aircraft not being marked as lost target
Digging a bit further, it looks like there are 6 drawing cases;
If Class = AIS_ARPA
Else If Class = AIS_ATON
Else If Class = AIS_BASE
Else If Class = AIS_SART
Else If b_SarAircraftPosnReport
Else (this catches Class = AIS_CLASS_A, AIS_CLASS_B, AIS_GPSG_BUDDY, AIS_DSC, AIS_APRS, and anything else).
The "lost signal" line is only drawn for the first (AIS_ARPA) and the last (catch-all) conditions.
The classes are defined in ais.h:
Code:
// Describe Transponder Class
typedef enum ais_transponder_class
{
AIS_CLASS_A = 0,
AIS_CLASS_B,
AIS_ATON, // Aid to Navigation pjotrc 2010/02/01
AIS_BASE, // Base station
AIS_GPSG_BUDDY, // GpsGate Buddy object
AIS_DSC, // DSC target
AIS_SART, // SART
AIS_ARPA, // ARPA radar target
AIS_APRS // APRS position report
}_ais_transponder_class;
I wonder if it would be cleaner to create a SAR Aircraft class and then change the IF structure to a SWITCH based on class? Not necessarily volunteering as not sure my skills are up to, but seems like it might be cleaner?
|
|
|
22-10-2020, 13:26
|
#13
|
Registered User
Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,119
|
Re: SAR aircraft not being marked as lost target
You're right. Sorry I was to quick. I also confirmed it by a test.
If I add the "if (!td->b_active)" part also to the aircraft it looks like the shot. Maybe a bit longer line to divorce it from the rotors or wings?
If a COG line was drawn it disappears when lost so there is a significant difference in any case.
|
|
|
22-10-2020, 13:30
|
#14
|
Registered User
Join Date: Aug 2011
Location: Petersburg, AK
Boat: Outremer 50S
Posts: 4,229
|
Re: SAR aircraft not being marked as lost target
Or possibly a bit further back in the icon? On a ship it shows near the aft end, if it were further back on the plane/helicopter it might not get lost? I suspect the plane is easier than the helicopter, that one already has a bunch of lines.
|
|
|
22-10-2020, 13:45
|
#15
|
Registered User
Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,119
|
Re: SAR aircraft not being marked as lost target
Maybe but isn't this clear enough? Different scales can cause trouble if offset I think.
|
|
|
|
|
Thread Tools |
Search this Thread |
|
|
Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
Advertise Here
Recent Discussions |
|
|
|
|
|
|
|
|
|
|
|
|
Vendor Spotlight |
|
|
|
|