signalk-polar-performance-plugin 0.0.51 → 0.0.52
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/package.json +1 -1
- package/plugin/index.js +8 -3
- package/ratio_off.dump +0 -8047
package/package.json
CHANGED
package/plugin/index.js
CHANGED
|
@@ -19,6 +19,11 @@ 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 to use'
|
|
26
|
+
},
|
|
22
27
|
beatAngle: {
|
|
23
28
|
type: 'boolean',
|
|
24
29
|
title:
|
|
@@ -134,7 +139,7 @@ module.exports = function (app) {
|
|
|
134
139
|
minPeriod: 500
|
|
135
140
|
},
|
|
136
141
|
{
|
|
137
|
-
path:
|
|
142
|
+
path: trueWindSpeedPath,
|
|
138
143
|
policy: 'instant',
|
|
139
144
|
minPeriod: 500
|
|
140
145
|
},
|
|
@@ -200,9 +205,9 @@ module.exports = function (app) {
|
|
|
200
205
|
} else if (delta.path == 'navigation.headingTrue') {
|
|
201
206
|
HDG = delta.value
|
|
202
207
|
// app.debug('heading (HDG): %d', HDG)
|
|
203
|
-
} else if (delta.path ==
|
|
208
|
+
} else if (delta.path == trueWindSpeedPath) {
|
|
204
209
|
TWS = applyDamping(delta.value, 'TWS', options.dampingTWS || 0)
|
|
205
|
-
// app.debug('
|
|
210
|
+
// app.debug('%s (TWS): %d applyDamping: %d', trueWindSpeedPath, delta.value, TWS)
|
|
206
211
|
// app.debug('TWS: %d TWA: %d BSP: %d', msToKts(TWS), radToDeg(TWA)*port, msToKts(BSP))
|
|
207
212
|
sendUpdates(getPerformanceData(TWS, TWA, BSP))
|
|
208
213
|
} else if (delta.path == 'environment.wind.angleTrueWater') {
|