Cruisers Forum
 


Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 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
Attached Thumbnails
Click image for larger version

Name:	O_AIS_1.jpg
Views:	80
Size:	66.0 KB
ID:	225622   Click image for larger version

Name:	O_AIS_2.jpg
Views:	82
Size:	125.3 KB
ID:	225623  

AedanC is offline   Reply With Quote
Old 21-10-2020, 07:40   #2
Registered User
 
Bill O's Avatar

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)?
__________________
Bill O.
KB3YMH
https://phoenixketch.blogspot.com/
Bill O is offline   Reply With Quote
Old 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 View Post
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.
DefinitelyMe is offline   Reply With Quote
Old 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 View Post
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?
AedanC is offline   Reply With Quote
Old 21-10-2020, 08:48   #5
Marine Service Provider
 
bdbcat's Avatar

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
bdbcat is online now   Reply With Quote
Old 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
AedanC is offline   Reply With Quote
Old 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?
hoolie is offline   Reply With Quote
Old 21-10-2020, 16:24   #8
Registered User
 
Bill O's Avatar

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 View Post
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.
__________________
Bill O.
KB3YMH
https://phoenixketch.blogspot.com/
Bill O is offline   Reply With Quote
Old 22-10-2020, 10:22   #9
Registered User
 
Dsanduril's Avatar

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.
Dsanduril is offline   Reply With Quote
Old 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
Hakan is offline   Reply With Quote
Old 22-10-2020, 12:16   #11
Registered User
 
Dsanduril's Avatar

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 View Post
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?
Dsanduril is offline   Reply With Quote
Old 22-10-2020, 13:20   #12
Registered User
 
Dsanduril's Avatar

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?
Dsanduril is offline   Reply With Quote
Old 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.
Attached Thumbnails
Click image for larger version

Name:	sar.jpg
Views:	35
Size:	5.5 KB
ID:	225689  
Hakan is offline   Reply With Quote
Old 22-10-2020, 13:30   #14
Registered User
 
Dsanduril's Avatar

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.
Dsanduril is offline   Reply With Quote
Old 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.
Attached Images
 
Hakan is offline   Reply With Quote
Reply

Tags
lost

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
SAR aircraft icon rotation DavidB2 OpenCPN 4 13-01-2017 03:01
Powerful Aircraft VHF Radio Pelagic Marine Electronics 45 15-01-2015 22:21
Posts Not Being Marked Read - Probably Not a Problem w/CF . . . dacust Forum Tech Support & Site Help 2 02-10-2010 07:53
Threads Are Not Getting Marked 'Read' msoneji Forum Tech Support & Site Help 3 12-01-2010 11:44

Advertise Here


All times are GMT -7. The time now is 08:36.


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.