Skip to content

Commit 4cd6f8e

Browse files
committed
fix waypoint coordinate precedence for cross-platform merge determinism
1 parent 84c0708 commit 4cd6f8e

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

mslib/msui/flighttrack.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,17 @@ class Waypoint:
143143
def __init__(self, lat=0., lon=0., flightlevel=0., location="", comments=""):
144144
self.location = location
145145

146-
locations = config_loader(dataset='locations')
147-
if location in locations:
148-
self.lat, self.lon = locations[location]
149-
else:
146+
# Prefer explicitly provided coordinates (e.g., from server/XML)
147+
if lat != 0.0 or lon != 0.0:
150148
self.lat = lat
151149
self.lon = lon
150+
else:
151+
locations = config_loader(dataset='locations')
152+
if location in locations:
153+
self.lat, self.lon = locations[location]
154+
else:
155+
self.lat = lat
156+
self.lon = lon
152157

153158
self.flightlevel = flightlevel
154159
self.pressure = thermolib.flightlevel2pressure(flightlevel * units.hft).magnitude

0 commit comments

Comments
 (0)