diff --git a/code.gs b/code.gs index b9e1510..c239cfe 100644 --- a/code.gs +++ b/code.gs @@ -1016,6 +1016,7 @@ function updateWindGuru_() { let hash = md5_(salt + windGuruStationUID + windGuruStationPassword); request += '&hash=' + hash; request += '&interval=60'; + request += '&unixtime=' + (conditions.time / 1000).toFixedNumber(0); if (conditions.temp != null) request += '&temperature=' + conditions.temp.c; if (conditions.windSpeed != null) request += '&wind_avg=' + conditions.windSpeed.knots; if (conditions.windGust != null) request += '&wind_max=' + conditions.windGust.knots; @@ -1244,4 +1245,4 @@ Number.prototype.heatIndex = function(humidity, units='F') { let heatIndexF = -42.379 + 2.04901523 * T + 10.14333127 * H - 0.22475541 * T * H - 6.83783 * Math.pow(10, -3) * Math.pow(T, 2) - 5.481717 * Math.pow(10, -2) * Math.pow(H, 2) + 1.22874 * Math.pow(10, -3) * Math.pow(T, 2) * H + 8.5282 * Math.pow(10, -4) * T * Math.pow(H, 2) - 1.99 * Math.pow(10, -6) * Math.pow(T, 2) * Math.pow(H, 2); return units === 'F' ? heatIndexF : heatIndexF.fToC(); } -Number.prototype.toFixedNumber = function(digits) { return +this.toFixed(digits); } \ No newline at end of file +Number.prototype.toFixedNumber = function(digits) { return +this.toFixed(digits); }