[Bug]: When GPS lock is lost, position is still reported over MQTT with lat and long of 0,0. #3228
Labels
bug
Something isn't working
high-priority
Issues that affect core functionality or are "show stoppers"
Category
Other
Hardware
T-Beam
Firmware Version
2.2.21.7f7c5cb
Description
When a device acting as an MQTT gateway sends a position report for a node with a satellite fix, it looks as follows (JSON):
However, if the device loses it's fix, reports are still periodically sent which look like this:
I have not investigated protobuf output, only JSON at present, but the MQTT.cpp source file looks like it's doing the right thing as far as not including fields that aren't present in the protobuf.
This is causing some quality-of-life issues on the development end, as there isn't an immediate indication that the position is invalid, and in fact, 0, 0 certainly is a valid position, though a remote one unlikely but not impossible to be visited by mesh nodes.
My immediate thought for a solution would be to either suppress reports that do not have a GPS fix, or add a field to the payload to indicate that there is no GPS fix. The device knows there is no fix, as it indicates "No Sats" on screen 3 and "No GPS Lock" on screen 4.
I don't want to simply filter out results of 0, 0, or those without the
sats_in_view
key, as both of those could be legitimate reports from some current or future device. The issue is that the GPS fix status, which the device does know, is not being provided -- at least to MQTT in the JSON package.Relevant log output
No response
The text was updated successfully, but these errors were encountered: