Mixed GPS acc unit/number

Troubles with application

Mixed GPS acc unit/number

Postby Holton181 » 01 Oct 2017, 09:58

Hi
Just noticed that, on my unit, the GPS acc has the unit in feet (ft) but the number is in meters.
I saw that I got a acc of 3ft in FiF while the best I ever got before with other apps is 3m.
So I compared with 'GPS Status' and 'Oruxmaps' and indeed got an acc of 3m, changed units and got 10ft.
I could even see the acc of 'GPS Status' in the Android status bar while I had FiF running, same numbers (3) but different units.

BR
/H
Holton181
 
Posts: 21
Joined: 13 Dec 2016, 10:02

Re: Mixed GPS acc unit/number

Postby kitercuda » 30 Dec 2017, 18:54

FIF displays what it gets from Android.

Here is code

public static final float FEET_TO_M = 0.3048f;

if (location.hasAccuracy()) {
mACC_m = location.getAccuracy();
mACC_ft = mACC_m / FEET_TO_M;
}
else {
mACC_m = NONE_FVALUE;
mACC_ft = NONE_FVALUE;
}
User avatar
kitercuda
Administrátor
 
Posts: 1297
Joined: 11 Apr 2012, 11:25

Re: Mixed GPS acc unit/number

Postby Holton181 » 30 Dec 2017, 21:41

Thank you for your answer.
Yes, according to the code you are showing fif really grabs the accuracy both as meters and (calculated) feets.
But how are the variables used later?
You can see in my first attached picture, with fif and GPS Status side by side, that both has an acc/error of 9 (I'm indoors). But fif gives 9ft while GPS Status gives 9m.
Screenshot_20171230-220359.png
Screenshot_20171230-220359.png (305.05 KiB) Viewed 8375 times


But if you have a look at my second image where I have changed the distance unit in fif to km (acc in m), you can see they still have same numbers, but also same unit
Screenshot_20171230-222050.png
Screenshot_20171230-222050.png (309.15 KiB) Viewed 8375 times


For comparison, fif in NM (acc ft) and GPS Status in ft
Screenshot_20171230-223444.png
Screenshot_20171230-223444.png (281.23 KiB) Viewed 8375 times


All pics are screen shots with split screen and the apps running simultaneously.
Same happens with Oruxmaps as the comparison app.
Something doesn't seem to work as intended


EDIT
I noticed you need to right click and "view image" to actually see the entire image, at least that's how I need to do it in Firefox.
Holton181
 
Posts: 21
Joined: 13 Dec 2016, 10:02

Re: Mixed GPS acc unit/number

Postby kitercuda » 16 Jan 2018, 14:52

Thanks a lot. I have found the bug. Next upgrade will solve it.

Display unit:
switch (NavigationEngine.getDistDetailUnit()) {
case NavigationEngine.FEET: acc = NavigationEngine.mACC_ft; break;
case NavigationEngine.M: acc = NavigationEngine.mACC_m; break;
}
There was missing breaks, so it was always in meters.
User avatar
kitercuda
Administrátor
 
Posts: 1297
Joined: 11 Apr 2012, 11:25

Re: Mixed GPS acc unit/number

Postby Holton181 » 16 Jan 2018, 15:19

Good to hear you found it.
Thanks!
Holton181
 
Posts: 21
Joined: 13 Dec 2016, 10:02

Re: Mixed GPS acc unit/number

Postby Holton181 » 16 Jan 2018, 21:42

I got a new update today, 20.24.
Was this bugfix suposed to be in this update?
It still only shows the meter accuracy even if unit is feet.
Holton181
 
Posts: 21
Joined: 13 Dec 2016, 10:02

Re: Mixed GPS acc unit/number

Postby kitercuda » 17 Jan 2018, 15:31

The next one :-)
User avatar
kitercuda
Administrátor
 
Posts: 1297
Joined: 11 Apr 2012, 11:25

Re: Mixed GPS acc unit/number

Postby Holton181 » 17 Jan 2018, 16:13

Excellent!
Holton181
 
Posts: 21
Joined: 13 Dec 2016, 10:02

Re: Mixed GPS acc unit/number

Postby kitercuda » 27 Jan 2018, 19:12

20.25 should be OK...
User avatar
kitercuda
Administrátor
 
Posts: 1297
Joined: 11 Apr 2012, 11:25

Re: Mixed GPS acc unit/number

Postby Holton181 » 27 Jan 2018, 19:40

It is :-)
Thanks!
Holton181
 
Posts: 21
Joined: 13 Dec 2016, 10:02


Return to Questions and answers

Who is online

Users browsing this forum: No registered users and 1 guest

cron