avoid sending sdt 2 updates for emane location event, avoid not using lon,lat,alt if any value is 0

This commit is contained in:
Blake Harnden 2020-02-21 17:17:09 -08:00
parent a3c7ed8012
commit afb0fe8b46

View file

@ -100,16 +100,9 @@ class Sdt:
lat = node_data.latitude
lon = node_data.longitude
alt = node_data.altitude
if all([lat, lon, alt]):
self.updatenodegeo(
node_data.id,
node_data.latitude,
node_data.longitude,
node_data.altitude,
)
if node_data.message_type == 0:
if all([lat is not None, lon is not None, alt is not None]):
self.updatenodegeo(node_data.id, lat, lon, alt)
elif node_data.message_type == 0:
# TODO: z is not currently supported by node messages
self.updatenode(node_data.id, 0, x, y, 0)