From c874567679912922913ef87838ef6b90efb298d6 Mon Sep 17 00:00:00 2001
From: Scott Giese <scttgs0@gmail.com>
Date: Sat, 21 Nov 2020 02:12:02 -0600
Subject: [PATCH] Local weather: setprop() passed a NaN in
 local_weather/weather_tiles.nas, line 2795 Tiecket: #2423

---
 Nasal/local_weather/weather_tiles.nas | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Nasal/local_weather/weather_tiles.nas b/Nasal/local_weather/weather_tiles.nas
index e88ea6445..37ab2c55a 100644
--- a/Nasal/local_weather/weather_tiles.nas
+++ b/Nasal/local_weather/weather_tiles.nas
@@ -2779,15 +2779,15 @@ var set_METAR_weather_station = func {
 	# also compute and set gust wind info
 
 	var gust_angvar = 0.5 * weather_tile_management.relangle(wind_range_from, wind_range_to);
-	
+
+    var gust_relative_strength = 0.0;
 	if ((gust_strength > 0.0) or (gust_angvar > 0.0))
 		{
-		var gust_relative_strength = (gust_strength - windspeed)/windspeed;
+		gust_relative_strength = (gust_strength - windspeed)/windspeed;
 		setprop(lw~"tmp/gust-frequency-hz", 0.2 + rand()*0.8);
 		}
 	else
 		{
-		var gust_relative_strength = 0.0;
 		setprop(lw~"tmp/gust-frequency-hz", 0.0);
 		}