{"action":"created","issue":{"url":"https://api.github.com/repos/jamesmontemagno/GeolocatorPlugin/issues/41","repository_url":"https://api.github.com/repos/jamesmontemagno/GeolocatorPlugin","labels_url":"https://api.github.com/repos/jamesmontemagno/GeolocatorPlugin/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/jamesmontemagno/GeolocatorPlugin/issues/41/comments","events_url":"https://api.github.com/repos/jamesmontemagno/GeolocatorPlugin/issues/41/events","html_url":"https://github.com/jamesmontemagno/GeolocatorPlugin/issues/41","id":186439575,"number":41,"title":"PositionChanged giving new GPS position when device is in static position","user":{"login":"bernardlcn","id":23090151,"avatar_url":"https://avatars.githubusercontent.com/u/23090151?v=3","gravatar_id":"","url":"https://api.github.com/users/bernardlcn","html_url":"https://github.com/bernardlcn","followers_url":"https://api.github.com/users/bernardlcn/followers","following_url":"https://api.github.com/users/bernardlcn/following{/other_user}","gists_url":"https://api.github.com/users/bernardlcn/gists{/gist_id}","starred_url":"https://api.github.com/users/bernardlcn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bernardlcn/subscriptions","organizations_url":"https://api.github.com/users/bernardlcn/orgs","repos_url":"https://api.github.com/users/bernardlcn/repos","events_url":"https://api.github.com/users/bernardlcn/events{/privacy}","received_events_url":"https://api.github.com/users/bernardlcn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-01T01:00:18Z","updated_at":"2016-12-16T15:11:28Z","closed_at":null,"body":"Please fill out either the bug or feature request section and remove whatever section you are not using.\r\n\r\n## Bug (or may not be) \r\nHi James, i'm new to xamarin and also new to implementing Geo services solution.\r\n\r\nThe issue I'm facing currently is that if I put the phone on a static location (e.g on the table) without moving it, but then I noticed the PositionChanged event will keep firing periodically and give a new GPS location, isn't the GPS location of the phone should be always the same if it is in static position without moving around?\r\n\r\nIs there anything that I have missed out? Please kindly advise. \r\nMuch Appreciated and Thanks.\r\n\r\nVersion Number of Plugin: 1.0.3\r\nDevice Tested On: 31 October 2016\r\nSimulator Tested On: Nil\r\n\r\n### Expected Behavior\r\nPositionChanged to retain the same GPS position when device is in static position\r\n\r\n### Actual Behavior\r\nPositionChanged giving new GPS position when device is in static position\r\n\r\n### Steps to reproduce the Behavior\r\nBelow is partial of my code implementation. \r\n\r\nvar locator = CrossGeolocator.Current;\r\n        locator.DesiredAccuracy = 50;\r\n        locator.PositionChanged += (s, e) =>\r\n        {\r\n\r\n                 try\r\n                 {\r\n                     var newPosition = e.Position;\r\n                     Position newLogPosition = new Position(newPosition.Latitude, newPosition.Longitude);    \r\n                     labelNewGPS.Text = \"New GPS Location : Latitude :\" + newLogPosition.Latitude + \", Longitude: \" + newLogPosition.Longitude; ;\r\n                 }\r\n                     catch (Exception ex)\r\n                 {\r\n                     labelErrorMessage.Text = \"Trip Log encountered error - \" + ex.Message.ToString();\r\n                 }\r\n        };\r\n        locator.PositionError += (s, e) =>\r\n        {\r\n              labelErrorMessage.Text = \"Trip Log encountered error - \" + e.Error.ToString();\r\n        };\r\n\r\n        ......\r\n        ......\r\n\r\n       if (!locator.IsListening)\r\n       {\r\n              await locator.StartListeningAsync(1000, 0);\r\n       }\r\n\r\n## Feature Request:\r\nPlease fill in what you would like\r\n"},"comment":{"url":"https://api.github.com/repos/jamesmontemagno/GeolocatorPlugin/issues/comments/267614759","html_url":"https://github.com/jamesmontemagno/GeolocatorPlugin/issues/41#issuecomment-267614759","issue_url":"https://api.github.com/repos/jamesmontemagno/GeolocatorPlugin/issues/41","id":267614759,"user":{"login":"fguarini","id":5199852,"avatar_url":"https://avatars.githubusercontent.com/u/5199852?v=3","gravatar_id":"","url":"https://api.github.com/users/fguarini","html_url":"https://github.com/fguarini","followers_url":"https://api.github.com/users/fguarini/followers","following_url":"https://api.github.com/users/fguarini/following{/other_user}","gists_url":"https://api.github.com/users/fguarini/gists{/gist_id}","starred_url":"https://api.github.com/users/fguarini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fguarini/subscriptions","organizations_url":"https://api.github.com/users/fguarini/orgs","repos_url":"https://api.github.com/users/fguarini/repos","events_url":"https://api.github.com/users/fguarini/events{/privacy}","received_events_url":"https://api.github.com/users/fguarini/received_events","type":"User","site_admin":false},"created_at":"2016-12-16T15:11:28Z","updated_at":"2016-12-16T15:11:28Z","body":"I think this is not a problem with the nugget, but more with how GPS work. I experienced the same problem and fixed it by StartListening and subscribe to the event after some time with another Task (wait for a couple of seconds and then subscribe on another thread). Do that and you will be fine for the setup (start time). You still might get some weird readings later on, but that should fix your problem. Also to the StartListeningAsync you should give the second parameter a couple of metters since no GPS (at least the ones found inside smartphones) are that precise so a minimum distance to update will save you reading unuseful data.  "}}
{"actor":{"display_login":"fguarini"}}