signalk-polar-performance-plugin 0.0.53 → 0.0.55

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
@@ -15,6 +15,34 @@ The following paths are read
15
15
  ### Polar diagram
16
16
  The polar diagram can be configured through CSV notation as used on [ORC sailboat data](https://jieter.github.io/orc-data/site/).
17
17
 
18
+ ## Example csv
19
+ ```
20
+ twa/tws;6;8;10;12;14;16;20
21
+ 0;0;0;0;0;0;0;0
22
+ 46.9;4.23;0;0;0;0;0;0
23
+ 44.8;0;5.09;0;0;0;0;0
24
+ 43.5;0;0;5.72;0;0;0;0
25
+ 42.6;0;0;0;6.22;0;0;0
26
+ 41.8;0;0;0;0;6.57;0;0
27
+ 40.8;0;0;0;0;0;6.75;0
28
+ 41.1;0;0;0;0;0;0;6.93
29
+ 52;4.57;5.59;6.33;6.87;7.23;7.45;7.65
30
+ 60;4.93;5.93;6.66;7.15;7.47;7.68;7.94
31
+ 75;5.17;6.18;6.91;7.37;7.68;7.92;8.31
32
+ 90;5.29;6.43;7.23;7.71;8.03;8.29;8.57
33
+ 110;5.38;6.56;7.36;7.84;8.22;8.6;9.31
34
+ 120;5.2;6.38;7.23;7.76;8.16;8.55;9.36
35
+ 135;4.65;5.84;6.78;7.43;7.87;8.25;9.03
36
+ 150;3.92;5.05;5.97;6.7;7.2;7.58;8.17
37
+ 144.2;4.19;0;0;0;0;0;0
38
+ 146.4;0;5.25;0;0;0;0;0
39
+ 146.9;0;0;6.17;0;0;0;0
40
+ 147.1;0;0;0;6.91;0;0;0
41
+ 148.3;0;0;0;0;7.33;0;0
42
+ 171.2;0;0;0;0;0;6.76;0
43
+ 176.3;0;0;0;0;0;0;7.59
44
+ ```
45
+
18
46
  The resulting polar after processing can be seen here in the WebApp, looking something like:
19
47
  ![](https://raw.githubusercontent.com/htool/signalk-polar-performance-plugin/main/doc/BandG_polar.png)
20
48
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "signalk-polar-performance-plugin",
3
- "version": "0.0.53",
3
+ "version": "0.0.55",
4
4
  "description": "A plugin that calculates performance information based on a (CSV) polar diagram.",
5
5
  "main": "plugin/index.js",
6
6
  "scripts": {
package/plugin/index.js CHANGED
@@ -19,11 +19,6 @@ module.exports = function (app) {
19
19
  var schema = {
20
20
  // The plugin schema
21
21
  properties: {
22
- trueWindSpeedPath: {
23
- type: 'string',
24
- default: 'environment.wind.speedTrue',
25
- title: 'Wind speed path (TWS) to use'
26
- },
27
22
  useTWSsource: {
28
23
  type: 'string',
29
24
  default: '',
@@ -144,7 +139,7 @@ module.exports = function (app) {
144
139
  minPeriod: 500
145
140
  },
146
141
  {
147
- path: trueWindSpeedPath,
142
+ path: 'environment.wind.speedTrue',
148
143
  policy: 'instant',
149
144
  minPeriod: 500
150
145
  },
@@ -210,10 +205,10 @@ module.exports = function (app) {
210
205
  } else if (delta.path == 'navigation.headingTrue') {
211
206
  HDG = delta.value
212
207
  // app.debug('heading (HDG): %d', HDG)
213
- } else if (delta.path == trueWindSpeedPath) {
208
+ } else if (delta.path == 'environment.wind.speedTrue') {
214
209
  if (options.useTWSsource == '' || source == options.useTWSsource) {
215
210
  TWS = applyDamping(delta.value, 'TWS', options.dampingTWS || 0)
216
- // app.debug('%s (TWS): %d applyDamping: %d', trueWindSpeedPath, delta.value, TWS)
211
+ // app.debug('(TWS): %d applyDamping: %d', delta.value, TWS)
217
212
  // app.debug('TWS: %d TWA: %d BSP: %d', msToKts(TWS), radToDeg(TWA)*port, msToKts(BSP))
218
213
  sendUpdates(getPerformanceData(TWS, TWA, BSP))
219
214
  }