node-red-contrib-tak-registration 0.2.0 → 0.2.1

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 CHANGED
@@ -1,35 +1,30 @@
1
1
  node-red-contrib-tak-registration
2
2
  =================================
3
3
 
4
- A <a href="http://nodered.org" target="_new">Node-RED</a> node to register to a TAK server,
5
- and to help send wrap files as datapackages for TAK.
4
+ A <a href="http://nodered.org" target="_new">Node-RED</a> node to register to a TAK server, to help send wrap files as datapackages for TAK, and to create simple markers from json messages.
6
5
 
7
6
  **NOTE**: NOT yet for production use.
8
7
 
9
- Install
10
- -------
8
+ ## Install
11
9
 
12
10
  Run the following command in your Node-RED user directory - typically `~/.node-red`
13
11
 
14
12
  npm i node-red-contrib-tak-registration
15
13
 
16
- Usage
17
- -----
14
+ ## Usage
18
15
 
19
16
  Registers a TAK gateway node and sets up a heartbeat.
20
17
 
21
18
  Works in conjunction with a TCP request node, set to point to the TAK server tcp address and port
22
19
  (usually 8087 or 8089), set to return strings, <i>keep connection open</i> mode, and split on "&lt;event/&gt;".
23
20
 
24
- It can also accepts files to be sent to the TAK server by sending a msg as follows:
21
+ It can send various types of messages to TAK.
25
22
 
26
- ### Inputs
23
+ ### Standard COT event
27
24
 
28
- #### Standard COT event
25
+ If the `msg.payload` is an XML string it will be passed directly though.
29
26
 
30
- if the `msg.payload` is an XML string it will be passed directly though.
31
-
32
- #### Sending data packages...
27
+ ### Sending data packages...
33
28
 
34
29
  requires a msg containing the following properties
35
30
 
@@ -38,11 +33,13 @@ to send to all users, or **public** to just upload the package to the TAK server
38
33
  - **topic** - *string* - the overall package name - IE what you want it to be called on the TAK device (keep it short).
39
34
  - **attachments** - *array of objects* - each object must contain at least a **filename** (string) and *content** a buffer of the file/data, for example `[{filename:"foo.kml", content: <buffer of the file>}]`
40
35
 
41
- #### Sending marker position...
36
+ ### Sending marker position...
37
+
38
+ To create or update a simple marker send a msg with the following property
42
39
 
43
40
  - **payload** - *object* - a "standard" node-red worldmap format msg.payload containing `name, lat, lon, type or SIDC, (alt), (speed), (bearing), (layer)`, where type is the CoT type eg a-f-g-u or the SIDC is the standard mil 2525C code, eg SFGPU. The layer will get turned int a hastag which can then be selected on/off in the TAK app.
44
41
 
45
- #### Updating gateway position...
42
+ ### Updating gateway position...
46
43
 
47
44
  To update the location of the gateway dynamically the node can accept a payload
48
45
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name" : "node-red-contrib-tak-registration",
3
- "version" : "0.2.0",
3
+ "version" : "0.2.1",
4
4
  "description" : "A Node-RED node to register to TAK and to help wrap files as datapackages to send to TAK",
5
5
  "dependencies" : {
6
6
  "adm-zip": "^0.5.9",
@@ -123,10 +123,11 @@
123
123
  <p>Registers a TAK gateway node and sets up a heartbeat.</p>
124
124
  <p>Works in conjunction with a TCP request node, set to point to the TAK server tcp address and port
125
125
  (usually 8087 or 8089), set to return strings, <i>keep connection open</i> mode, and split on <code>&lt;event/&gt;</code>.</p>
126
- <p>It can also accepts files to be sent to the TAK server by sending a msg as follows:</p>
127
- <h3>Inputs</h3>
126
+ <p>If the `msg.payload` is an XML string it will be passed directly though.</p>
127
+
128
+ <h3>Sending data packages...</h3>
128
129
  <dl class="message-properties">
129
- <dt>sendTo <span class="property-type">string|array</span></dt>
130
+ <dt>sendTo <span class="property-type">string | array</span></dt>
130
131
  <dd>can either be an individual TAK callsign, an array of callsigns, or <b>broadcast</b>
131
132
  to send to all users, or <b>public</b> to just upload the package to the TAK server.</dd>
132
133
  <dt>topic <span class="property-type">string</span></dt>
@@ -135,6 +136,23 @@
135
136
  <dd>each object must contain at least a <b>filename</b> (string) and <b>content</b> a buffer of the file/data.
136
137
  eg <code>[{filename:"foo.kml", content: &lt;buffer of the file&gt;}]</code></dd>
137
138
  </dl>
139
+
140
+ <h3>Sending marker position...</h3>
141
+ <dl class="message-properties">
142
+ <dt>payload <span class="property-type">object</span></dt>
143
+ <dd>a "standard" <b>node-red worldmap</b> format msg.payload containing `name, lat, lon, type or SIDC,
144
+ (alt), (speed), (bearing), (layer)`, where type is the CoT type eg a-f-g-u or the SIDC is
145
+ the standard mil 2525C code, eg SFGPU. The layer will get turned int a hastag which can then
146
+ be selected on/off in the TAK app.</dd>
147
+ </dl>
148
+
149
+ <h3>Updating gateway position...</h3>
150
+ <dl class="message-properties">
151
+ <dt>payload <span class="property-type">string | object</span></dt>
152
+ <dd>Either an NMEA string starting `$GPGGA` or an object containing `lat` and `lon` and
153
+ optional `alt` properties (but no name property).</dd>
154
+ </dl>
155
+
138
156
  <h3>Details</h3>
139
157
  <p>This should work almost directly with messages received from an email-in node for example -
140
158
  but you will need to add the recipients in the sendTo property and may need to filter out