signalk-polar-performance-plugin 0.0.28 → 0.0.30
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 -1
package/package.json
CHANGED
package/plugin/index.js
CHANGED
|
@@ -299,6 +299,7 @@ module.exports = function (app) {
|
|
|
299
299
|
let VMGLower = polar[indexTWS]['Beat VMG']
|
|
300
300
|
let VMGUpper = polar[indexTWS+1]['Beat VMG']
|
|
301
301
|
performance.beatVMG = VMGLower + ((VMGUpper - VMGLower) * twsGapRatio)
|
|
302
|
+
performance.targetVMG = performance.beatVMG
|
|
302
303
|
}
|
|
303
304
|
} else {
|
|
304
305
|
// app.debug('Downwind')
|
|
@@ -322,6 +323,7 @@ module.exports = function (app) {
|
|
|
322
323
|
let VMGUpper = polar[indexTWS+1]['Run VMG']
|
|
323
324
|
//app.debug('VMGLower: %s VMGUpper: %s', VMGLower, VMGUpper)
|
|
324
325
|
performance.runVMG = VMGLower + ((VMGUpper - VMGLower) * twsGapRatio)
|
|
326
|
+
performance.targetVMG = performance.runVMG
|
|
325
327
|
}
|
|
326
328
|
}
|
|
327
329
|
// Calculate opposite Tack True
|
|
@@ -408,7 +410,7 @@ module.exports = function (app) {
|
|
|
408
410
|
performance.polarSpeedRatio = BSP / performance.polarSpeed
|
|
409
411
|
if (options.VMG == true) {
|
|
410
412
|
performance.velocityMadeGood = Math.abs(BSP * Math.cos(TWA))
|
|
411
|
-
performance.polarVelocityMadeGood =
|
|
413
|
+
performance.polarVelocityMadeGood = performance.targetVMG
|
|
412
414
|
performance.polarVelocityMadeGoodRatio = performance.velocityMadeGood / performance.polarVelocityMadeGood
|
|
413
415
|
}
|
|
414
416
|
} else {
|