enhance_wx_model

can now edit config.ini and add wx_model

This allows Canadian users (and others) to get more accurate forecasts using their regional weather models instead of the global blended model. The change is fully backward-compatible — existing installations work unchanged.

handles https://github.com/SpudGunMan/meshing-around/issues/331

Co-Authored-By: va3vbe <209848734+va3vbe@users.noreply.github.com>
This commit is contained in:
Kellyandva3vbe committed 2026-08-15 19:14:49 -07:00
1 parent b9a2f56e39
commit fe5db94647
3 files changed
+12 -1

No files matched your search

+1
View File
@@ -317,6 +317,7 @@ try:
fuzz_config_location = config['location'].getboolean('fuzzConfigLocation', True) # default True
fuzzItAll = config['location'].getboolean('fuzzAllLocations', False) # default False, only fuzz config location
use_meteo_wxApi = config['location'].getboolean('UseMeteoWxAPI', False) # default False use NOAA
meteo_wx_model = config['location'].get('meteoWxModel', '') # default empty string for best_match
use_metric = config['location'].getboolean('useMetric', False) # default Imperial units
repeater_lookup = config['location'].get('repeaterLookup', 'rbook') # default repeater lookup source
n2yoAPIKey = config['location'].get('n2yoAPIKey', '') # default empty
+5 -1
View File
@@ -4,7 +4,7 @@
import requests
import json
from modules.log import logger
from modules.settings import ERROR_FETCHING_DATA
from modules.settings import ERROR_FETCHING_DATA, meteo_wx_model
def get_weather_data(api_url, params):
response = requests.get(api_url, params=params)
@@ -34,6 +34,10 @@ def get_wx_meteo(lat=0, lon=0, unit=0):
params["distance_unit"] = "mile"
params["pressure_unit"] = "inHg"
# Add optional weather model if configured
if meteo_wx_model:
params["models"] = meteo_wx_model
try:
# Fetch the weather data
weather_data = get_weather_data(url, params)