signalk-polar-performance-plugin 0.0.36 → 0.0.37

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/README.md CHANGED
@@ -45,12 +45,13 @@ In the plugin configuration you can toggle the following options:
45
45
  - Configurable damping alorithm on inputs
46
46
  - Extrapolation of polar data towards 0
47
47
  - Configurable overall performance adjustment ratio
48
+ - Dots in webapp indicating Polar Speed and Boat Speed
49
+ - Use highest polar speed when going north of Polar
48
50
 
49
51
  ### To-do list
50
52
  - Improved interpolation
51
53
  - Make moment to do calculation smarter/configurable
52
54
  - API to see JSON of polar
53
- - Extrapolation of polar data towards 50 kts?
54
55
  - Create polar from live data
55
56
  -- Save polar info to file
56
57
  -- Save new record speed for angle in polar
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "signalk-polar-performance-plugin",
3
- "version": "0.0.36",
3
+ "version": "0.0.37",
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
@@ -276,6 +276,10 @@ module.exports = function (app) {
276
276
  for (let indexTWS = 0 ; indexTWS < polar.length-1; indexTWS++) {
277
277
  let lower = polar[indexTWS].tws
278
278
  let upper = polar[indexTWS+1].tws
279
+ if (indexTWS == polar.length-1 && TWS > upper) {
280
+ // North of polar
281
+ TWS = upper
282
+ }
279
283
  if (TWS >= lower && TWS <= upper) {
280
284
  //app.debug('TWS between %d and %d', lower, upper)
281
285
  // Calculate gap ratio