In function nonAtakUserInfoFromNodeInfo(), if the extraction of lat/lon/alt data fails, the function returns a 0/0/0 triplet which is indistinguishable from a valid result (0/0/0 is a real place on Earth), and is indeed treated as valid elsewhere in the code.
This causes the standalone devices that lose GPS lock to be plotted at 0/0/0 on the ATAK map, causing a false teleportation effect.
Suggestion
There are 2 options:
Lazy fix: NodeInfo messages that fail getValidPosition() should be dropped without further processing
Serious fix: NodeInfo messages that fail getValidPosition() should update the battery info if available, and be otherwise CoT-ed at the unit's last known valid position with how='h-g-i-g-o'
In any case, using 0/0/0 as default values or error codes should probably be avoided in this context.
In function
nonAtakUserInfoFromNodeInfo()
, if the extraction of lat/lon/alt data fails, the function returns a 0/0/0 triplet which is indistinguishable from a valid result (0/0/0 is a real place on Earth), and is indeed treated as valid elsewhere in the code.https://github.com/paulmandal/atak-forwarder/blob/df53a8bb23b55f93d10c75f542ff66f14c4e6144/app/src/main/java/com/paulmandal/atak/forwarder/comm/commhardware/MeshtasticCommHardware.java#L421-L427
This causes the standalone devices that lose GPS lock to be plotted at 0/0/0 on the ATAK map, causing a false teleportation effect.
Suggestion
There are 2 options:
getValidPosition()
should be dropped without further processinggetValidPosition()
should update the battery info if available, and be otherwise CoT-ed at the unit's last known valid position withhow='h-g-i-g-o'
In any case, using 0/0/0 as default values or error codes should probably be avoided in this context.