diff --git a/calcs/groundWind.js b/calcs/groundWind.js index a5a9a2a..25fb95b 100644 --- a/calcs/groundWind.js +++ b/calcs/groundWind.js @@ -16,6 +16,9 @@ module.exports = function (app, plugin) { var speed = Math.sqrt( Math.pow(apparentY, 2) + Math.pow(-sog + apparentX, 2) ) + + if (aws < 1e-9) {angle = awa} + return [ { path: 'environment.wind.angleTrueGround', value: angle }, { path: 'environment.wind.speedOverGround', value: speed } diff --git a/calcs/trueWind.js b/calcs/trueWind.js index 77a4665..e18c0c5 100644 --- a/calcs/trueWind.js +++ b/calcs/trueWind.js @@ -18,6 +18,8 @@ module.exports = function (app) { Math.pow(apparentY, 2) + Math.pow(-speed + apparentX, 2) ) + if (aws < 1e-9) {angle = awa} + var dir = headTrue + angle if (dir > Math.PI * 2) {