mirror of
https://github.com/SpudGunMan/meshing-around.git
synced 2026-07-03 00:11:14 +02:00
Add tidepredict support for global tide predictions
Co-authored-by: SpudGunMan <12676665+SpudGunMan@users.noreply.github.com>
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user