@sailingnaturali/signalk-dsc 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -3
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -76,15 +76,59 @@ For every DSC call heard by a connected radio:
|
|
|
76
76
|
|
|
77
77
|
## Trying it without a radio
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
### Quick test script
|
|
80
|
+
|
|
81
|
+
The repo includes a script that builds a valid DSC sentence and fires it at the
|
|
82
|
+
server over UDP. First add a UDP input in your SignalK pipedProviders (Settings →
|
|
83
|
+
Connections → Add):
|
|
84
|
+
|
|
85
|
+
```json
|
|
86
|
+
{
|
|
87
|
+
"id": "dsc-test-udp",
|
|
88
|
+
"pipeElements": [{ "type": "providers/simple",
|
|
89
|
+
"options": { "type": "NMEA0183", "subOptions": { "type": "udp", "port": "7777" } } }]
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Then send a fake distress call:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
# Default: sinking, MMSI 366191919, near Boundary Pass → naturalaspi.local:7777
|
|
97
|
+
node scripts/send-test-dsc.js
|
|
98
|
+
|
|
99
|
+
# npm alias
|
|
100
|
+
npm run send-test-dsc
|
|
101
|
+
|
|
102
|
+
# Different nature of distress
|
|
103
|
+
node scripts/send-test-dsc.js --nature fire
|
|
104
|
+
node scripts/send-test-dsc.js --nature mob --category urgency
|
|
105
|
+
|
|
106
|
+
# Different vessel / position
|
|
107
|
+
node scripts/send-test-dsc.js --mmsi 316555777 --lat 48.9 --lon -123.5
|
|
108
|
+
|
|
109
|
+
# Different host / port
|
|
110
|
+
node scripts/send-test-dsc.js --host localhost --port 7777
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
All `--nature` values: `fire`, `flooding`, `collision`, `grounding`, `listing`,
|
|
114
|
+
`sinking`, `adrift`, `abandon`, `piracy`, `mob`, `epirb`.
|
|
115
|
+
|
|
116
|
+
Verify the call was captured:
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
GET /signalk/v2/api/resources/dsc-calls
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Manual sentence injection
|
|
123
|
+
|
|
124
|
+
You can also feed raw sentences through any NMEA 0183 connection (TCP, UDP, file
|
|
125
|
+
playback):
|
|
80
126
|
|
|
81
127
|
```
|
|
82
128
|
$CDDSC,12,3380400790,12,05,00,1423108312,2019,,,S,E*69
|
|
83
129
|
$CDDSE,1,1,A,3380400790,00,45894494*1B
|
|
84
130
|
```
|
|
85
131
|
|
|
86
|
-
…then `GET /signalk/v2/api/resources/dsc-calls`.
|
|
87
|
-
|
|
88
132
|
## Limitations
|
|
89
133
|
|
|
90
134
|
- Distress relays, acknowledgements, and cancellations are stored (with
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sailingnaturali/signalk-dsc",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Receive, log, and alert on DSC (VHF digital selective calling) calls — distress, urgency, safety, routine — from NMEA 0183 ($CDDSC/$CDDSE) and NMEA 2000 (PGN 129808).",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"test": "node --test"
|
|
7
|
+
"test": "node --test",
|
|
8
|
+
"send-test-dsc": "node scripts/send-test-dsc.js"
|
|
8
9
|
},
|
|
9
10
|
"keywords": [
|
|
10
11
|
"signalk-node-server-plugin",
|