Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DSC Distress Alerts #217

Open
TwoCanPlugIn opened this issue Jan 3, 2022 · 6 comments · May be fixed by #218
Open

DSC Distress Alerts #217

TwoCanPlugIn opened this issue Jan 3, 2022 · 6 comments · May be fixed by #218

Comments

@TwoCanPlugIn
Copy link

Is SignalK meant to parse NMEA 183 DSC and DSE sentences ?

Sending the following sentences does not generate any SIgnalK nodes as far as I can tell:

$CDDSC,12,5031105200,,05,00,2380814428,1800,,,R,E6C
$CDDSE,1,1,A,5031105200,04,19252411
18

and the following error is logged.

Jan 03 21:55:07 signalk:streams:nmea0183-signalk [error] line is not defined +4h

@TwoCanPlugIn
Copy link
Author

Some further observations.

BTW, Not sure what happened with the formatting of the NMEA 183 sentences above. Have now learnt to enclose as code.

The DSC Distress alert sentences were
$CDDSC,12,5031105200,,05,00,2380814428,1800,,,R,E*6C
$CDDSE,1,1,A,5031105200,04,19252411*18

When sent over TCP or UDP no other nodes/contexts (or whatever you call them) are generated.

Similarly for a DSC Position Report, using the following sentence, nothing is generated.
$CDDSC,20,5031105200,08,21,26,2380814428,1800,,,B,E*77
$CDDSE,1,1,A,5031105200,04,19252411*18

Instead if a DSC Distress Alert Relay is sent, using the following sentence:
$CDDSC,16,2350763930,12,12,00,2380814428,1800,5031105200,05,S,E*65
$CDDSE,1,1,A,5031105200,04,19252411*18

the following context is created with the following values:

`vessels.urn:mrn:imo:mmsi:235076393

navigation.position
{
"latitude": -38.13333333333333,
"longitude": 144.46666666666667
}

notifications.epirb
{"message":"DSC Distress Recieved! Nature of distress: epirb"}`

The values in this Distress Relay sentence should be interpreted as:
Format Specifier 16 - All Ships
MMSI Address - 235076393 (This is the MMSI Address of the relay vessel)
DSC Category 12 - Distress
First Telecommand 12 - Distress Relay
Type of Communications 00 - F3E/G3E, All modes TP
Vessel In Distress 503110520 (this is the actual vessel in distress)
Nature of Distress 05 - Sinking

Obviously this is being parsed incorrectly, using the wrong MMSI address for the vessel in distress, and the wrong value for nature of distress (12 being interpreted as MOB).

This is just totally broken.

No need to describe its impact on OpenCPN.

@tkurki
Copy link
Member

tkurki commented Jan 4, 2022

This is just totally broken.

🤦

Yes it is. I'll see about fixing it in a few days.

@tkurki tkurki linked a pull request Jan 4, 2022 that will close this issue
@tkurki
Copy link
Member

tkurki commented Jan 4, 2022

Oh, DSC & DSE are not very well documented in the open and many parsers don't support them at all.

@TwoCanPlugIn can you point to any additional resources in addition to https://opencpn.org/wiki/dokuwiki/doku.php?id=opencpn:opencpn_user_manual:advanced_features:nmea_sentences and the linked https://continuouswave.com/whaler/reference/DSC_Datagrams.html ? And what about sources for real world data captures?

Inspired by canboat/canboat#265 I figured I could take Kaitai for a spin by creating an initial Kaitai description of DSVC & DSE. Could be a start to a language agnostic NMEA0183 definition, instead of everybody and their cousin writing their own parser, each differently buggy or incomplete...

@tkurki
Copy link
Member

tkurki commented Jan 4, 2022

$CDDSC,12,5031105200,,05,00,2380814428,1800,,,R,E*6C

Why is the DSC category field empty or what am I missing?

@TwoCanPlugIn
Copy link
Author

TwoCanPlugIn commented Jan 4, 2022 via email

@TwoCanPlugIn
Copy link
Author

Why is the DSC category field empty or what am I missing?

If the Format Specifier is Distress, the DSC Category field is set to null, as per the standard. It is just assumed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants