meshtastic / Meshtastic-Android

Android application for Meshtastic
https://meshtastic.org
GNU General Public License v3.0
737 stars 212 forks source link

[Bug]: Number of satellites does not always populate for connected node #1273

Closed b8b8 closed 3 days ago

b8b8 commented 1 month ago

Contact Details

No response

What happened?

The icon under the voltage/battery percentage does not always populate with the number of satellites the node is connected to. Viewing the same node from another device correctly shows the GPS is connected to said satellites.

Maybe an update as well that shows a flashing icon showing the GPS hardware is detected (but not signal locked) and signal strength like the device LCD screen has next to the number of connected satellites would be helpful for (in this case) screenless devices.

App Version

2.3.14 and 2.4.15

Phone

Pixel 7a

Device

T1000-E

Firmware

2.5.2

Relevant log output

No response

Code of Conduct

andrekir commented 1 month ago

The icon under the voltage/battery percentage does not always populate with the number of satellites the node is connected to. Viewing the same node from another device correctly shows the GPS is connected to said satellites.

if the data is from the radio, it will show the number of satellites. however if Android location data is used, it doesn't have any satellite info.

Maybe an update as well that shows a flashing icon showing the GPS hardware is detected (but not signal locked) and signal strength like the device LCD screen has next to the number of connected satellites would be helpful for (in this case) screenless devices.

clients do not have access to that information

b8b8 commented 1 month ago

if the data is from the radio, it will show the number of satellites. however if Android location data is used, it doesn't have any satellite info.

Correct, the location sharing from android is not enabled, but still no satellite info is shown on the device the android app is connected to. My second node on a second android device shows the number of satellites of my first node. requesting the first node's location from the second node correctly updates the position coordinates and number of satellites, while the first node still shows no satellites.

image

image

andrekir commented 1 month ago

thanks for the detailed information. does this happen right after connecting to the radio?

nodes store in the nodeDB a trimmed-down version of the Position protobuf to save space, which doesn't include satellites in view. so clients will only receive sats in view from periodic broadcasts.

thats why right after connecting, satellite info for every node will be missing (unless there are Position packets in the toPhone queue).

b8b8 commented 1 month ago

Yes there are no satellites seen right after connecting (which is understandable), but also the same lack of satellites hours later. In the screen shot below I used my connected to Seeed nodes to request the position of my WX node. The number of satellites instantly updated to 7 however as you can see no satellites are shown for the connected Seeed node even though it should be polling the GPS for a new position every 3min end when requesting the WX position it should be sending its own position.

I have also been noticing far fewer satellites on my seeed node this last week or so (when viewed from another node as said previously). Was there firmware changes to the GPS code turning off some of the constellations and less info with each NMEA packet? I used to get 13-17 satellites even indoors, now i am lucky to get 6-7 even when outside.

image

image

andrekir commented 1 month ago

In the screen shot below I used my connected to Seeed nodes to request the position of my WX node. The number of satellites instantly updated to 7 however as you can see no satellites are shown for the connected Seeed node even though it should be polling the GPS for a new position every 3min end when requesting the WX position it should be sending its own position.

position packets (including both requests for position and periodic broadcasts) are all handled at the same place in the code. missing satellite info is likely due to the packet not including satellite data (satsInView = 0).

b8b8 commented 1 month ago

It is included. And the number of sats seen by the seeed device is shown on remote devices, just not the connected device. Maybe its just a problem with the icon rendering and not the packet themselves

image

image image

andrekir commented 1 month ago

not included in the position packets received from your node. it’s possible that your node is sending satsInView = 0.

b8b8 commented 1 month ago

then how is my other node receiving the number of satellites correctly from this same node? these are 2 different screenshots from 2 different phones.

b8b8 commented 1 month ago

i've done some more testing and the satellites seem to show more often when driving around, even with the GPS refresh rate set to 180 seconds. My whole drive home today i could see the satellites of the connected device, however at home and stationary i could not see the satellites of the connected device (but the satellites of mesh connected stationary nodes was visible).

andrekir commented 5 days ago

@b8b8 Check your position log: do you have any positions showing 0 Sats? That's the raw position packet coming from the radio.

b8b8 commented 3 days ago

I do have the odd zero satellites which could explain it then. I know now for whatever reason this is working FAR MORE reliably now. I think a bunch of updates to the GPS code and getting the Seeeed tracker GPS working correctly has essentially solved this issue. You can close this if you want now. thanks for the effort trying to track this down.