Add tidepredict support for global tide predictions

Co-authored-by: SpudGunMan <12676665+SpudGunMan@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-10-29 03:53:07 +00:00
parent 74f4cd284c
commit f8782de291
5 changed files with 214 additions and 1 deletions
+11
View File
@@ -175,6 +175,17 @@ def getArtSciRepeaters(lat=0, lon=0):
return msg
def get_NOAAtide(lat=0, lon=0):
# Check if tidepredict (xtide) is enabled
if my_settings.useTidePredict:
try:
from modules import xtide
if xtide.is_enabled():
logger.debug("Location: Using tidepredict for global tide data")
return xtide.get_tide_predictions(lat, lon)
except Exception as e:
logger.warning(f"Location: Failed to use tidepredict, falling back to NOAA: {e}")
# Original NOAA implementation
station_id = ""
location = lat,lon
if float(lat) == 0 and float(lon) == 0: