signalk-polar-performance-plugin 0.0.41 → 0.0.42

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "signalk-polar-performance-plugin",
3
- "version": "0.0.41",
3
+ "version": "0.0.42",
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/public/index.html CHANGED
@@ -199,7 +199,7 @@ function handleData (data) {
199
199
  // console.log('polarSpeed set to %s', polarSpeed)
200
200
  chartData.datasets[0].data[0].y = polarSpeed
201
201
  } else if (path == 'environment.wind.angleTrueWaterDamped') {
202
- TWA = roundDec(radToDeg(value),1)
202
+ TWA = roundDec(Math.abs(radToDeg(value)),1)
203
203
  // console.log('TWA set to %s', TWA)
204
204
  chartData.datasets[0].data[0].x = TWA
205
205
  chartData.datasets[1].data[0].x = TWA