breautek commented on issue #216:
URL: 
https://github.com/apache/cordova-plugin-geolocation/issues/216#issuecomment-725394786


   Short answer is no, we cannot get satellite information. But if you're just 
looking for dilution of precision, browsers provide that value in the 
`accuracy` field. I'll explain why.
   
   For most platforms, we rely on the browser implementation for the 
geolocation APIs. If the browser implementation is lacking on a particular 
platform, then Apache Cordova will implement it following the W3C spec. Android 
for example doesn't actually have a geolocation implementation since the 
webview provides an implementation; the plugin just simply handles permissions. 
The browser/W3C spec doesn't define APIs for obtaining satellite information, 
therefore it's not something we can implement in this plugin. Third-party 
geolocation plugins that uses the native APIs may have this implemented, or at 
the very least has the flexibility of providing APIs to obtain satellite 
information.
   
   The browser however does give you an `accuracy` field, which looks a lot 
like the dilution of precision that you're looking for. It's read is a 95% 
confidence that the point is within the accuracy radius of the actual location 
in meters. In other words, if the accuracy reading is **5**, the actual point 
is within 5 meters distance of the given point. If the accuracy reading is 50, 
then the actual point is within 50 meters distance of the given point. The 
greater the accuracy value, the less accurate the GPS point is. And in my 
experience, [DOP Meaning 
Chart](https://en.wikipedia.org/wiki/Dilution_of_precision_(navigation)#Meaning_of_DOP_Values[citation_needed])
 matches the healthy check of accuracy values. Most mobile devices will only be 
as accurate as 3-5m at their best. For most apps, the `accuracy` field is 
enough to determine if a received GPS point is safe to use. Knowing the actual 
satellite positioning/fixing will only be useful for displaying that data to 
the user if they
  care about that information. It's also worth noting that most devices uses 
[A-GPS](https://en.wikipedia.org/wiki/Assisted_GPS) and doesn't solely rely on 
satellites for obtaining GPS points.
   
   In my apps, I use a mixture of accuracy values and some other information to 
determine accuracy of a received GPS point. For example, I know users of the 
GPS are in a vehicle driving on a road, so if the distance/time of the next 
point compared to the previous point doesn't make sense (like they suddenly 
went from 50km/h to 300km/h) obviously the incoming point is garbage and I 
ignore it. 9 times out of 10 though a garbage point is accompanied by a high 
accuracy reading.
   
   I'll be closing this issue because the requested API is something I don't 
foresee Apache Cordova implementing since it's not defined in the W3C spec.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to