Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OwnTracks publishing invalid coordinates #668

Open
edgauthier opened this issue Mar 5, 2021 · 13 comments
Open

OwnTracks publishing invalid coordinates #668

edgauthier opened this issue Mar 5, 2021 · 13 comments
Assignees
Labels

Comments

@edgauthier
Copy link

Occasionally, OwnTracks will publish a message with invalid coordinates (e.g. the longitude set to "0.000000"). Is there a way to prevent the app from sending these messages?

@jpmens
Copy link
Member

jpmens commented Mar 5, 2021

Please tell us which iPhone/iPad model you are using, iOS release and OwnTracks version.

Also, when you say occasionally, how frequently would that be? I don't think we've seen this in years.

@edgauthier
Copy link
Author

  • iPhone 12 Pro
  • iOS 14.4
  • OwnTracks 14.0.3/en_US

I've seen it happen at least twice in the past two months (only started using OwnTracks at the beginning of the year). I started logging the messages while I was integrating this into my Home Assistant setup. When these have occurred, HA marks me as away from home (and when I look at the map, I'm not shown anywhere). As soon as I open the OwnTracks app, it publishes a new message with the details. In both cases, I was sitting at home when it happened.

Messages logged when this happens with some data redacted:

2/4/2021, 2:51:17 PM - {"batt":90,"lon":0.000000,"acc":4,"p":99.277,"bs":1,"created_at":1612468277,"vel":1,"SSID":           "XXXXXXXXXX","BSSID":"XXXXXXXXXXXX","inrids":["62667d","1b7297"],"vac":3,"lat":XX.XXXXXX,"inregions":                 ["Neighborhood","Home"],"t":"b","conn":"w","tst":1612468220,"alt":0,"_type":"location","tid":"EG"}
3/5/2021, 7:09:42 AM - {"cog":235,"batt":69,"lon":0.000000,"acc":4,"p":99.822,"bs":1,"vel":0,"SSID":"XXXXXXXXXX",          "BSSID":"XXXXXXXXXXXX","inrids":["62667d","1b7297"],"vac":4,"lat":XX.XXXXXX,"inregions":["Neighborhood","Home"],"t":    "b","conn":"w","tst":1614946183,"alt":163,"_type":"location","tid":"EG"}

I have 2 waypoints configured in the app - one circular region, and in the center of that an iBeacon-based region.

{
  "_type" : "waypoints",
  "waypoints" : [
    {
      "rad" : 0,
      "tst" : 1611518352,
      "_type" : "waypoint",
      "rid" : "1b7297",
      "lon" : -XX.XXX730000000005,
      "lat" : XX.XXX230000000003,
      "desc" : "Home:XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
    },
    {
      "rad" : 400,
      "tst" : 1611465647,
      "_type" : "waypoint",
      "rid" : "62667d",
      "lon" : -XX.XXX730000000005,
      "lat" : XX.XXX230000000003,
      "desc" : "Neighborhood"
    }
  ]
}

@ckrey
Copy link
Member

ckrey commented Mar 7, 2021

Thanks @edgauthier for the details. We do suppress invalid lat/lon when they are 0.0/0.0 already, but we have never seen a case yours before.

"t":"b" in both cases indicate your phone detected entering or leaving an iBeacon region.
"conn":"w" in both cases indicate you were connected to Wifi. We can assume iOS took the location information from your Wifi signature, not from GPS. It may be a problem with the Wifi location database used by iOS...

Interestingly altitude is once reported as "alt":0,"vac":3and in the other case as "alt":163,"vac":4. What is the altitude reported in a good situation?

@ckrey ckrey self-assigned this Mar 7, 2021
@ckrey ckrey added the question label Mar 7, 2021
@edgauthier
Copy link
Author

Normal altitude when I'm home is between 158 and 162 depending on which floor I'm on.

@ckrey
Copy link
Member

ckrey commented Mar 9, 2021

mmh, locations with zero lat OR lon are suppressed since 6 years:

Screenshot 2021-03-09 at 09 13 24

@edgauthier
Copy link
Author

Is there anything I can/should try and change from my perspective?

@ckrey
Copy link
Member

ckrey commented Mar 11, 2021

Does the problem occur once a month as shown in your example above, or does it happen frequently?

@edgauthier
Copy link
Author

So far, once a month (only 2 occurrences being the ones mentioned above). Logging is still enabled, so I'll be looking for it come April (assuming it's tied to some pattern).

@ckrey
Copy link
Member

ckrey commented Dec 20, 2021

@edgauthier I'm closing this issue for now.

@ckrey ckrey closed this as completed Dec 20, 2021
@jpmens
Copy link
Member

jpmens commented Aug 12, 2022

We've just seen this happen. Reopening.

@jpmens jpmens reopened this Aug 12, 2022
@ckrey
Copy link
Member

ckrey commented Aug 12, 2022

22A2B8B7-7A07-43F1-A82E-4A48D58F0B20

@klofrau
Copy link

klofrau commented May 31, 2024

I've seen it happening, too. Once in April and three times in May (I started logging with owntracks in March).
Any useful data I could provide?

This is what I removed from the *.rec-files (redacted with lower case x):

{"_type":"location","acc":5,"alt":158,"batt":100,"bs":3,"cog":124,"conn":"m","lat":5x.644897,"lon":0,"m":1,"p":100.538,"t":"C","tid":"xx","tst":1713765917,"vac":3,"vel":79} {"_type":"location","acc":5,"alt":176,"batt":89,"bs":2,"cog":105,"conn":"m","lat":5x.651184,"lon":0,"m":1,"p":98.706,"t":"C","tid":"xx","tst":1715006050,"vac":3,"vel":31} {"_type":"location","acc":5,"alt":115,"batt":80,"bs":1,"cog":254,"conn":"m","lat":5x.971771,"lon":0,"m":1,"p":100.839,"t":"C","tid":"xx","tst":1715421080,"vac":3,"vel":6} {"_type":"location","acc":5,"alt":155,"batt":69,"bs":2,"cog":236,"conn":"m","lat":5x.692749,"lon":0,"m":1,"p":99.691,"t":"C","tid":"xx","tst":1716470199,"vac":3,"vel":56}

Uneducated guess: Maybe lon is provided as an integer 0, but the check is against double 0.0?

iPhone 13 Mini
iOS 17.5.1
App Version 17.3.1
frontend 2.12.0
recorder 0.9.7

ckrey added a commit that referenced this issue Jun 25, 2024
    [FIX] tentative fix for OwnTracks publishing invalid coordinates #668
@ckrey
Copy link
Member

ckrey commented Sep 19, 2024

A tentative fix in included in versuon 18.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants