Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Inaccurate #69

Closed
PerryRylance opened this issue Aug 17, 2017 · 5 comments
Closed

Inaccurate #69

PerryRylance opened this issue Aug 17, 2017 · 5 comments
Milestone

Comments

@PerryRylance
Copy link

I decided to do some real testing rather than emulated, and the results are woefully inaccurate. I walked around the block and found my location would stick for 10+ seconds sometimes, and half the time it showed me as being nowhere near the path I was on

@radeva
Copy link
Contributor

radeva commented Aug 17, 2017

Hi @PerryRylance ,

Thanks for reporting the issue. We'll need some more info to further investigate it:

  • Is this on Android or iOS
  • which version of the operating system
  • what is the device which you use for these tests

Could you send us a sample app (as .zip or just refer to a repo) where we can take a look at the exact code?

Best regards,
Veselina

@PerryRylance
Copy link
Author

Hi Veselina

This is on an Android, Samsung A5, Version 6.0

I've tried the following on page load

geolocation.watchLocation(
	updatePosition,
	function(e) {
		alert(e.message);
	},
	{
		desiredAccuracy: 0,
		updateDistance: 1,
		updateTime: 2000
	}
);

This doesn't work at all unless you put it in a timeout. Even then, it barely fires (maybe once every 2 minutes?)

I then tried this

setInterval(function() {
	geolocation.getCurrentLocation({ updateDistance: 0.1, maximumAge: 5000, timeout: 20000 }).then(updatePosition);
}, 2000);

But the results are so inaccurate it's practically useless for my project

@radeva
Copy link
Contributor

radeva commented Aug 17, 2017

Hi @PerryRylance ,

Could you try to do the following import:
import { Accuracy } from "ui/enums";
and use Accuracy.high as a value of desiredAccuracy in your first code snippet?

desiredAccuracy: 0 sets Android accuracy to ACCURACY_COARSE which gives approximate accuracy.
Setting plugin's desiredAccuracy to Accuracy.high will set the Android accuracy to ACCURACY_FINE which gives finer location accuracy.

I hope this helps.

Best regards,
Veselina

@PerryRylance
Copy link
Author

Hi @radeva

I required enums and used enums.Accuracy.high (which I can confirm evaluates to 3) however this made no difference at all with either watchLocation or getCurrentLocation

Sorry to be the bearer of bad news!

@angeltsvetkov angeltsvetkov added this to the vFuture milestone Sep 1, 2017
@DimitarTachev
Copy link
Contributor

DimitarTachev commented Oct 12, 2017

Hi @PerryRylance,

Could you check the accuracy once again and update us back? We fully replaced the old Android implementation with the Google Play Services one (used by Google Maps).

You could check the v4.0.0 release notes here.

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

No branches or pull requests

4 participants