signalk-polar-performance-plugin 0.0.27 → 0.0.28

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 (2) hide show
  1. package/package.json +1 -1
  2. package/plugin/index.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "signalk-polar-performance-plugin",
3
- "version": "0.0.27",
3
+ "version": "0.0.28",
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
@@ -408,7 +408,7 @@ module.exports = function (app) {
408
408
  performance.polarSpeedRatio = BSP / performance.polarSpeed
409
409
  if (options.VMG == true) {
410
410
  performance.velocityMadeGood = Math.abs(BSP * Math.cos(TWA))
411
- performance.polarVelocityMadeGood = Math.abs(performance.polarSpeed * Math.cos(targetTWA))
411
+ performance.polarVelocityMadeGood = Math.abs(performance.targetVelocityMadeGood * Math.cos(targetTWA))
412
412
  performance.polarVelocityMadeGoodRatio = performance.velocityMadeGood / performance.polarVelocityMadeGood
413
413
  }
414
414
  } else {