@tak-ps/node-cot 12.14.0 → 12.16.0

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.
Files changed (59) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/index.js +1 -0
  3. package/dist/index.js.map +1 -1
  4. package/dist/lib/cot.js +32 -0
  5. package/dist/lib/cot.js.map +1 -1
  6. package/dist/lib/sensor.js +21 -0
  7. package/dist/lib/sensor.js.map +1 -0
  8. package/dist/package.json +3 -2
  9. package/dist/test/cot-fileshare.test.js +1 -0
  10. package/dist/test/cot-fileshare.test.js.map +1 -1
  11. package/dist/test/cot-itak.test.js +1 -0
  12. package/dist/test/cot-itak.test.js.map +1 -1
  13. package/dist/test/cot-mma.test.js +1 -0
  14. package/dist/test/cot-mma.test.js.map +1 -1
  15. package/dist/test/cot-range-and-bearing.test.js +1 -0
  16. package/dist/test/cot-range-and-bearing.test.js.map +1 -1
  17. package/dist/test/cot-routes.test.js +1 -0
  18. package/dist/test/cot-routes.test.js.map +1 -1
  19. package/dist/test/cot-uas-tool.test.js +77 -0
  20. package/dist/test/cot-uas-tool.test.js.map +1 -1
  21. package/dist/test/cot-video.test.js +1 -0
  22. package/dist/test/cot-video.test.js.map +1 -1
  23. package/dist/test/newlines.test.js +1 -0
  24. package/dist/test/newlines.test.js.map +1 -1
  25. package/dist/test/taskings-mission.test.js +3 -0
  26. package/dist/test/taskings-mission.test.js.map +1 -1
  27. package/dist/tsconfig.tsbuildinfo +1 -1
  28. package/index.ts +10 -9
  29. package/lib/cot.ts +44 -0
  30. package/lib/sensor.ts +30 -0
  31. package/package.json +3 -2
  32. package/test/cot-fileshare.test.ts +1 -0
  33. package/test/cot-itak.test.ts +1 -0
  34. package/test/cot-mma.test.ts +1 -0
  35. package/test/cot-range-and-bearing.test.ts +1 -0
  36. package/test/cot-routes.test.ts +1 -0
  37. package/test/cot-uas-tool.test.ts +79 -1
  38. package/test/cot-video.test.ts +1 -0
  39. package/test/fixtures/archived.geojson +1 -0
  40. package/test/fixtures/attachments.geojson +1 -0
  41. package/test/fixtures/basic.geojson +1 -0
  42. package/test/fixtures/circle.geojson +27 -26
  43. package/test/fixtures/color.geojson +1 -0
  44. package/test/fixtures/fileshare.geojson +1 -0
  45. package/test/fixtures/geofence.geojson +1 -0
  46. package/test/fixtures/hae.geojson +1 -0
  47. package/test/fixtures/icon.geojson +1 -0
  48. package/test/fixtures/linestring.geojson +1 -0
  49. package/test/fixtures/marti-mission.geojson +1 -0
  50. package/test/fixtures/metadata.geojson +1 -0
  51. package/test/fixtures/mission-layer.geojson +1 -0
  52. package/test/fixtures/mission.geojson +1 -0
  53. package/test/fixtures/polygon.geojson +1 -0
  54. package/test/fixtures/props.geojson +1 -0
  55. package/test/fixtures/sensor.geojson +1 -0
  56. package/test/fixtures/video-connection.geojson +1 -0
  57. package/test/fixtures/video.geojson +1 -0
  58. package/test/newlines.test.ts +1 -0
  59. package/test/taskings-mission.test.ts +3 -0
@@ -1,29 +1,30 @@
1
1
  {
2
- "id": "123",
3
- "type": "Feature",
4
- "properties": {
5
- "type": "u-d-c-c",
6
- "how": "h-g-i-g-o",
7
- "callsign": "BasicTest",
8
- "center": [
9
- 1.1,
10
- 2.2,
11
- 0
12
- ],
13
- "time": "2023-08-04T15:17:43.649Z",
14
- "start": "2023-08-04T15:17:43.649Z",
15
- "stale": "2023-08-04T15:17:43.649Z",
16
- "shape": {
17
- "ellipse": {
18
- "major": 2,
19
- "minor": 2,
20
- "angle": 360
21
- }
2
+ "id": "123",
3
+ "type": "Feature",
4
+ "path": "/",
5
+ "properties": {
6
+ "type": "u-d-c-c",
7
+ "how": "h-g-i-g-o",
8
+ "callsign": "BasicTest",
9
+ "center": [
10
+ 1.1,
11
+ 2.2,
12
+ 0
13
+ ],
14
+ "time": "2023-08-04T15:17:43.649Z",
15
+ "start": "2023-08-04T15:17:43.649Z",
16
+ "stale": "2023-08-04T15:17:43.649Z",
17
+ "shape": {
18
+ "ellipse": {
19
+ "major": 2,
20
+ "minor": 2,
21
+ "angle": 360
22
+ }
23
+ },
24
+ "metadata": {}
22
25
  },
23
- "metadata": {}
24
- },
25
- "geometry": {
26
- "type": "Polygon",
27
- "coordinates": [ [ [ 1.100018, 2.2 ], [ 1.100018, 2.200002 ], [ 1.100018, 2.200004 ], [ 1.100017, 2.200005 ], [ 1.100017, 2.200007 ], [ 1.100016, 2.200008 ], [ 1.100015, 2.20001 ], [ 1.100014, 2.200011 ], [ 1.100013, 2.200013 ], [ 1.100011, 2.200014 ], [ 1.10001, 2.200015 ], [ 1.100008, 2.200016 ], [ 1.100007, 2.200017 ], [ 1.100005, 2.200017 ], [ 1.100004, 2.200018 ], [ 1.100002, 2.200018 ], [ 1.1, 2.200018 ], [ 1.099998, 2.200018 ], [ 1.099996, 2.200018 ], [ 1.099995, 2.200017 ], [ 1.099993, 2.200017 ], [ 1.099992, 2.200016 ], [ 1.09999, 2.200015 ], [ 1.099989, 2.200014 ], [ 1.099987, 2.200013 ], [ 1.099986, 2.200011 ], [ 1.099985, 2.20001 ], [ 1.099984, 2.200008 ], [ 1.099983, 2.200007 ], [ 1.099983, 2.200005 ], [ 1.099982, 2.200004 ], [ 1.099982, 2.200002 ], [ 1.099982, 2.2 ], [ 1.099982, 2.199998 ], [ 1.099982, 2.199996 ], [ 1.099983, 2.199995 ], [ 1.099983, 2.199993 ], [ 1.099984, 2.199992 ], [ 1.099985, 2.19999 ], [ 1.099986, 2.199989 ], [ 1.099987, 2.199987 ], [ 1.099989, 2.199986 ], [ 1.09999, 2.199985 ], [ 1.099992, 2.199984 ], [ 1.099993, 2.199983 ], [ 1.099995, 2.199983 ], [ 1.099996, 2.199982 ], [ 1.099998, 2.199982 ], [ 1.1, 2.199982 ], [ 1.100002, 2.199982 ], [ 1.100004, 2.199982 ], [ 1.100005, 2.199983 ], [ 1.100007, 2.199983 ], [ 1.100008, 2.199984 ], [ 1.10001, 2.199985 ], [ 1.100011, 2.199986 ], [ 1.100013, 2.199987 ], [ 1.100014, 2.199989 ], [ 1.100015, 2.19999 ], [ 1.100016, 2.199992 ], [ 1.100017, 2.199993 ], [ 1.100017, 2.199995 ], [ 1.100018, 2.199996 ], [ 1.100018, 2.199998 ], [ 1.100018, 2.2 ] ] ]
28
- }
26
+ "geometry": {
27
+ "type": "Polygon",
28
+ "coordinates": [ [ [ 1.100018, 2.2 ], [ 1.100018, 2.200002 ], [ 1.100018, 2.200004 ], [ 1.100017, 2.200005 ], [ 1.100017, 2.200007 ], [ 1.100016, 2.200008 ], [ 1.100015, 2.20001 ], [ 1.100014, 2.200011 ], [ 1.100013, 2.200013 ], [ 1.100011, 2.200014 ], [ 1.10001, 2.200015 ], [ 1.100008, 2.200016 ], [ 1.100007, 2.200017 ], [ 1.100005, 2.200017 ], [ 1.100004, 2.200018 ], [ 1.100002, 2.200018 ], [ 1.1, 2.200018 ], [ 1.099998, 2.200018 ], [ 1.099996, 2.200018 ], [ 1.099995, 2.200017 ], [ 1.099993, 2.200017 ], [ 1.099992, 2.200016 ], [ 1.09999, 2.200015 ], [ 1.099989, 2.200014 ], [ 1.099987, 2.200013 ], [ 1.099986, 2.200011 ], [ 1.099985, 2.20001 ], [ 1.099984, 2.200008 ], [ 1.099983, 2.200007 ], [ 1.099983, 2.200005 ], [ 1.099982, 2.200004 ], [ 1.099982, 2.200002 ], [ 1.099982, 2.2 ], [ 1.099982, 2.199998 ], [ 1.099982, 2.199996 ], [ 1.099983, 2.199995 ], [ 1.099983, 2.199993 ], [ 1.099984, 2.199992 ], [ 1.099985, 2.19999 ], [ 1.099986, 2.199989 ], [ 1.099987, 2.199987 ], [ 1.099989, 2.199986 ], [ 1.09999, 2.199985 ], [ 1.099992, 2.199984 ], [ 1.099993, 2.199983 ], [ 1.099995, 2.199983 ], [ 1.099996, 2.199982 ], [ 1.099998, 2.199982 ], [ 1.1, 2.199982 ], [ 1.100002, 2.199982 ], [ 1.100004, 2.199982 ], [ 1.100005, 2.199983 ], [ 1.100007, 2.199983 ], [ 1.100008, 2.199984 ], [ 1.10001, 2.199985 ], [ 1.100011, 2.199986 ], [ 1.100013, 2.199987 ], [ 1.100014, 2.199989 ], [ 1.100015, 2.19999 ], [ 1.100016, 2.199992 ], [ 1.100017, 2.199993 ], [ 1.100017, 2.199995 ], [ 1.100018, 2.199996 ], [ 1.100018, 2.199998 ], [ 1.100018, 2.2 ] ] ]
29
+ }
29
30
  }
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "id": "123",
3
3
  "type": "Feature",
4
+ "path": "/",
4
5
  "properties": {
5
6
  "type": "a-f-G",
6
7
  "how": "m-g",
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "id": "123",
3
3
  "type": "Feature",
4
+ "path": "/",
4
5
  "properties": {
5
6
  "type": "a-f-G",
6
7
  "how": "m-g",
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "id": "123",
3
3
  "type": "Feature",
4
+ "path": "/",
4
5
  "properties": {
5
6
  "type": "a-f-G",
6
7
  "how": "m-g",
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "id": "123",
3
3
  "type": "Feature",
4
+ "path": "/",
4
5
  "properties": {
5
6
  "type": "a-f-G",
6
7
  "how": "m-g",
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "id": "123",
3
3
  "type": "Feature",
4
+ "path": "/",
4
5
  "properties": {
5
6
  "type": "a-f-G",
6
7
  "how": "m-g",
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "id": "line",
3
3
  "type": "Feature",
4
+ "path": "/",
4
5
  "properties": {
5
6
  "callsign": "LineString",
6
7
  "type": "u-d-f",
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "id": "123",
3
3
  "type": "Feature",
4
+ "path": "/",
4
5
  "properties": {
5
6
  "type": "a-f-G",
6
7
  "how": "m-g",
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "id": "123",
3
3
  "type": "Feature",
4
+ "path": "/",
4
5
  "properties": {
5
6
  "type": "a-f-G",
6
7
  "how": "m-g",
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "id": "123",
3
3
  "type": "Feature",
4
+ "path": "/",
4
5
  "properties": {
5
6
  "type": "a-f-G",
6
7
  "how": "m-g",
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "id": "123",
3
3
  "type": "Feature",
4
+ "path": "/",
4
5
  "properties": {
5
6
  "type": "a-f-G",
6
7
  "how": "m-g",
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "id": "polygon",
3
3
  "type": "Feature",
4
+ "path": "/",
4
5
  "properties": {
5
6
  "callsign": "Polygon",
6
7
  "type": "u-d-f",
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "id": "123",
3
3
  "type": "Feature",
4
+ "path": "/",
4
5
  "properties": {
5
6
  "type": "a-f-G",
6
7
  "how": "m-g",
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "id": "123",
3
3
  "type": "Feature",
4
+ "path": "/",
4
5
  "properties": {
5
6
  "type": "a-f-G",
6
7
  "how": "m-g",
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "id": "123",
3
3
  "type": "Feature",
4
+ "path": "/",
4
5
  "properties": {
5
6
  "type": "a-f-G",
6
7
  "how": "m-g",
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "id": "123",
3
3
  "type": "Feature",
4
+ "path": "/",
4
5
  "properties": {
5
6
  "type": "a-f-G",
6
7
  "how": "m-g",
@@ -59,6 +59,7 @@ Speed: 1</remarks><_flow-tags_ TAK-Server-e87a0e02420b44a08f6032bcf1877745="2024
59
59
  t.deepEquals(cot.to_geojson(), {
60
60
  id: 'layer-35-4707',
61
61
  type: 'Feature',
62
+ path: '/',
62
63
  properties: {
63
64
  callsign: '9T20',
64
65
  type: 'a-f-G',
@@ -13,6 +13,7 @@ test('Decode MissionChange CoTs', (t) => {
13
13
  t.deepEquals({
14
14
  id: 'f205227b-2e23-40bf-8948-711566116365',
15
15
  type: 'Feature',
16
+ path: '/',
16
17
  properties: {
17
18
  callsign: 'UNKNOWN',
18
19
  center: [ 0, 0, 0 ],
@@ -63,6 +64,7 @@ test('Decode MissionChange CoTs - #2', (t) => {
63
64
  t.deepEquals({
64
65
  id: 'f205227b-2e23-40bf-8948-711566116365',
65
66
  type: 'Feature',
67
+ path: '/',
66
68
  properties: {
67
69
  callsign: 'UNKNOWN',
68
70
  center: [ 0, 0, 0 ],
@@ -117,6 +119,7 @@ test('Decode MissionChange Logs', (t) => {
117
119
  t.deepEquals({
118
120
  id: 'e77c55da-c5d2-4200-bbc9-9967b3f30b5b',
119
121
  type: 'Feature',
122
+ path: '/',
120
123
  properties: {
121
124
  callsign: 'UNKNOWN',
122
125
  center: [ 0, 0, 0 ],