paulmandal / atak-forwarder

Forwards packets to/from ATAK over an off-grid communication layer
MIT License
404 stars 42 forks source link

fix "null island" issue #72 #73

Closed a-f-G-U-C closed 3 years ago

a-f-G-U-C commented 3 years ago

Fix the bug described in issue #72, where missing GPS coords are replaced with default values 0/0/0, causing an apparent teleportation to Null Island in the Atlantic Ocean. :)

The new boolean flag gpsValid indicates unambiguously whether or not the node update from Meshtastic did contain a valid GPS location. This flag is set in MeshtasticCommHardware.java, then checked further downstream in NonAtakStationCotGenerator.java. If false, then the node update is ignored. This prevents invalid locations from being treated as valid.