From a2289a862199fca22e943e5c5502c9da3b6d5868 Mon Sep 17 00:00:00 2001 From: Thomas Hooge Date: Mon, 27 Oct 2025 14:54:14 +0100 Subject: [PATCH] Fixed lat/lon formatting --- boatdata.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boatdata.py b/boatdata.py index 9c9d23e..f085395 100644 --- a/boatdata.py +++ b/boatdata.py @@ -186,10 +186,10 @@ class BoatValueGeo(BoatValue): degrees = int(self.value) minutes = (self.value - degrees) * 60 if self.geofmt == 'lat': - direction = ('E' if self.value > 0 else 'W') + direction = 'N' if self.value > 0 else 'S' formatted = "{0}° {1:.{3}f}' {2}".format(degrees, minutes, direction, self.decpl) elif self.geofmt == 'lon': - direction = 'N' if self.value > 0 else 'S' + direction = 'E' if self.value > 0 else 'W' formatted = "{0}° {1:.{3}f}' {2}".format(degrees, minutes, direction, self.decpl) else: formatted = str(self.placeholder)