signalk-polar-performance-plugin 0.0.34 → 0.0.35
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 +3 -2
- package/ratio_off.dump +8047 -0
package/package.json
CHANGED
package/plugin/index.js
CHANGED
|
@@ -164,11 +164,11 @@ module.exports = function (app) {
|
|
|
164
164
|
deltas.forEach(delta => {
|
|
165
165
|
// app.debug('handleData: %s', JSON.stringify(delta))
|
|
166
166
|
if (delta.path == 'navigation.speedThroughWater') {
|
|
167
|
-
STW = applyDamping (delta.value, '
|
|
167
|
+
STW = applyDamping (delta.value, 'STW', options.dampingBSP || 0)
|
|
168
168
|
BSP = STW
|
|
169
169
|
// app.debug('speedThroughWater (STW): %d', STW)
|
|
170
170
|
} else if (delta.path == 'navigation.speedOverGround') {
|
|
171
|
-
SOG = applyDamping (delta.value, '
|
|
171
|
+
SOG = applyDamping (delta.value, 'SOG', options.dampingBSP || 0)
|
|
172
172
|
BSP = SOG
|
|
173
173
|
// app.debug('speedThroughWater (STW): %d', STW)
|
|
174
174
|
} else if (delta.path == 'navigation.headingTrue') {
|
|
@@ -409,6 +409,7 @@ module.exports = function (app) {
|
|
|
409
409
|
}
|
|
410
410
|
// Calculate polar performance ratio
|
|
411
411
|
if (typeof performance.polarSpeed != 'undefined') {
|
|
412
|
+
app.debug('performance.polarSpeedRatio = BSP (%s)/ performance.polarSpeed (%s)', msToKts(BSP).toFixed(2), msToKts(performance.polarSpeed).toFixed(2))
|
|
412
413
|
performance.polarSpeedRatio = BSP / performance.polarSpeed
|
|
413
414
|
if (options.VMG == true) {
|
|
414
415
|
performance.velocityMadeGood = Math.abs(BSP * Math.cos(TWA))
|